Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r13245 - in main/trunk: man pym/_emerge
Date: Sun, 29 Mar 2009 19:15:05
Message-Id: E1Lo0TH-0002wC-EF@stork.gentoo.org
1 Author: zmedico
2 Date: 2009-03-29 19:15:01 +0000 (Sun, 29 Mar 2009)
3 New Revision: 13245
4
5 Modified:
6 main/trunk/man/emerge.1
7 main/trunk/pym/_emerge/__init__.py
8 main/trunk/pym/_emerge/help.py
9 Log:
10 Add support for --rdeps-only and --root-deps options which are useful in
11 combination with $ROOT. Thanks to Ned Ludd <solar@g.o> for the initial
12 patch.
13
14
15 Modified: main/trunk/man/emerge.1
16 ===================================================================
17 --- main/trunk/man/emerge.1 2009-03-29 11:24:46 UTC (rev 13244)
18 +++ main/trunk/man/emerge.1 2009-03-29 19:15:01 UTC (rev 13245)
19 @@ -414,12 +414,26 @@
20 Results may vary, but the general outcome is a reduced or condensed
21 output from portage's displays.
22 .TP
23 +.BR "\-\-rdeps\-only"
24 +Discard all build\-time dependencies. This option is commonly used together
25 +with \fBROOT\fR and it should not be enabled under normal circumstances. For
26 +currently supported \fBEAPI\fR values, the dependencies specified in the
27 +\fBDEPEND\fR variable are discarded. However, behavior may change for new
28 +\fBEAPI\fRs when related extensions are added in the future.
29 +.TP
30 .BR "\-\-reinstall changed\-use"
31 Tells emerge to include installed packages where USE flags have
32 changed since installation. Unlike \fB\-\-newuse\fR, this option does
33 not trigger reinstallation when flags that the user has not
34 enabled are added or removed.
35 .TP
36 +.BR "\-\-root\-deps"
37 +Install build\-time dependencies to \fBROOT\fR instead of /. This option
38 +should not be enabled under normal circumstances. For currently supported
39 +\fBEAPI\fR values, the dependencies specified in the \fBDEPEND\fR variable
40 +are used. However, behavior may change for new
41 +\fBEAPI\fRs when related extensions are added in the future.
42 +.TP
43 .BR "\-\-skipfirst"
44 This option is only valid when used with \fB\-\-resume\fR. It removes the
45 first package in the resume list. Dependencies are recalculated for
46
47 Modified: main/trunk/pym/_emerge/__init__.py
48 ===================================================================
49 --- main/trunk/pym/_emerge/__init__.py 2009-03-29 11:24:46 UTC (rev 13244)
50 +++ main/trunk/pym/_emerge/__init__.py 2009-03-29 19:15:01 UTC (rev 13245)
51 @@ -207,6 +207,7 @@
52 "--nospinner", "--oneshot",
53 "--onlydeps", "--pretend",
54 "--quiet", "--resume",
55 +"--rdeps-only", "--root-deps",
56 "--searchdesc", "--selective",
57 "--skipfirst",
58 "--tree",
59 @@ -5275,8 +5276,16 @@
60 if removal_action and self.myopts.get("--with-bdeps", "y") == "n":
61 edepend["DEPEND"] = ""
62
63 + bdeps_root = "/"
64 + if self.target_root != "/":
65 + if "--root-deps" in self.myopts:
66 + bdeps_root = myroot
67 + if "--rdeps-only" in self.myopts:
68 + bdeps_root = "/"
69 + edepend["DEPEND"] = ""
70 +
71 deps = (
72 - ("/", edepend["DEPEND"],
73 + (bdeps_root, edepend["DEPEND"],
74 self._priority(buildtime=(not bdeps_optional),
75 optional=bdeps_optional)),
76 (myroot, edepend["RDEPEND"], self._priority(runtime=True)),
77
78 Modified: main/trunk/pym/_emerge/help.py
79 ===================================================================
80 --- main/trunk/pym/_emerge/help.py 2009-03-29 11:24:46 UTC (rev 13244)
81 +++ main/trunk/pym/_emerge/help.py 2009-03-29 19:15:01 UTC (rev 13245)
82 @@ -404,12 +404,30 @@
83 print " Effects vary, but the general outcome is a reduced or condensed"
84 print " output from portage's displays."
85 print
86 + print " "+green("--rdeps-only")
87 + desc = "Discard all build-time dependencies. This option is commonly used together " + \
88 + "with ROOT and it should not be enabled under normal circumstances. For " + \
89 + "currently supported EAPI values, the dependencies specified in the " + \
90 + "DEPEND variable are discarded. However, behavior may change for new " + \
91 + "EAPIs when related extensions are added in the future."
92 + for line in wrap(desc, desc_width):
93 + print desc_indent + line
94 + print
95 print " "+green("--reinstall ") + turquoise("changed-use")
96 print " Tells emerge to include installed packages where USE flags have"
97 print " changed since installation. Unlike --newuse, this option does"
98 print " not trigger reinstallation when flags that the user has not"
99 print " enabled are added or removed."
100 print
101 + print " "+green("--root-deps")
102 + desc = "Install build-time dependencies to ROOT instead of /. This option " + \
103 + "should not be enabled under normal circumstances. For currently supported " + \
104 + "EAPI values, the dependencies specified in the DEPEND variable " + \
105 + "are used. However, behavior may change for new " + \
106 + "EAPIs when related extensions are added in the future."
107 + for line in wrap(desc, desc_width):
108 + print desc_indent + line
109 + print
110 print " "+green("--skipfirst")
111 desc = "This option is only valid when " + \
112 "used with --resume. It removes the " + \