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 015F51387B1 for ; Wed, 1 Jan 2014 14:47:31 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 50818E09B7; Wed, 1 Jan 2014 14:47:30 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E7725E0966 for ; Wed, 1 Jan 2014 14:47:29 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E5E4433F6B6 for ; Wed, 1 Jan 2014 14:47:28 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 5B9C3E54AB for ; Wed, 1 Jan 2014 14:47:27 +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: <1388587277.ee9f7930ef93c905cc116834a66295af1bc0569e.dol-sen@gentoo> Subject: [gentoo-commits] proj/catalyst:2.X commit in: modules/ X-VCS-Repository: proj/catalyst X-VCS-Files: modules/generic_target.py X-VCS-Directories: modules/ X-VCS-Committer: dol-sen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: ee9f7930ef93c905cc116834a66295af1bc0569e X-VCS-Branch: 2.X Date: Wed, 1 Jan 2014 14:47:27 +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: 2aa944d0-02ae-47bc-b9bd-e6ce9f5e68d0 X-Archives-Hash: e954100715d3fdd8194311ea5df1c262 commit: ee9f7930ef93c905cc116834a66295af1bc0569e Author: W. Trevor King tremily us> AuthorDate: Fri Dec 27 02:40:10 2013 +0000 Commit: Brian Dolbec gmail com> CommitDate: Wed Jan 1 14:41:17 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=ee9f7930 modules/generic_target.py: Pass TERM through to the chroot environment 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'), + }