diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-03-02 20:26:08 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-03-02 20:26:08 +0000 |
commit | 16891c2aee866c2074198cc50b12254f040e9be1 (patch) | |
tree | 20501d5b33595cef4818ef14a135a907a19289cd /pym/_emerge/main.py | |
parent | 6cc62aaae04c5032fcfe06b87b96d6e94228a982 (diff) | |
download | portage-16891c2aee866c2074198cc50b12254f040e9be1.tar.gz portage-16891c2aee866c2074198cc50b12254f040e9be1.tar.bz2 portage-16891c2aee866c2074198cc50b12254f040e9be1.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. (trunk r15364)
svn path=/main/branches/2.1.7/; revision=15591
Diffstat (limited to 'pym/_emerge/main.py')
-rw-r--r-- | pym/_emerge/main.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py index b7cc8f7cc..7d1c2c7e2 100644 --- a/pym/_emerge/main.py +++ b/pym/_emerge/main.py @@ -317,6 +317,7 @@ def insert_optional_args(args): '--getbinpkgonly' : ('n',), '--jobs' : valid_integers, '--keep-going' : ('n',), + '--rebuilt-binaries' : ('n',), '--root-deps' : ('rdeps',), '--select' : ('n',), '--selective' : ('n',), @@ -542,6 +543,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" @@ -654,6 +662,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 |