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 63357138247 for ; Tue, 31 Dec 2013 10:09:45 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E4B29E0A92; Tue, 31 Dec 2013 10:09:42 +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 68215E0A92 for ; Tue, 31 Dec 2013 10:09:42 +0000 (UTC) Received: from [192.168.1.210] (S010600222de111ff.vc.shawcable.net [96.49.5.156]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: dolsen) by smtp.gentoo.org (Postfix) with ESMTPSA id 6FFE233F652 for ; Tue, 31 Dec 2013 10:09:41 +0000 (UTC) Message-ID: <1388484556.24088.102.camel@big_daddy.dol-sen.ca> Subject: Re: [gentoo-catalyst] [PATCH] modules/generic_target.py: Pass TERM through to the chroot environment From: Brian Dolbec To: gentoo-catalyst@lists.gentoo.org Date: Tue, 31 Dec 2013 02:09:16 -0800 In-Reply-To: <739db1331359acd82717c3eed4bced3828ad7e8d.1388285607.git.wking@tremily.us> References: <739db1331359acd82717c3eed4bced3828ad7e8d.1388285607.git.wking@tremily.us> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-i7c52Vuu9k/JnVasEUa/" X-Mailer: Evolution 3.6.4 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 Mime-Version: 1.0 X-Archives-Salt: ea9d30c0-a303-4bfd-9943-2805732423f5 X-Archives-Hash: 0b1399882e7ad671a082db771b6bda09 --=-i7c52Vuu9k/JnVasEUa/ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, 2013-12-28 at 18:55 -0800, W. Trevor King wrote: > From: "W. Trevor King" >=20 > Avoid: >=20 > Running stage1-chroot.sh in chroot /var/tmp/catalyst/tmp/default/... > tput: No value for $TERM and no -T specified >=20 > 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]: >=20 > $ toe > ansi ansi/pc-term compatible with color > dumb 80-column dumb tty > linux linux console > ... >=20 > [1]: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.h= tml#tag_08_03 > [2]: http://www.gnu.org/software/ncurses/ > --- > modules/generic_target.py | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) >=20 > 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 * > =20 > 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=3Dmyspec > - self.env=3D{} > - self.env["PATH"]=3D"/bin:/sbin:/usr/bin:/usr/sbin" > + self.env =3D { > + 'PATH': '/bin:/sbin:/usr/bin:/usr/sbin', > + 'TERM': os.getenv('TERM', 'dumb'), > + } Hand applied to the 3.0 branch. Works like a charm :) Also will be pushed in the morning after a bit more testing which is in progress. --=-i7c52Vuu9k/JnVasEUa/ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQF8BAABCgBmBQJSwpfMXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ4Njg4RkQxQ0M3MUMxQzA0RUFFQTQyMzcy MjE0RDkwQTAxNEYxN0NCAAoJECIU2QoBTxfL4nwH/0Br2eRqFR+5XuwtuGQ8T16Y XVQsxX0ieBvsm35fmU7vAPY3ncqRylR3/OzYDcZZkZHnj2gXF+lmxsX4lePoSMp+ PG9gjdZ7LbFhjubI93ZK6mVqRL5u+8gpZw8sHsqM2Gdy2wzay7GHNIpheoFP3B4E CUq3mXNn9QrnqdsWsFhmVVeA0Fdzk+/I7y9m0ny2D+PcQxSZICIC06ZYUv43WgHM Gi7gxr8caAy+XVecXe3scQbqFJZKj5T2esy89yIMLgIhVWb7F3BzXci0BTXcMsBX +WrcR19JXJRK1G/LdISd+lIN6uPhDcrBo3HHn7qN2OYevcVR3jbicAmPwhqUXe4= =OXCc -----END PGP SIGNATURE----- --=-i7c52Vuu9k/JnVasEUa/--