Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 927301 - sys-apps/portage: wrongly triggers REQUIRED_USE conflicts due to slot operator rebuilds when using --buildpkgonly
Summary: sys-apps/portage: wrongly triggers REQUIRED_USE conflicts due to slot operato...
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Dependencies (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2024-03-19 19:22 UTC by Michał Górny
Modified: 2024-03-20 04:04 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-03-19 19:22:05 UTC
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])
Comment 1 Zac Medico gentoo-dev 2024-03-19 20:16:37 UTC
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):