Gentoo Archives: gentoo-dev

From: Kristian Benoit <kbenoit@×××××××.com>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] [patch] config interactiveness fix.
Date: Fri, 15 Jul 2005 01:17:05
Message-Id: 1121390020.5971.119.camel@localhost
1 Actually, when executing pkg_config with "ebuild some/ebuild.ebuild
2 config", the stdin/stdout are broken cause we are not writing to a
3 terminal.
4
5 I fixed it with this patch:
6
7 diff -uNpr portage-2.0.51.19/pym/portage.py
8 portage-2.0.51.19-config/pym/portage.py
9 --- portage-2.0.51.19/pym/portage.py 2005-03-03 11:45:01.000000000
10 -0500
11 +++ portage-2.0.51.19-config/pym/portage.py 2005-07-14
12 20:48:36.000000000 -0400
13 @@ -2533,7 +2533,7 @@ def doebuild(myebuild,mydo,myroot,mysett
14 return
15 unmerge(mysettings["CATEGORY"],mysettings["PF"],myroot,mysettings)
16
17 # if any of these are being called, handle them -- running them
18 out of the sandbox -- and stop now.
19 - if mydo=="clean":
20 + if mydo in ["clean","config"]:
21 logfile=None
22 if mydo in ["help","clean","setup"]:
23 return spawn(EBUILD_SH_BINARY+"
24 "+mydo,mysettings,debug=debug,free=1,logfile=logfile)
25
26
27 The only bad side is that we loose the log for that part. But it might
28 not be loggable anyway. As Jason Stubbs said:
29
30 "Actually, I promote interactive code in pkg_config(). There's no
31 standard as to what it will do, ..."
32
33 Kristian
34
35
36 --
37 gentoo-dev@g.o mailing list