Add --changed-use as an alias for --reinstall=changed-use. Thanks to
authorZac Medico <zmedico@gentoo.org>
Fri, 9 Oct 2009 23:19:06 +0000 (23:19 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 9 Oct 2009 23:19:06 +0000 (23:19 -0000)
Jeremy Olexa <darkside@g.o> for the suggestion.

svn path=/main/trunk/; revision=14533

man/emerge.1
pym/_emerge/help.py
pym/_emerge/main.py

index 12be26e7cf511936feff67f7d08cd40e1ede322e..6465b58d0a11eb8b15b0525cb74c293926ccb90b 100644 (file)
@@ -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.
index 312952295b432e37444955d03c589d8448e6c544..e2c7a80ea8b8fd090375302457d6f80c88ef8f79 100644 (file)
@@ -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.")
index 2eedee3418c751f69a217520b7efee6dd08cb292..7b4c07fcf861c73ca8efb71c2ae173d2e4cf5673 100644 (file)
@@ -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