When I'm trying to build a binary package for old libjxl slot, emerge fails because of unsatisfied REQUIRED_USE on a reverse dependency that would have to be rebuilt if I were actually merging the binary package. (I was able to work around it via --ignore-built-sl y, but it seems wrong) $ emerge --buildpkgonly "<libjxl-0.10" These are the packages that would be built, in order: Calculating dependencies \ !!! Problem resolving dependencies for media-gfx/imagemagick:0 from @__auto_slot_operator_replace_installed__ ... done! Dependency resolution took 11.55 s (backtrack: 3/20). WARNING: One or more updates/rebuilds have been skipped due to a dependency conflict: media-libs/libjxl:0 (media-libs/libjxl-0.10.2:0/0.10::gentoo, ebuild scheduled for merge) USE="gdk-pixbuf openexr test" ABI_X86="32 64 -x32" conflicts with <libjxl-0.10 !!! The ebuild selected to satisfy "media-gfx/imagemagick:0" has unmet requirements. - media-gfx/imagemagick-7.1.1.25::gentoo USE="X bzip2 cxx djvu fftw fontconfig fpx hdri heif jbig jpeg jpeg2k jpegxl lcms lqr lzma openexr openmp pango perl png postscript raw svg test tiff truetype webp wmf xml zlib -corefonts -graphviz -hardened -opencl -q32 -q8 -static-libs -zip" ABI_X86="64" The following REQUIRED_USE flag constraints are unsatisfied: test? ( corefonts ) The above constraints are a subset of the following complete expression: corefonts? ( truetype ) svg? ( xml ) test? ( corefonts ) (dependency required by "@__auto_slot_operator_replace_installed__" [argument])
Seems like this should fix it: --- a/lib/_emerge/depgraph.py +++ b/lib/_emerge/depgraph.py @@ -1942,7 +1942,10 @@ class depgraph: for conflict in self._dynamic_config._package_tracker.slot_conflicts(): self._process_slot_conflict(conflict) - if self._dynamic_config._allow_backtracking: + if ( + self._dynamic_config._allow_backtracking + and "--buildpkgonly" not in self._frozen_config.myopts + ): self._slot_operator_trigger_reinstalls() def _process_slot_conflict(self, conflict):