'--update' in myopts:
myparams['rebuilt_binaries'] = True
+ binpkg_respect_use = myopts.get('--binpkg-respect-use')
+ if binpkg_respect_use is not None:
+ myparams['binpkg_respect_use'] = binpkg_respect_use
+ elif '--usepkgonly' not in myopts and \
+ myopts.get('--rebuilt-binaries') is not True:
+ # If --binpkg-respect-use is not explicitly specified, we enable
+ # the behavior automatically (like requested in bug #297549), as
+ # long as it doesn't strongly conflict with other options that
+ # have been specified.
+ myparams['binpkg_respect_use'] = 'auto'
+
if myopts.get("--selective") == "n":
# --selective=n can be used to remove selective
# behavior that may have been implied by some
"""
if not self._dynamic_config.ignored_binaries \
or '--quiet' in self._frozen_config.myopts \
- or "--binpkg-respect-use" in self._frozen_config.myopts:
+ or self._dynamic_config.myparams.get(
+ "binpkg_respect_use") in ("y", "n"):
return
self._show_merge_list()
"""Return a set of flags that trigger reinstallation, or None if there
are no such flags."""
if "--newuse" in self._frozen_config.myopts or \
- self._frozen_config.myopts.get("--binpkg-respect-use", True) == True:
+ self._dynamic_config.myparams.get(
+ "binpkg_respect_use") in ("y", "auto"):
flags = set(orig_iuse.symmetric_difference(
cur_iuse).difference(forced_flags))
flags.update(orig_iuse.intersection(orig_use).symmetric_difference(
if built and not useoldpkg and (not installed or matched_pkgs_ignore_use) and \
("--newuse" in self._frozen_config.myopts or \
"--reinstall" in self._frozen_config.myopts or \
- self._frozen_config.myopts.get("--binpkg-respect-use", True) == True):
+ (not installed and self._dynamic_config.myparams.get(
+ "binpkg_respect_use") in ("y", "auto"))):
iuses = pkg.iuse.all
old_use = self._pkg_use_enabled(pkg)
if myeb:
if myoptions.deselect in true_y:
myoptions.deselect = True
- if myoptions.binpkg_respect_use in true_y:
- myoptions.binpkg_respect_use = True
- else:
- myoptions.binpkg_respect_use = None
+ if myoptions.binpkg_respect_use is not None:
+ if myoptions.binpkg_respect_use in true_y:
+ myoptions.binpkg_respect_use = 'y'
+ else:
+ myoptions.binpkg_respect_use = 'n'
if myoptions.complete_graph in true_y:
myoptions.complete_graph = True