diff options
-rw-r--r-- | man/emerge.1 | 4 | ||||
-rw-r--r-- | pym/_emerge/depgraph.py | 6 | ||||
-rw-r--r-- | pym/_emerge/help.py | 7 | ||||
-rw-r--r-- | pym/_emerge/main.py | 14 |
4 files changed, 29 insertions, 2 deletions
diff --git a/man/emerge.1 b/man/emerge.1 index 615ad5e82..b533857bb 100644 --- a/man/emerge.1 +++ b/man/emerge.1 @@ -249,6 +249,10 @@ it is interpreted as acceptance of the first choice. Note that the input buffer is not cleared prior to the prompt, so an accidental press of the "Enter" key at any time prior to the prompt will be interpreted as a choice!\fR .TP +.BR "\-\-binpkg\-respect\-use < y | n >" +Tells emerge to ignore binary packages if their use flags +don't match the current configuration. (default: \'n\') +.TP .BR "\-\-buildpkg " (\fB\-b\fR) Tells emerge to build binary packages for all ebuilds processed in addition to actually merging the packages. Useful for maintainers diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index c02e50ca4..61edea2a8 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -572,7 +572,8 @@ class depgraph(object): orig_use, orig_iuse, cur_use, cur_iuse): """Return a set of flags that trigger reinstallation, or None if there are no such flags.""" - if "--newuse" in self._frozen_config.myopts: + if "--newuse" in self._frozen_config.myopts or \ + "--binpkg-respect-use" in self._frozen_config.myopts: flags = set(orig_iuse.symmetric_difference( cur_iuse).difference(forced_flags)) flags.update(orig_iuse.intersection(orig_use).symmetric_difference( @@ -2155,7 +2156,8 @@ class depgraph(object): # reject the built package if necessary. if built and not installed and \ ("--newuse" in self._frozen_config.myopts or \ - "--reinstall" in self._frozen_config.myopts): + "--reinstall" in self._frozen_config.myopts or \ + "--binpkg-respect-use" in self._frozen_config.myopts): iuses = pkg.iuse.all old_use = pkg.use.enabled if myeb: diff --git a/pym/_emerge/help.py b/pym/_emerge/help.py index 34a4bda29..f78c2e0e0 100644 --- a/pym/_emerge/help.py +++ b/pym/_emerge/help.py @@ -249,6 +249,13 @@ def help(myopts, havecolor=1): print " to the prompt, so an accidental press of the \"Enter\" key at any" print " time prior to the prompt will be interpreted as a choice!" print + print " " + green("--binpkg-respect-use") + \ + " < " + turquoise("y") + " | " + turquoise("n") + " >" + desc = "Tells emerge to ignore binary packages if their use flags" + \ + " don't match the current configuration. (default: 'n')" + for line in wrap(desc, desc_width): + print desc_indent + line + print print " "+green("--buildpkg")+" ("+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" + \ diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py index a2c48554b..482679629 100644 --- a/pym/_emerge/main.py +++ b/pym/_emerge/main.py @@ -368,6 +368,7 @@ def insert_optional_args(args): jobs_opts = ("-j", "--jobs") default_arg_opts = { '--deselect' : ('n',), + '--binpkg-respect-use' : ('n', 'y',), '--root-deps' : ('rdeps',), } arg_stack = args[:] @@ -486,6 +487,14 @@ def parse_opts(tmpcmdline, silent=False): "type":"choice", "choices":["changed-use"] }, + + "--binpkg-respect-use": { + "help" : "discard binary packages if their use flags \ + don't match the current configuration", + "type" : "choice", + "choices" : ("True", "y", "n") + }, + "--root": { "help" : "specify the target root filesystem for merging packages", "action" : "store" @@ -527,6 +536,11 @@ def parse_opts(tmpcmdline, silent=False): if myoptions.deselect == "True": myoptions.deselect = True + if myoptions.binpkg_respect_use in ("y", "True",): + myoptions.binpkg_respect_use = True + else: + myoptions.binpkg_respect_use = None + if myoptions.root_deps == "True": myoptions.root_deps = True |