Add support for emerge --buildpkg=n.
authorZac Medico <zmedico@gentoo.org>
Sat, 9 Oct 2010 09:05:25 +0000 (02:05 -0700)
committerZac Medico <zmedico@gentoo.org>
Tue, 12 Oct 2010 01:40:11 +0000 (18:40 -0700)
man/emerge.1
pym/_emerge/help.py
pym/_emerge/main.py

index cce480fad0cab1370df6a477790e94c51678372b..b065a5a08dd64657f01c65b224a7ffb97a1ab7b2 100644 (file)
@@ -303,7 +303,7 @@ unsatisfied dependency (default: \'5\').
 Tells emerge to ignore binary packages if their use flags
 don't match the current configuration. (default: \'n\')
 .TP
-.BR "\-\-buildpkg " (\fB\-b\fR)
+.BR "\-\-buildpkg[=n] " (\fB\-b\fR)
 Tells emerge to build binary packages for all ebuilds processed in
 addition to actually merging the packages.  Useful for maintainers
 or if you administrate multiple Gentoo Linux systems (build once,
index ce494ffd5107aa15fc52c0ebba3a38f19b2c922f..4533cfba0c7dd4bbf50b3bdf8265224df7c90444 100644 (file)
@@ -325,7 +325,7 @@ def help(myopts, havecolor=1):
                for line in wrap(desc, desc_width):
                        print(desc_indent + line)
                print()
-               print("       "+green("--buildpkg")+" ("+green("-b")+" short option)")
+               print("       "+green("--buildpkg") + "[=%s]" % turquoise("n") + " ("+green("-b")+" short option)")
                desc = "Tells emerge to build binary packages for all ebuilds processed in" + \
                        " addition to actually merging the packages. Useful for maintainers" + \
                        " or if you administrate multiple Gentoo Linux systems (build once," + \
index 765164efd6b06af9077b01fe799f8f32860e657f..3181df3e7a55d0c5982774db8455a5fe9a717b25 100644 (file)
@@ -52,7 +52,7 @@ if sys.hexversion >= 0x3000000:
 options=[
 "--ask",          "--alphabetical",
 "--ask-enter-invalid",
-"--buildpkg",     "--buildpkgonly",
+"--buildpkgonly",
 "--changed-use",
 "--changelog",    "--columns",
 "--debug",
@@ -80,7 +80,7 @@ options=[
 shortmapping={
 "1":"--oneshot",
 "a":"--ask",
-"b":"--buildpkg",  "B":"--buildpkgonly",
+"B":"--buildpkgonly",
 "c":"--depclean",
 "C":"--unmerge",
 "d":"--debug",
@@ -395,6 +395,7 @@ def insert_optional_args(args):
 
        default_arg_opts = {
                '--autounmask'           : ('n',),
+               '--buildpkg'             : ('n',),
                '--complete-graph' : ('n',),
                '--deep'       : valid_integers,
                '--deselect'   : ('n',),
@@ -544,6 +545,13 @@ def parse_opts(tmpcmdline, silent=False):
                        "action" : "store"
                },
 
+               "--buildpkg": {
+                       "shortopt" : "-b",
+                       "help"     : "build binary packages",
+                       "type"     : "choice",
+                       "choices"  : ("True", "n")
+               },
+
                "--config-root": {
                        "help":"specify the location for portage configuration files",
                        "action":"store"
@@ -755,6 +763,11 @@ def parse_opts(tmpcmdline, silent=False):
        if myoptions.autounmask in ("True",):
                myoptions.autounmask = True
 
+       if myoptions.buildpkg in ("True",):
+               myoptions.buildpkg = True
+       else:
+               myoptions.buildpkg = None
+
        if myoptions.changed_use is not False:
                myoptions.reinstall = "changed-use"
                myoptions.changed_use = False