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>
Sat, 9 Oct 2010 09:05:25 +0000 (02:05 -0700)
man/emerge.1
pym/_emerge/help.py
pym/_emerge/main.py

index 45a7c8486f03952a318641a8a6aeb94e7423857e..ae1bd4fe36bbc14b449a82ee1ffd95aa0aebcf8a 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 71ad6b42c49309b8e48a6d91151ee8aacfec6258..0fa41b154fa4f80cdaf3a99de2e7a8f4186be70a 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