Gentoo Archives: gentoo-commits

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