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 11F201391DB for ; Sat, 22 Mar 2014 22:25:23 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 50496E0CFD; Sat, 22 Mar 2014 22:25:22 +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 AEB89E0CFE for ; Sat, 22 Mar 2014 22:25:21 +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 DC689335E31 for ; Sat, 22 Mar 2014 22:25:20 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id D7097188EF for ; Sat, 22 Mar 2014 22:25:17 +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: <1395511289.c6fe2266fd2355d6a15f95b1b6c4f8f40a309214.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: c6fe2266fd2355d6a15f95b1b6c4f8f40a309214 X-VCS-Branch: pending Date: Sat, 22 Mar 2014 22:25:17 +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: 0e1876a1-616e-44c2-a61b-5ec0d48a45c7 X-Archives-Hash: 2937d30a7297369addcb29fa9bf795ac commit: c6fe2266fd2355d6a15f95b1b6c4f8f40a309214 Author: W. Trevor King tremily us> AuthorDate: Fri Dec 27 02:40:10 2013 +0000 Commit: Brian Dolbec gmail com> CommitDate: Sat Mar 22 18:01:29 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=c6fe2266 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'), + }