diff options
author | David James <davidjames@chromium.org> | 2011-05-03 23:32:05 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2011-05-04 10:02:14 -0700 |
commit | e4297ca1075342ec89e089802cd25ae0817f3d5b (patch) | |
tree | d71364c0c52c6b1a524fbac45c279b6cb682d86e /pym/_emerge/main.py | |
parent | fbd402cd32ab8dad37ac28cd63f8700e8f811a3d (diff) | |
download | portage-e4297ca1075342ec89e089802cd25ae0817f3d5b.tar.gz portage-e4297ca1075342ec89e089802cd25ae0817f3d5b.tar.bz2 portage-e4297ca1075342ec89e089802cd25ae0817f3d5b.zip |
emerge: replace --rebuild with finer grained opts
Replace --rebuild option with --rebuild-if-* options.
--rebuild-if-new-rev [ y | n ]
Rebuild packages when dependencies that are used at both build-time and
run-time are built, if the dependency is not already installed with the
same version and revision.
--rebuild-if-new-ver [ y | n ]
Rebuild packages when dependencies that are used at both build-time and
run-time are built, if the dependency is not already installed with the
same version. Revision numbers are ignored.
--rebuild-if-unbuilt [ y | n ]
Rebuild packages when dependencies that are used at both build-time and
run-time are built.
Change-Id: Ia50c1702bfe1b98a8d1891740e7bbb045921a905
Review URL: http://gerrit.chromium.org/gerrit/280
Diffstat (limited to 'pym/_emerge/main.py')
-rw-r--r-- | pym/_emerge/main.py | 47 |
1 files changed, 40 insertions, 7 deletions
diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py index 1e06ec157..92db36ec4 100644 --- a/pym/_emerge/main.py +++ b/pym/_emerge/main.py @@ -440,7 +440,9 @@ def insert_optional_args(args): '--package-moves' : y_or_n, '--quiet' : y_or_n, '--quiet-build' : y_or_n, - '--rebuild' : y_or_n, + '--rebuild-if-new-rev' : y_or_n, + '--rebuild-if-new-ver' : y_or_n, + '--rebuild-if-unbuilt' : y_or_n, '--rebuilt-binaries' : y_or_n, '--root-deps' : ('rdeps',), '--select' : y_or_n, @@ -777,9 +779,27 @@ def parse_opts(tmpcmdline, silent=False): "choices" : true_y_or_n }, - "--rebuild": { + "--rebuild-if-new-rev": { "help" : "Rebuild packages when dependencies that are " + \ - "used at both build-time and run-time are upgraded.", + "used at both build-time and run-time are built, " + \ + "if the dependency is not already installed with the " + \ + "same version and revision.", + "type" : "choice", + "choices" : true_y_or_n + }, + + "--rebuild-if-new-ver": { + "help" : "Rebuild packages when dependencies that are " + \ + "used at both build-time and run-time are built, " + \ + "if the dependency is not already installed with the " + \ + "same version. Revision numbers are ignored.", + "type" : "choice", + "choices" : true_y_or_n + }, + + "--rebuild-if-unbuilt": { + "help" : "Rebuild packages when dependencies that are " + \ + "used at both build-time and run-time are built.", "type" : "choice", "choices" : true_y_or_n }, @@ -913,7 +933,7 @@ def parse_opts(tmpcmdline, silent=False): else: myoptions.binpkg_respect_use = None - if myoptions.complete_graph in true_y or myoptions.rebuild in true_y: + if myoptions.complete_graph in true_y: myoptions.complete_graph = True else: myoptions.complete_graph = None @@ -989,10 +1009,23 @@ def parse_opts(tmpcmdline, silent=False): else: myoptions.quiet_build = None - if myoptions.rebuild in true_y: - myoptions.rebuild = True + if myoptions.rebuild_if_new_ver in true_y: + myoptions.rebuild_if_new_ver = True + else: + myoptions.rebuild_if_new_ver = None + + if myoptions.rebuild_if_new_rev in true_y: + myoptions.rebuild_if_new_rev = True + myoptions.rebuild_if_new_ver = None + else: + myoptions.rebuild_if_new_rev = None + + if myoptions.rebuild_if_unbuilt in true_y: + myoptions.rebuild_if_unbuilt = True + myoptions.rebuild_if_new_rev = None + myoptions.rebuild_if_new_ver = None else: - myoptions.rebuild = None + myoptions.rebuild_if_unbuilt = None if myoptions.rebuilt_binaries in true_y: myoptions.rebuilt_binaries = True |