summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-10-09 23:19:06 +0000
committerZac Medico <zmedico@gentoo.org>2009-10-09 23:19:06 +0000
commit7b3a35025e7048a2be3ab0bcb9dca597a329908a (patch)
tree5d17f6228a1a6769ca134b61c8d6301cca0553cc
parent9ca46474139b131a2c2e416880f65ae9e3f99fc5 (diff)
downloadportage-7b3a35025e7048a2be3ab0bcb9dca597a329908a.tar.gz
portage-7b3a35025e7048a2be3ab0bcb9dca597a329908a.tar.bz2
portage-7b3a35025e7048a2be3ab0bcb9dca597a329908a.zip
Add --changed-use as an alias for --reinstall=changed-use. Thanks to
Jeremy Olexa <darkside@g.o> for the suggestion. svn path=/main/trunk/; revision=14533
-rw-r--r--man/emerge.13
-rw-r--r--pym/_emerge/help.py5
-rw-r--r--pym/_emerge/main.py5
3 files changed, 13 insertions, 0 deletions
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