From: Zac Medico Date: Sat, 9 Oct 2010 09:05:25 +0000 (-0700) Subject: Add support for emerge --buildpkg=n. X-Git-Tag: v2.2_rc92~10 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6619072006bd7461fe090656b22d6b4ee7bde3ef;p=portage.git Add support for emerge --buildpkg=n. --- diff --git a/man/emerge.1 b/man/emerge.1 index 45a7c8486..ae1bd4fe3 100644 --- a/man/emerge.1 +++ b/man/emerge.1 @@ -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, diff --git a/pym/_emerge/help.py b/pym/_emerge/help.py index ce494ffd5..4533cfba0 100644 --- a/pym/_emerge/help.py +++ b/pym/_emerge/help.py @@ -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," + \ diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py index 71ad6b42c..0fa41b154 100644 --- a/pym/_emerge/main.py +++ b/pym/_emerge/main.py @@ -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