Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 922343 - emerge -U fails to detect changed USE (very simple repro ebuilds attached)
Summary: emerge -U fails to detect changed USE (very simple repro ebuilds attached)
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal major (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-18 07:04 UTC by Raffaello D. Di Napoli
Modified: 2024-01-27 18:29 UTC (History)
3 users (show)

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


Attachments
net-misc/dep-changing-use/dep-changing-use-1.ebuild (dep-changing-use-1.ebuild,203 bytes, text/plain)
2024-01-18 07:06 UTC, Raffaello D. Di Napoli
Details
net-misc/deps-use-change-test/deps-use-change-test-1.ebuild (deps-use-change-test-1.ebuild,207 bytes, text/plain)
2024-01-18 07:06 UTC, Raffaello D. Di Napoli
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Raffaello D. Di Napoli 2024-01-18 07:04:19 UTC
Run into this by removing USE=nss on (installed) dev-libs/xmlsec, and seeing that the change wasn’t picked up by emerge -U @world , failing to notify me that libreoffice has a DEPENDS="dev-libs/xmlsec[nss]" .

I created a “dependency” ebuild (mimicking xmlsec) and a “world” dependency (mimicking libreoffice), and was able to reproduce the same failure to detect changed USE.


Reproducible: Always

Steps to Reproduce:
1. Download attached ebuilds into an overlay, as
      net-misc/dep-changing-use-1.ebuild
   and
      net-misc/deps-use-change-test-1.ebuild

2. Install top-level ebuild, adding it to @world, with USE=nss so that dep-changing-use gets installed with USE=nss :
      sudo USE=nss emerge deps-use-change-test

3. Run a world update without USE=nss to trigger a rebuild of dep-changing-use:
      emerge -vpuDU --with-bdeps=y --usepkg=n @world
   (I used with-bdeps=y and usepkg=n just to make sure really everything gets
   included in the deptree and binpkgs don’t interfere.)

4. Compare with explicitly requesting rebuild of dep-changing-use:
      emerge -vp1 dep-changing-use
   (Confirmed no need for extra flags here; usepkg and bdeps don’t affect the
   outcome.)

Actual Results:  
Step 4 (targeted re-emerge) fails as expected, but step 3 (world update) happily tells me nothing changed:

--- snip begin ---

These are the packages that would be merged, in order:

Calculating dependencies... done!
Dependency resolution took 10.46 s (backtrack: 0/20).


Total: 0 packages, Size of downloads: 0 KiB

--- snip end ---


Expected Results:  
Both steps 3 and 4 fail with something like:

--- snip begin ---

These are the packages that would be merged, in order:

Calculating dependencies... done!
Dependency resolution took 1.68 s (backtrack: 0/20).

[ebuild   R    ] net-misc/dep-changing-use-1::raf  USE="openssl -gnutls -nss*" 0 KiB

Total: 1 package (1 reinstall), 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:

net-misc/dep-changing-use:0

  (net-misc/dep-changing-use-1:0/0::raf, ebuild scheduled for merge) USE="openssl -gnutls -nss" ABI_X86="(64)" pulled in by
    net-misc/dep-changing-use (Argument)

  (net-misc/dep-changing-use-1:0/0::raf, installed) USE="nss openssl -gnutls" ABI_X86="(64)" pulled in by
    >=net-misc/dep-changing-use-1:0/0=[nss] required by (net-misc/deps-use-change-test-1:0/0::raf, installed) USE="" ABI_X86="(64)"
                                       ^^^                                                                                                                                                
    >=net-misc/dep-changing-use-1:=[nss] required by (net-misc/deps-use-change-test-1:0/0::raf, installed) USE="" ABI_X86="(64)"
                                    ^^^                                                                                                                                                


It might be possible to solve this slot collision
by applying all of the following changes:
   - net-misc/dep-changing-use-1 (Change USE: +nss)

--- snip end ---


Note that I’m running a possibly slightly outdated stable portage, not latest. I synched the gentoo repo in early January and am in the middle of a multi-machine rebuild, so I don’t have a box where I can resync gentoo, update portage, and try this again. However hopefully one of you guys can give my repro ebuilds a spin? Shouldn’t take more than a couple of minutes.

emerge --info
Portage 3.0.59 (python 3.10.13-final-0, default/linux/amd64/17.1, gcc-13, glibc-2.37-r7, 6.6.9-x300m+zen3apu x86_64)
=================================================================
System uname: Linux-6.6.9-x300m+zen3apu-x86_64-AMD_Ryzen_7_5700G_with_Radeon_Graphics-with-glibc2.37
KiB Mem:    65475824 total,  41652012 free
KiB Swap:    6291452 total,   6291452 free
Timestamp of repository gentoo: Wed, 03 Jan 2024 00:30:01 +0000
Head commit of repository gentoo: 0c5110d4d95acc545dd4a3d76a24b49eb5853eb3
sh bash 5.1_p16-r6
ld GNU ld (Gentoo 2.41 p2) 2.41.0
distcc 3.4 x86_64-pc-linux-gnu [disabled]
app-misc/pax-utils:        1.3.5::gentoo
app-shells/bash:           5.1_p16-r6::gentoo
dev-lang/perl:             5.38.2-r1::gentoo
dev-lang/python:           3.10.13::gentoo, 3.11.7::gentoo, 3.12.1::gentoo
dev-lang/rust:             1.71.1::gentoo
dev-util/cmake:            3.27.7::gentoo
dev-util/meson:            1.2.3::gentoo
sys-apps/baselayout:       2.14-r1::gentoo
sys-apps/openrc:           0.48::gentoo
sys-apps/sandbox:          2.38::gentoo
sys-devel/autoconf:        2.13-r7::gentoo, 2.71-r6::gentoo
sys-devel/automake:        1.16.5-r1::gentoo
sys-devel/binutils:        2.41-r2::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           15.0.7-r3::gentoo, 16.0.6::gentoo
sys-devel/gcc:             13.2.1_p20230826::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/libtool:         2.4.7-r1::gentoo
sys-devel/lld:             16.0.6::gentoo
sys-devel/llvm:            15.0.7-r3::gentoo, 16.0.6::gentoo
sys-devel/make:            4.4.1-r1::gentoo
sys-kernel/linux-headers:  6.6::gentoo (virtual/os-headers)
sys-libs/glibc:            2.37-r7::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    volatile: False
    sync-rsync-extra-opts: 
    sync-rsync-verify-max-age: 3
    sync-rsync-verify-metamanifest: no
    sync-rsync-verify-jobs: 1

raf
    location: /var/db/repos/raf
    masters: gentoo
    priority: 1000
    volatile: True

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-pipe -O2 -march=znver3 --param l1-cache-line-size=64 --param l1-cache-size=32 --param l2-cache-size=512"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-pipe -O2 -march=znver3 --param l1-cache-line-size=64 --param l1-cache-size=32 --param l2-cache-size=512"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask=n --binpkg-changed-deps=y --binpkg-respect-use=y --usepkg=y"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE 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 XDG_STATE_HOME"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news nodoc noinfo parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="   https://mirrors.rit.edu/gentoo/   https://gentoo.osuosl.org/ "
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
MAKEOPTS="-j16"
PKGDIR="/var/lib/portage/binpkgs"
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="/tmp"
SHELL="/bin/bash"
USE="acl alsa amd64 branding cli crypt custom-cflags dri iconv ipv6 lcms libnotify libtirpc lto multilib nls nptl opengl openmp pgo seccomp split-usr ssl startup-notification test-rust threads thunar udev unicode v4l vulkan xattr xfs" ABI_X86="64" ADA_TARGET="gnat_2021" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio 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="mmx mmxext sse sse2 aes avx avx2 f16c fma3 rdrand sha sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 ntrip navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-1" POSTGRES_TARGETS="postgres15" RUBY_TARGETS="ruby31" VIDEO_CARDS="amdgpu" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 1 Raffaello D. Di Napoli 2024-01-18 07:06:04 UTC
Created attachment 882512 [details]
net-misc/dep-changing-use/dep-changing-use-1.ebuild
Comment 2 Raffaello D. Di Napoli 2024-01-18 07:06:59 UTC
Created attachment 882513 [details]
net-misc/deps-use-change-test/deps-use-change-test-1.ebuild
Comment 3 Zac Medico gentoo-dev 2024-01-20 10:03:33 UTC
Seems like we can mark this as a duplicate of bug 266836 and adjust the title to include --changed-deps in addition to --newuse.