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 8AECB138247 for ; Sun, 29 Dec 2013 02:55:45 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id F075FE0B06; Sun, 29 Dec 2013 02:55:44 +0000 (UTC) Received: from qmta05.westchester.pa.mail.comcast.net (qmta05.westchester.pa.mail.comcast.net [76.96.62.48]) by pigeon.gentoo.org (Postfix) with ESMTP id 8A267E0B06 for ; Sun, 29 Dec 2013 02:55:44 +0000 (UTC) Received: from omta05.westchester.pa.mail.comcast.net ([76.96.62.43]) by qmta05.westchester.pa.mail.comcast.net with comcast id 7Emn1n0030vyq2s55EvkER; Sun, 29 Dec 2013 02:55:44 +0000 Received: from odin.tremily.us ([24.18.63.50]) by omta05.westchester.pa.mail.comcast.net with comcast id 7Evj1n003152l3L3REvjLl; Sun, 29 Dec 2013 02:55:44 +0000 Received: by odin.tremily.us (Postfix, from userid 1000) id B355FE25881; Sat, 28 Dec 2013 18:55:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tremily.us; s=odin; t=1388285742; bh=oB6hFKR6uTonwH58Xhe0dQky0ryQLOjDwFxcDZ3fzlY=; h=From:To:Cc:Subject:Date; b=bXbbeUqCpPGdlUzbmMx8Fh0tdKhyINwebOXdHV3y1RI/3Be1/XMLpaQ5Zr+WObNHp ACVqc7n4ja9IzxJf3Ye8JZ18tqXn9Kpo2NDx/nbQI8EmjCo4OEZAn3i4BziIY7lGF2 nibm/JUlhmxD6pC3+6Yw3MWLGj76iIFBk9MwVLhU= From: "W. Trevor King" To: Catalyst Cc: "W. Trevor King" Subject: [gentoo-catalyst] [PATCH] modules/generic_target.py: Pass TERM through to the chroot environment Date: Sat, 28 Dec 2013 18:55:37 -0800 Message-Id: <739db1331359acd82717c3eed4bced3828ad7e8d.1388285607.git.wking@tremily.us> X-Mailer: git-send-email 1.8.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20121106; t=1388285744; bh=czFai8cz9wlLQqHB2VSlW//qY9AxlEHOKUk1Qt+Uih8=; h=Received:Received:Received:From:To:Subject:Date:Message-Id; b=WTH3/j+5eehnZ1tzzEieAdZ/W5Dc+nQoy9jI7ZQnqYEij3SQUVKIB5xWXrtYyXwOe rgCZOtNXTxNpB6nK81UCei8BrInQjgAbc0h0vv98QctzqsPB5CcTq9PTpT9S1eQA4a DhpTsBxY8NEyrFHA4TPC+fkldaGwz56yrNhkK5fVKcYMON9YsZDYx8YVPJIWSbw2Zw eYjcIj35Zy56DtLqEdM4KNfcF6TD6OzvqW3Lv2l5JTuyFFaswkF9NZnVRjBAxkPKB6 JGFb92tA6lorIbYnVpohk28Mny7asSFYzuLOSX4b19Z9nsoZIaGxZWn+cbsQdirVAs e7xg+XYZb6rww== 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: f32aa65e-abd6-460d-af91-7aad4bab8119 X-Archives-Hash: 398a4afcb4eebb6da457a7f69c268415 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/ --- modules/generic_target.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/generic_target.py b/modules/generic_target.py index fe96bd7..30dadc8 100644 --- a/modules/generic_target.py +++ b/modules/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.3.2