I was cleaning out my package.use files, and seemed to be able to remove far more entries than I expected. It seems that portage sometimes fails to notice that the configuration requested for a binpkg has changed and remerges the old copy with the wrong setting. As an example, I toggled -abi_x86_32 on x11-libs/libXau, and if I try to remerge it I correctly get complaints that there is a conflict with x11-libs/libxcb: $ /usr/bin/emerge -1vp --usepkg=y --binpkg-respect-use=y libXau These are the packages that would be merged, in order: Calculating dependencies... done! [binary R ] x11-libs/libXau-1.0.9-r1-3::gentoo USE="-doc" ABI_X86="(64) -32* (-x32)" 0 KiB Total: 1 package (1 reinstall, 1 binary), Size of downloads: 0 KiB !!! Multiple package instances within a single package slot have been pulled !!! into the dependency graph, resulting in a slot conflict: x11-libs/libXau:0 (x11-libs/libXau-1.0.9-r1-3:0/0::gentoo, binary scheduled for merge) USE="-doc" ABI_X86="(64) -32 (-x32)" pulled in by x11-libs/libXau (Argument) (x11-libs/libXau-1.0.9-r1-4:0/0::gentoo, installed) USE="-doc" ABI_X86="32 (64) (-x32)" pulled in by >=x11-libs/libXau-1.0.7-r1[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_s390_32(-)?,abi_s390_64(-)?] required by (x11-libs/libxcb-1.14-4:0/1.12::gentoo, installed) USE="xkb -doc (-selinux) -test" ABI_X86="32 (64) (-x32)" It may be possible to solve this problem by using package.mask to prevent one of those packages from being selected. However, it is also possible that conflicting dependencies exist such that they are impossible to satisfy simultaneously. If such a conflict exists in the dependencies of two different packages, then those packages can not be installed simultaneously. For more information, see MASKED PACKAGES section in the emerge man page or refer to the Gentoo Handbook. $ If I try to merge both packages simultaneously, however, I get no conflicts and portage leaves the use flag enabled instead of respecting the configuration changes: $ /usr/bin/emerge -1vp --usepkg=y --binpkg-respect-use=y libXau libxcb These are the packages that would be merged, in order: Calculating dependencies... done! [binary R ] x11-libs/libXau-1.0.9-r1-4::gentoo USE="-doc" ABI_X86="32 (64) (-x32)" 0 KiB [binary R ] x11-libs/libxcb-1.14-4:0/1.12::gentoo USE="xkb -doc (-selinux) -test" ABI_X86="32 (64) (-x32)" 0 KiB Total: 2 packages (2 reinstalls, 2 binaries), Size of downloads: 0 KiB $ $ /usr/bin/emerge --info Portage 3.0.13 (python 3.8.7-final-0, default/linux/amd64/17.1, gcc-9.3.0, glibc-2.32-r6, 5.4.60-gentoo x86_64) ================================================================= System uname: Linux-5.4.60-gentoo-x86_64-Intel-R-_Xeon-R-_CPU_E5-2620_v4_@_2.10GHz-with-glibc2.2.5 KiB Mem: 98939764 total, 32089380 free KiB Swap: 67108856 total, 64718072 free Timestamp of repository gentoo: Sun, 28 Feb 2021 17:00:01 +0000 Head commit of repository gentoo: c99feafbc08d0e340b355fdfa57d523fb9361094 sh bash 5.0_p18 ld GNU ld (Gentoo 2.35.1 p2) 2.35.1 app-shells/bash: 5.0_p18::gentoo dev-java/java-config: 2.3.1::gentoo dev-lang/perl: 5.30.3::gentoo dev-lang/python: 3.8.7-r1::gentoo sys-apps/baselayout: 2.7::gentoo sys-apps/openrc: 0.42.1-r1::gentoo sys-apps/sandbox: 2.20::gentoo sys-devel/binutils: 2.35.1-r1::gentoo sys-devel/gcc: 9.3.0-r2::gentoo sys-devel/gcc-config: 2.3.2-r1::gentoo sys-devel/make: 4.3::gentoo sys-kernel/linux-headers: 5.4-r1::gentoo (virtual/os-headers) sys-libs/glibc: 2.32-r6::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 sync-rsync-verify-max-age: 24 sync-rsync-verify-metamanifest: no sync-rsync-verify-jobs: 1 sync-rsync-extra-opts: wthrowe-misc location: /usr/local/shared/feanor/overlays/wthrowe-misc masters: gentoo priority: 0 wthrowe-multilib location: /usr/local/shared/feanor/overlays/wthrowe-multilib masters: gentoo priority: 1 crossdev location: /usr/local/shared/feanor/overlays/portage-crossdev masters: gentoo priority: 10 barnowl location: /var/lib/layman/barnowl masters: gentoo priority: 50 steam-overlay location: /var/lib/layman/steam-overlay masters: gentoo priority: 50 sxs-spectre location: /var/lib/layman/sxs-spectre masters: gentoo priority: 50 Installed sets: @esteam, @minecraft ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="@FREE" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -O2 -pipe -ggdb" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-march=native -O2 -pipe -ggdb" DISTDIR="/var/cache/distfiles" EMERGE_DEFAULT_OPTS="--ask --quiet-build=n --autounmask-write=n --usepkg --with-bdeps=n --backtrack=100 --autounmask-backtrack=y --binpkg-respect-use=y --binpkg-changed-deps=n" ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance clean-logs compress-build-logs compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms split-log splitdebug strict unknown-features-warn unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="POSIX" LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu" MAKEOPTS="-j24" PKGDIR="/var/cache/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/var/tmp" USE="acl amd64 bzip2 cli crypt dri elogind fortran iconv ipv6 libglvnd libtirpc multilib ncurses nls nptl opengl openmp pam pcre readline seccomp split-usr ssl tcpd unicode vulkan xattr zlib" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-3 php7-4" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_8" PYTHON_TARGETS="python3_8" RUBY_TARGETS="ruby26" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
(In reply to William Throwe from comment #0) > If I try to merge both packages simultaneously, however, I get no conflicts > and portage leaves the use flag enabled instead of respecting the > configuration changes: > > > $ /usr/bin/emerge -1vp --usepkg=y --binpkg-respect-use=y libXau libxcb > > These are the packages that would be merged, in order: > > Calculating dependencies... done! > [binary R ] x11-libs/libXau-1.0.9-r1-4::gentoo USE="-doc" ABI_X86="32 > (64) (-x32)" 0 KiB > [binary R ] x11-libs/libxcb-1.14-4:0/1.12::gentoo USE="xkb -doc > (-selinux) -test" ABI_X86="32 (64) (-x32)" 0 KiB > > Total: 2 packages (2 reinstalls, 2 binaries), Size of downloads: 0 KiB Can you try it with --autounmask=n to see if it behaves the same way? I wonder if the default --autounmask-use behavior has anything to do with this.
Yes, adding --autounmask=n makes it correctly detect use change (and the conflict).
It seems like these two flags have a sort of fundamental conflict, so I think we can simply make --binpkg-respect-use=y imply --autounmask-use=n.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=7a683809e4f7f61590a770df7f79cfa633a18d8e commit 7a683809e4f7f61590a770df7f79cfa633a18d8e Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2021-03-01 06:36:29 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2021-03-01 06:40:26 +0000 Add unit test demonstrating --autounmask-use / --binpkg-respect-use=y conflict Bug: https://bugs.gentoo.org/773469 Signed-off-by: Zac Medico <zmedico@gentoo.org> lib/portage/tests/resolver/test_useflags.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=2c322a4274fafcc04423baecd6880737e1639168 commit 2c322a4274fafcc04423baecd6880737e1639168 Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2021-03-01 07:58:33 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2021-03-01 08:55:18 +0000 Include --autounmask-backtrack in unit test for bug 773469 The --autounmask-backtrack option is needed in order to trigger the --binpkg-respect-use=y behavior that appears confusingly similar to --binpkg-respect-use=n behavior. Bug: https://bugs.gentoo.org/773469 Signed-off-by: Zac Medico <zmedico@gentoo.org> lib/portage/tests/resolver/test_useflags.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
Patch posted for review: https://archives.gentoo.org/gentoo-portage-dev/message/93cd500d29d1aeb3ccbe944fe906b616 https://github.com/gentoo/portage/pull/679
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=3253686e9438a918b104089b6e2f8d4e8d9eb4a7 commit 3253686e9438a918b104089b6e2f8d4e8d9eb4a7 Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2021-03-01 05:39:01 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2021-03-02 08:56:46 +0000 emerge: make --binpkg-respect-use=y imply --autounmask-use=n If --binpkg-respect-use=y is given explicitly, then it implies --autounmask-use=n, because these options naturally oppose eachother. Bug: https://bugs.gentoo.org/773469 Signed-off-by: Zac Medico <zmedico@gentoo.org> lib/_emerge/create_depgraph_params.py | 22 +++++++++++----------- lib/portage/tests/resolver/test_useflags.py | 20 ++++++++++++++------ man/emerge.1 | 9 ++++++--- 3 files changed, 31 insertions(+), 20 deletions(-)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b5dad57e098ae72fa4e4ae10c1331892bf5ffcea commit b5dad57e098ae72fa4e4ae10c1331892bf5ffcea Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2021-03-07 16:40:43 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2021-03-07 16:51:36 +0000 sys-apps/portage: Bump to version 3.0.17 #773469 emerge --binpkg-respect-use=y implies --autounmask-use=n Bug: https://bugs.gentoo.org/766117 Bug: https://bugs.gentoo.org/773469 Package-Manager: Portage-3.0.17, Repoman-3.0.2 Signed-off-by: Zac Medico <zmedico@gentoo.org> sys-apps/portage/Manifest | 1 + sys-apps/portage/portage-3.0.17.ebuild | 278 +++++++++++++++++++++++++++++++++ 2 files changed, 279 insertions(+)
After this change, autounmasking doesn't work for me even with --binpkg-respect-use=n I had to downgrade to 3.0.16. EMERGE_DEFAULT_OPTS="--jobs=8 --usepkg --binpkg-respect-use=n --autounmask=y --autounmask-write --autounmask-continue --autounmask-use=y" emerge just stops and does nothing.
(In reply to Joonas Niilola from comment #9) > After this change, autounmasking doesn't work for me even with > --binpkg-respect-use=n > > I had to downgrade to 3.0.16. > > EMERGE_DEFAULT_OPTS="--jobs=8 --usepkg --binpkg-respect-use=n --autounmask=y > --autounmask-write --autounmask-continue --autounmask-use=y" > > emerge just stops and does nothing. Hmm I might've had a conflicting env/ file after all, it seems to work on a newly setup system with --binpkg-respect-use=n.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=8851a437c7edc7ae01ba04dbff42b27e1f36b37b commit 8851a437c7edc7ae01ba04dbff42b27e1f36b37b Author: Thomas Deutschmann <whissi@gentoo.org> AuthorDate: 2021-04-05 19:27:39 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2021-04-05 20:41:40 +0000 man/emerge.1: fix typos Fixes: 3253686e9438 ("emerge: make --binpkg-respect-use=y imply --autounmask-use=n") Bug: https://bugs.gentoo.org/773469 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> Signed-off-by: Zac Medico <zmedico@gentoo.org> man/emerge.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Sorry for digging up an old issue, but I don't understand. How does binpkg-respect-use conflict with autounmask? I can recognize OP's issue, it's bitten me as well and I'm glad it's fixed now, but why can't I both ignore binary packages that don't respect my USE flags *and* get the option to automatically resolve USE flag requirements? From a user POV that doesn't make a lot of sense to me and the man page saying they're "naturally opposed" doesn't help much.
(In reply to Esteve Varela Colominas from comment #12) > Sorry for digging up an old issue, but I don't understand. How does > binpkg-respect-use conflict with autounmask? > I can recognize OP's issue, it's bitten me as well and I'm glad it's fixed > now, but why can't I both ignore binary packages that don't respect my USE > flags *and* get the option to automatically resolve USE flag requirements? > From a user POV that doesn't make a lot of sense to me and the man page > saying they're "naturally opposed" doesn't help much. The problem is one of conflicting requirements: 1) User's USE flag settings. 2) USE dependencies which trigger autounmask USE changes. In any case where these two requirements are not in perfect alignment, the autounmask behavior will override the --binpkg-respect-use. It may be possible to implement so kind of improved compromise here, but how? Patches welcome.