Index: pym/_emerge/depgraph.py =================================================================== --- pym/_emerge/depgraph.py (revision 13801) +++ pym/_emerge/depgraph.py (working copy) @@ -572,7 +572,8 @@ 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 \ + self._frozen_config.myopts["--binpkg-respect-use"]: flags = set(orig_iuse.symmetric_difference( cur_iuse).difference(forced_flags)) flags.update(orig_iuse.intersection(orig_use).symmetric_difference( @@ -2155,7 +2156,8 @@ # 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 \ + self._frozen_config.myopts["--binpkg-respect-use"]): iuses = pkg.iuse.all old_use = pkg.use.enabled if myeb: Index: pym/_emerge/main.py =================================================================== --- pym/_emerge/main.py (revision 13801) +++ pym/_emerge/main.py (working copy) @@ -368,6 +368,7 @@ jobs_opts = ("-j", "--jobs") default_arg_opts = { '--deselect' : ('n',), + '--binpkg-respect-use' : ('n',), '--root-deps' : ('rdeps',), } arg_stack = args[:] @@ -486,6 +487,14 @@ "type":"choice", "choices":["changed-use"] }, + + "--binpkg-respect-use": { + "help" : "discard binary packages if theier use flags \ + don't match the current configuration", + "type" : "choice", + "choices" : ("y", "n") + }, + "--root": { "help" : "specify the target root filesystem for merging packages", "action" : "store" @@ -527,6 +536,11 @@ if myoptions.deselect == "True": myoptions.deselect = True + if myoptions.binpkg_respect_use == "y": + myoptions.binpkg_respect_use = True + else: + myoptions.binpkg_respect_use = False + if myoptions.root_deps == "True": myoptions.root_deps = True Index: man/emerge.1 =================================================================== --- man/emerge.1 (revision 13801) +++ man/emerge.1 (working copy) @@ -249,6 +249,10 @@ 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