public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Brian Dolbec" <brian.dolbec@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/catalyst:2.X commit in: modules/
Date: Wed,  1 Jan 2014 14:47:27 +0000 (UTC)	[thread overview]
Message-ID: <1388587277.ee9f7930ef93c905cc116834a66295af1bc0569e.dol-sen@gentoo> (raw)

commit:     ee9f7930ef93c905cc116834a66295af1bc0569e
Author:     W. Trevor King <wking <AT> tremily <DOT> us>
AuthorDate: Fri Dec 27 02:40:10 2013 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> 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'),
+			}


             reply	other threads:[~2014-01-01 14:47 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-01 14:47 Brian Dolbec [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-01-19  3:19 [gentoo-commits] proj/catalyst:2.X commit in: modules/ Anthony G. Basile
2014-12-19  1:23 Jorge Manuel B. S. Vicetto
2014-12-06 17:37 Jorge Manuel B. S. Vicetto
2014-12-06 16:56 Jorge Manuel B. S. Vicetto
2014-05-16 19:15 Brian Dolbec
2014-04-05  7:36 Brian Dolbec
2014-03-24 16:08 Brian Dolbec
2014-03-24 16:08 Brian Dolbec
2014-01-01 22:03 Brian Dolbec
2014-01-01 21:40 Brian Dolbec
2013-12-31 23:27 Brian Dolbec
2013-12-31 20:15 Brian Dolbec

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1388587277.ee9f7930ef93c905cc116834a66295af1bc0569e.dol-sen@gentoo \
    --to=brian.dolbec@gmail.com \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox