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:pending commit in: catalyst/targets/
Date: Sun,  2 Mar 2014 16:07:43 +0000 (UTC)	[thread overview]
Message-ID: <1393776427.db605e682e255c9331a9ead62208e2bf00e7f14a.dol-sen@gentoo> (raw)

commit:     db605e682e255c9331a9ead62208e2bf00e7f14a
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: 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'),
+			}


             reply	other threads:[~2014-03-02 16:07 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-02 16:07 Brian Dolbec [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-11-29 17:20 [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/ Brian Dolbec
2017-11-22 15:52 ` [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2017-03-16 22:57 Brian Dolbec
2017-03-11  7:07 Brian Dolbec
2017-03-10 18:38 Brian Dolbec
2017-03-09 10:02 Brian Dolbec
2017-03-09  9:39 Brian Dolbec
2015-11-12 16:24 [gentoo-commits] proj/catalyst:master " Brian Dolbec
2015-11-21  1:33 ` [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2015-02-26 20:12 [gentoo-commits] proj/catalyst:master " Brian Dolbec
2015-01-01  5:59 ` [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2015-02-26 19:25 Brian Dolbec
2015-01-01  5:59 Brian Dolbec
2015-01-01  5:59 Brian Dolbec
2014-09-11  3:08 Brian Dolbec
2014-09-02 23:10 Brian Dolbec
2014-09-02  7:12 Brian Dolbec
2014-09-02  5:54 Brian Dolbec
2014-09-02  5:54 Brian Dolbec
2014-09-02  2:43 Brian Dolbec
2014-09-02  2:43 Brian Dolbec
2014-06-15 14:56 Brian Dolbec
2014-06-15 14:56 Brian Dolbec
2014-06-14  5:58 Brian Dolbec
2014-06-14  5:58 Brian Dolbec
2014-05-05 19:17 [gentoo-commits] proj/catalyst:master " Brian Dolbec
2014-05-05 19:15 ` [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2014-04-02 20:09 Brian Dolbec
2014-04-02 20:09 Brian Dolbec
2014-04-02 20:09 Brian Dolbec
2014-03-22 22:25 Brian Dolbec
2014-03-22 22:25 Brian Dolbec
2014-03-22 22:25 Brian Dolbec
2014-03-02 16:07 Brian Dolbec
2014-03-02 16:07 Brian Dolbec
2014-02-22 21:48 Brian Dolbec
2014-02-22 21:48 Brian Dolbec
2014-02-22 21:48 Brian Dolbec
2014-02-22 18:43 Brian Dolbec
2014-02-22 18:43 Brian Dolbec
2014-02-22 18:43 Brian Dolbec
2014-01-22 15:52 Brian Dolbec
2014-01-22 15:52 Brian Dolbec
2014-01-22 15:52 Brian Dolbec
2014-01-03  6:41 Brian Dolbec
2014-01-03  6:12 Brian Dolbec
2014-01-03  5:03 Brian Dolbec
2014-01-03  5:03 Brian Dolbec
2014-01-03  5:03 Brian Dolbec
2014-01-03  5:03 Brian Dolbec
2014-01-03  5:03 Brian Dolbec
2014-01-02  0:04 Brian Dolbec
2014-01-02  0:04 Brian Dolbec
2014-01-02  0:04 Brian Dolbec
2014-01-02  0:04 Brian Dolbec
2014-01-02  0:04 Brian Dolbec
2014-01-01 22:27 Brian Dolbec
2014-01-01 22:13 Brian Dolbec
2013-12-31 18:56 Anthony G. Basile
2013-12-31 18:14 Brian Dolbec
2013-12-31 18:14 Brian Dolbec
2013-12-31 18:14 Brian Dolbec
2013-12-31  4:48 Brian Dolbec
2013-12-31  4:48 Brian Dolbec
2013-12-31  4:48 Brian Dolbec
2013-12-31  4:39 Brian Dolbec
2013-12-31  4:39 Brian Dolbec
2013-12-31  4:39 Brian Dolbec
2013-12-31  4:22 Brian Dolbec
2013-12-31  4:22 Brian Dolbec
2013-12-31  4:22 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=1393776427.db605e682e255c9331a9ead62208e2bf00e7f14a.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