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 4F36D139084 for ; Sun, 2 Mar 2014 16:07:47 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C08F7E0A80; Sun, 2 Mar 2014 16:07:46 +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 8FDCAE0A7E for ; Sun, 2 Mar 2014 16:07:45 +0000 (UTC) Received: from spoonbill.gentoo.org (spoonbill.gentoo.org [81.93.255.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B4C7733FAAE for ; Sun, 2 Mar 2014 16:07:44 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id 6D927188ED for ; Sun, 2 Mar 2014 16:07:43 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: <1393776427.db605e682e255c9331a9ead62208e2bf00e7f14a.dol-sen@gentoo> Subject: [gentoo-commits] proj/catalyst:pending commit in: catalyst/targets/ X-VCS-Repository: proj/catalyst X-VCS-Files: catalyst/targets/generic_target.py X-VCS-Directories: catalyst/targets/ X-VCS-Committer: dol-sen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: db605e682e255c9331a9ead62208e2bf00e7f14a X-VCS-Branch: pending Date: Sun, 2 Mar 2014 16:07:43 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 5e8594fb-13dd-40df-8b98-354edccac73d X-Archives-Hash: feb1e2d48c70ac2783d9654529adb274 commit: db605e682e255c9331a9ead62208e2bf00e7f14a Author: W. Trevor King tremily us> AuthorDate: Fri Dec 27 02:40:10 2013 +0000 Commit: Brian Dolbec gmail com> CommitDate: Sun Mar 2 16:07:07 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=db605e68 catalyst/targets/generic_target.py: Pass TERM through to the chroot 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'), + }