summaryrefslogtreecommitdiffstats
path: root/pym/_emerge/main.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-02-18 07:07:41 +0000
committerZac Medico <zmedico@gentoo.org>2010-02-18 07:07:41 +0000
commit744b5b12943ba4dbe27a694250c8a5d390b6e5bc (patch)
tree097b22b5d402975d7745b39f1c25bd80262238c4 /pym/_emerge/main.py
parentb4a4c9af72e036d8a0b2698c823cdf2979315369 (diff)
downloadportage-744b5b12943ba4dbe27a694250c8a5d390b6e5bc.tar.gz
portage-744b5b12943ba4dbe27a694250c8a5d390b6e5bc.tar.bz2
portage-744b5b12943ba4dbe27a694250c8a5d390b6e5bc.zip
Add a --rebuilt-binaries[=n] option, causing automatic replacement of
installed packages with binary packages that have been rebuilt. Rebuilds are detected by comparison of BUILD_TIME package metadata. This option is enabled automatically when using binary packages, so rebuilt binaries are installed with a user's typical update command. This isn't possible with the existing @rebuild-binaries package set since that only works with --selective=n and therefore can't be used with a typical world update. The package set framework should support this type of behavior sometime in the future. svn path=/main/trunk/; revision=15364
Diffstat (limited to 'pym/_emerge/main.py')
-rw-r--r--pym/_emerge/main.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py
index f96654eea..a92ae0351 100644
--- a/pym/_emerge/main.py
+++ b/pym/_emerge/main.py
@@ -395,6 +395,7 @@ def insert_optional_args(args):
'--getbinpkgonly' : ('n',),
'--jobs' : valid_integers,
'--keep-going' : ('n',),
+ '--rebuilt-binaries' : ('n',),
'--root-deps' : ('rdeps',),
'--select' : ('n',),
'--selective' : ('n',),
@@ -620,6 +621,13 @@ def parse_opts(tmpcmdline, silent=False):
"choices" : ("True", "n")
},
+ "--rebuilt-binaries": {
+ "help" : "replace installed packages with binary " + \
+ "packages that have been rebuilt",
+ "type" : "choice",
+ "choices" : ("True", "n")
+ },
+
"--root": {
"help" : "specify the target root filesystem for merging packages",
"action" : "store"
@@ -732,6 +740,10 @@ def parse_opts(tmpcmdline, silent=False):
else:
myoptions.keep_going = None
+ if myoptions.rebuilt_binaries in ("True",):
+ # The depgraph will enable this by default unless 'n' is specified.
+ myoptions.rebuilt_binaries = None
+
if myoptions.root_deps == "True":
myoptions.root_deps = True