1 |
Author: zmedico |
2 |
Date: 2010-02-18 21:50:53 +0000 (Thu, 18 Feb 2010) |
3 |
New Revision: 15372 |
4 |
|
5 |
Modified: |
6 |
main/trunk/man/emerge.1 |
7 |
main/trunk/pym/_emerge/create_depgraph_params.py |
8 |
main/trunk/pym/_emerge/depgraph.py |
9 |
main/trunk/pym/_emerge/help.py |
10 |
main/trunk/pym/_emerge/main.py |
11 |
Log: |
12 |
Only enable --rebuilt-binaries automatically if --update and --deep are also |
13 |
enabled. |
14 |
|
15 |
|
16 |
Modified: main/trunk/man/emerge.1 |
17 |
=================================================================== |
18 |
--- main/trunk/man/emerge.1 2010-02-18 16:27:49 UTC (rev 15371) |
19 |
+++ main/trunk/man/emerge.1 2010-02-18 21:50:53 UTC (rev 15372) |
20 |
@@ -481,8 +481,9 @@ |
21 |
Replace installed packages with binary packages that have |
22 |
been rebuilt. Rebuilds are detected by comparison of |
23 |
BUILD_TIME package metadata. This option is enabled |
24 |
-automatically when using binary packages (see |
25 |
-\fB\-\-usepkg\fR and \fB\-\-getbinpkg\fR). |
26 |
+automatically when using binary packages |
27 |
+(\fB\-\-usepkg\fR or \fB\-\-getbinpkg\fR) together with |
28 |
+\fB\-\-update\fR and \fB\-\-deep\fR. |
29 |
.TP |
30 |
.BR "\-\-reinstall changed\-use" |
31 |
Tells emerge to include installed packages where USE flags have |
32 |
|
33 |
Modified: main/trunk/pym/_emerge/create_depgraph_params.py |
34 |
=================================================================== |
35 |
--- main/trunk/pym/_emerge/create_depgraph_params.py 2010-02-18 16:27:49 UTC (rev 15371) |
36 |
+++ main/trunk/pym/_emerge/create_depgraph_params.py 2010-02-18 21:50:53 UTC (rev 15372) |
37 |
@@ -15,6 +15,7 @@ |
38 |
# empty: pretend nothing is merged |
39 |
# complete: completely account for all known dependencies |
40 |
# remove: build graph for use in removing packages |
41 |
+ # rebuilt_binaries: replace installed packages with rebuilt binaries |
42 |
myparams = {"recurse" : True} |
43 |
|
44 |
if myaction == "remove": |
45 |
@@ -37,6 +38,15 @@ |
46 |
myparams["deep"] = myopts["--deep"] |
47 |
if "--complete-graph" in myopts: |
48 |
myparams["complete"] = True |
49 |
+ |
50 |
+ rebuilt_binaries = myopts.get('--rebuilt-binaries') |
51 |
+ if rebuilt_binaries is True or \ |
52 |
+ rebuilt_binaries != 'n' and \ |
53 |
+ '--usepkg' in myopts and \ |
54 |
+ myopts.get('--deep') is True and \ |
55 |
+ '--update' in myopts: |
56 |
+ myparams['rebuilt_binaries'] = True |
57 |
+ |
58 |
if myopts.get("--selective") == "n": |
59 |
# --selective=n can be used to remove selective |
60 |
# behavior that may have been implied by some |
61 |
|
62 |
Modified: main/trunk/pym/_emerge/depgraph.py |
63 |
=================================================================== |
64 |
--- main/trunk/pym/_emerge/depgraph.py 2010-02-18 16:27:49 UTC (rev 15371) |
65 |
+++ main/trunk/pym/_emerge/depgraph.py 2010-02-18 21:50:53 UTC (rev 15372) |
66 |
@@ -2396,9 +2396,7 @@ |
67 |
atom_set = InternalPackageSet(initial_atoms=(atom,)) |
68 |
existing_node = None |
69 |
myeb = None |
70 |
- usepkg = "--usepkg" in self._frozen_config.myopts |
71 |
- rebuilt_binaries = usepkg and \ |
72 |
- self._frozen_config.myopts.get('--rebuilt-binaries') != 'n' |
73 |
+ rebuilt_binaries = 'rebuilt_binaries' in self._dynamic_config.myparams |
74 |
usepkgonly = "--usepkgonly" in self._frozen_config.myopts |
75 |
empty = "empty" in self._dynamic_config.myparams |
76 |
selective = "selective" in self._dynamic_config.myparams |
77 |
|
78 |
Modified: main/trunk/pym/_emerge/help.py |
79 |
=================================================================== |
80 |
--- main/trunk/pym/_emerge/help.py 2010-02-18 16:27:49 UTC (rev 15371) |
81 |
+++ main/trunk/pym/_emerge/help.py 2010-02-18 21:50:53 UTC (rev 15372) |
82 |
@@ -510,8 +510,9 @@ |
83 |
desc = "Replace installed packages with binary packages that have " + \ |
84 |
"been rebuilt. Rebuilds are detected by comparison of " + \ |
85 |
"BUILD_TIME package metadata. This option is enabled " + \ |
86 |
- "automatically when using binary packages (see " + \ |
87 |
- "--usepkg and --getbinpkg)." |
88 |
+ "automatically when using binary packages " + \ |
89 |
+ "(--usepkg or --getbinpkg) together with " + \ |
90 |
+ "--update and --deep." |
91 |
for line in wrap(desc, desc_width): |
92 |
print(desc_indent + line) |
93 |
print() |
94 |
|
95 |
Modified: main/trunk/pym/_emerge/main.py |
96 |
=================================================================== |
97 |
--- main/trunk/pym/_emerge/main.py 2010-02-18 16:27:49 UTC (rev 15371) |
98 |
+++ main/trunk/pym/_emerge/main.py 2010-02-18 21:50:53 UTC (rev 15372) |
99 |
@@ -741,8 +741,7 @@ |
100 |
myoptions.keep_going = None |
101 |
|
102 |
if myoptions.rebuilt_binaries in ("True",): |
103 |
- # The depgraph will enable this by default unless 'n' is specified. |
104 |
- myoptions.rebuilt_binaries = None |
105 |
+ myoptions.rebuilt_binaries = True |
106 |
|
107 |
if myoptions.root_deps == "True": |
108 |
myoptions.root_deps = True |