From: Zac Medico Date: Fri, 9 Oct 2009 23:19:06 +0000 (-0000) Subject: Add --changed-use as an alias for --reinstall=changed-use. Thanks to X-Git-Tag: v2.2_rc45~9 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7b3a35025e7048a2be3ab0bcb9dca597a329908a;p=portage.git Add --changed-use as an alias for --reinstall=changed-use. Thanks to Jeremy Olexa for the suggestion. svn path=/main/trunk/; revision=14533 --- diff --git a/man/emerge.1 b/man/emerge.1 index 12be26e7c..6465b58d0 100644 --- a/man/emerge.1 +++ b/man/emerge.1 @@ -282,6 +282,9 @@ Creates binary packages for all ebuilds processed without actually merging the packages. This comes with the caveat that all build-time dependencies must already be emerged on the system. .TP +.BR "\-\-changed\-use" +This is an alias for \fB\-\-reinstall=changed\-use\fR. +.TP .BR "\-\-changelog " (\fB\-l\fR) Use this in conjunction with the \fB\-\-pretend\fR option. This will show the ChangeLog entries for all the packages that will be upgraded. diff --git a/pym/_emerge/help.py b/pym/_emerge/help.py index 312952295..e2c7a80ea 100644 --- a/pym/_emerge/help.py +++ b/pym/_emerge/help.py @@ -291,6 +291,11 @@ def help(myopts, havecolor=1): print(" must not exist for the desired package as they cannot be used if") print(" they do not exist on the system.") print() + print(" " + green("--changed-use")) + desc = "This is an alias for --reinstall=changed-use." + for line in wrap(desc, desc_width): + print(desc_indent + line) + print() print(" "+green("--changelog")+" ("+green("-l")+" short option)") print(" When pretending, also display the ChangeLog entries for packages") print(" that will be upgraded.") diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py index 2eedee341..7b4c07fcf 100644 --- a/pym/_emerge/main.py +++ b/pym/_emerge/main.py @@ -50,6 +50,7 @@ if sys.hexversion >= 0x3000000: options=[ "--ask", "--alphabetical", "--buildpkg", "--buildpkgonly", +"--changed-use", "--changelog", "--columns", "--debug", "--digest", @@ -665,6 +666,10 @@ def parse_opts(tmpcmdline, silent=False): myoptions, myargs = parser.parse_args(args=tmpcmdline) + if myoptions.changed_use is not None: + myoptions.reinstall = "changed-use" + myoptions.changed_use = None + if myoptions.deselect == "True": myoptions.deselect = True