From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 8529A13873B for ; Sun, 2 Mar 2014 23:01:20 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 632D6E0B90; Sun, 2 Mar 2014 23:01:16 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id DF577E0A90 for ; Sun, 2 Mar 2014 23:01:15 +0000 (UTC) Received: from big_daddy.dol-sen.ca (S010600222de111ff.vc.shawcable.net [96.49.5.156]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: dolsen) by smtp.gentoo.org (Postfix) with ESMTPSA id E61F333FA66 for ; Sun, 2 Mar 2014 23:01:14 +0000 (UTC) From: Brian Dolbec To: gentoo-catalyst@lists.gentoo.org Subject: [gentoo-catalyst] [PATCH 4/5] catalyst/targets/generic_target.py: Pass TERM through to the chroot Date: Sun, 2 Mar 2014 15:01:01 -0800 Message-Id: <1393801262-13820-4-git-send-email-dolsen@gentoo.org> X-Mailer: git-send-email 1.8.5.3 In-Reply-To: <1393801262-13820-2-git-send-email-dolsen@gentoo.org> References: <1393801262-13820-2-git-send-email-dolsen@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-catalyst@lists.gentoo.org Reply-to: gentoo-catalyst@lists.gentoo.org X-Archives-Salt: 119eb0cb-4071-459c-bd94-45eb615522f9 X-Archives-Hash: 000a313314dea75123d0a0ad2d4692b5 From: "W. Trevor King" Avoid: Running stage1-chroot.sh in chroot /var/tmp/catalyst/tmp/default/... tput: No value for $TERM and no -T specified by passing the caller's TERM environment variable [1] through to the chroot. If the caller does not supply TERM, default to 'dumb' which disables color etc., but should be the most portable. On Gentoo, the dumb terminfo (/usr/share/terminfo/d/dumb) is distributed as part of ncurses [2]. You can list supported terminals with toe, which is also distributed with ncurses [2]: $ toe ansi ansi/pc-term compatible with color dumb 80-column dumb tty linux linux console ... [1]: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_03 [2]: http://www.gnu.org/software/ncurses/ --- catalyst/targets/generic_target.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/catalyst/targets/generic_target.py b/catalyst/targets/generic_target.py index de51994..382f1c7 100644 --- a/catalyst/targets/generic_target.py +++ b/catalyst/targets/generic_target.py @@ -1,3 +1,5 @@ +import os + from catalyst.support import * class generic_target: @@ -7,5 +9,7 @@ class generic_target: def __init__(self,myspec,addlargs): addl_arg_parse(myspec,addlargs,self.required_values,self.valid_values) self.settings=myspec - self.env={} - self.env["PATH"]="/bin:/sbin:/usr/bin:/usr/sbin" + self.env = { + 'PATH': '/bin:/sbin:/usr/bin:/usr/sbin', + 'TERM': os.getenv('TERM', 'dumb'), + } -- 1.8.5.3