When updating system emerging setuptools gives following error: `ModuleNotFoundError: No module named 'backports'` Python targets: ``` */* PYTHON_TARGETS: -* python3_11 */* PYTHON_SINGLE_TARGET: -* python3_11 ``` Reproducible: Always Steps to Reproduce: 1. Emerge dev-python/setuptools Actual Results: Build fails Expected Results: Build is successful Portage 3.0.61 (python 3.11.9-final-0, default/linux/amd64/23.0/split-usr/desktop, gcc-13, glibc-2.39-r6, 6.6.34-gentoo-x86_64 x86_64) ================================================================= System uname: Linux-6.6.34-gentoo-x86_64-x86_64-Intel-R-_Core-TM-_i7_CPU_L_620_@_2.00GHz-with-glibc2.39 KiB Mem: 5870668 total, 1274104 free KiB Swap: 16777212 total, 16753916 free Timestamp of repository gentoo: Sat, 06 Jul 2024 19:30:00 +0000 Head commit of repository gentoo: 15d3dcaa871477e30136b3466167b2fdceee2b1e Timestamp of repository gentoo-zh: Sat, 06 Jul 2024 14:48:56 +0000 Head commit of repository gentoo-zh: 5208bd85974e27817dde7f665fc2381606bf8d63 Timestamp of repository guru: Fri, 05 Jul 2024 21:07:06 +0000 Head commit of repository guru: d13b66aff1354e1273deec0c874dc8ac8e0c0562 Head commit of repository librewolf: d272c892b86b02033f46941751f2b5f884a1eef7 Timestamp of repository pf4public: Fri, 05 Jul 2024 21:07:18 +0000 Head commit of repository pf4public: 6dc700e6fe778048a42bfb51464eae76dcf94d9f sh bash 5.1_p16-r6 ld GNU ld (Gentoo 2.41 p5) 2.41.0 app-misc/pax-utils: 1.3.7::gentoo app-shells/bash: 5.1_p16-r6::gentoo dev-build/autoconf: 2.13-r8::gentoo, 2.71-r6::gentoo dev-build/automake: 1.16.5-r2::gentoo dev-build/cmake: 3.28.3::gentoo dev-build/libtool: 2.4.7-r4::gentoo dev-build/make: 4.4.1-r1::gentoo dev-build/meson: 1.3.2::gentoo dev-java/java-config: 2.3.3-r1::gentoo dev-lang/perl: 5.38.2-r3::gentoo dev-lang/python: 3.10.14_p1::gentoo, 3.11.9-r1::gentoo, 3.12.3::gentoo dev-lang/rust-bin: 1.77.1::gentoo sys-apps/baselayout: 2.15::gentoo sys-apps/openrc: 0.54::gentoo sys-apps/sandbox: 2.38::gentoo sys-devel/binutils: 2.41-r5::gentoo sys-devel/binutils-config: 5.5::gentoo sys-devel/clang: 15.0.7-r3::gentoo, 17.0.6::gentoo sys-devel/gcc: 13.2.1_p20240210::gentoo sys-devel/gcc-config: 2.11::gentoo sys-devel/lld: 17.0.6::gentoo sys-devel/llvm: 15.0.7-r3::gentoo, 17.0.6::gentoo sys-kernel/linux-headers: 6.6-r1::gentoo (virtual/os-headers) sys-libs/glibc: 2.39-r6::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-verify-max-age: 24 sync-rsync-verify-metamanifest: yes sync-rsync-extra-opts: sync-rsync-verify-jobs: 1 gentoo-zh location: /var/db/repos/gentoo-zh sync-type: git sync-uri: https://github.com/gentoo-mirror/gentoo-zh.git masters: gentoo volatile: False guru location: /var/db/repos/guru sync-type: git sync-uri: https://github.com/gentoo-mirror/guru.git masters: gentoo volatile: False librewolf location: /var/db/repos/librewolf sync-type: git sync-uri: https://codeberg.org/librewolf/gentoo.git masters: gentoo volatile: False nikitalocalhost location: /var/db/repos/nikitalocalhost masters: gentoo volatile: False nl-overlay location: /var/db/repos/nl-overlay masters: gentoo volatile: False pf4public location: /var/db/repos/pf4public sync-type: git sync-uri: https://github.com/gentoo-mirror/pf4public.git masters: gentoo volatile: False Binary Repositories: binhost priority: 9999 sync-uri: https://distfiles.gentoo.org/releases/amd64/binpackages/23.0/x86-64 ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="*" AR="x86_64-pc-linux-gnu-ar" CBUILD="x86_64-pc-linux-gnu" CC="gcc" CFLAGS="-march=native -O2" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/config /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 /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXX="g++" CXXFLAGS="-march=native -O2" DISTDIR="/var/cache/distfiles" EMERGE_DEFAULT_OPTS="--getbinpkg --binpkg-respect-use=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="-march=native -O2" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance binpkg-request-signature buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news 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="-march=native -O2" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="en_US.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs" LEX="flex" MAKEOPTS="-j2 -l2" NM="x86_64-pc-linux-gnu-nm" PKGDIR="/var/cache/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="/var/tmp" RANLIB="x86_64-pc-linux-gnu-ranlib" RUSTFLAGS="-C target-cpu=native -C opt-level=3" SHELL="/bin/bash" USE="X a52 aac acl acpi alsa amd64 bluetooth branding btrfs bzip2 cairo cdda cdr cet crypt cryptsetup cups dbus djvu dri dts dvd dvdr elogind encode exif flac fontconfig gdbm gif gpm graphviz gtk gui heif iconv icu ipv6 jack jpeg jpeg2k jpegxl jumbo-build keyring kf6compat lcms libass libnotify libtirpc linguas_en linguas_en_US linguas_ja linguas_ru lvm mad mng mp3 mp4 mpeg multilib ncurses networkmanager nls ogg opengl openmp opus pam pango pcre pdf pipewire png policykit ppds pulseaudio qt5 readline sdl seccomp sound spell split-usr ssl startup-notification static static-libs svg test-rust tiff truetype udev udisks unicode upower usb vaapi verify-sig vorbis vulkan webp wifi wxwidgets x264 x265 xattr xcb xft xml xv xvid zlib" ABI_X86="64" ADA_TARGET="gcc_12" 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 popcnt 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" INPUT_DEVICES="libinput wacom" KERNEL="linux" L10N="en en-US ja ru" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="luajit" LUA_TARGETS="lua5-1 lua5-4 luajit" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-2" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" RUBY_TARGETS="ruby31 ruby32" VIDEO_CARDS="fbdev intel vesa i915" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account" Unset: ADDR2LINE, ARFLAGS, AS, ASFLAGS, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, READELF, SIZE, STRINGS, STRIP, YACC, YFLAGS
Please share the full build.log.
Created attachment 897250 [details] build.log
Thanks. ``` [...] File "/var/tmp/portage/dev-python/setuptools-70.0.0/work/setuptools-70.0.0/setuptools/__init__.py", line 16, in <module> from .dist import Distribution File "/var/tmp/portage/dev-python/setuptools-70.0.0/work/setuptools-70.0.0/setuptools/dist.py", line 31, in <module> from . import _entry_points File "/var/tmp/portage/dev-python/setuptools-70.0.0/work/setuptools-70.0.0/setuptools/_entry_points.py", line 6, in <module> from jaraco.text import yield_lines File "/usr/lib/python3.11/site-packages/jaraco/text/__init__.py", line 12, in <module> from jaraco.context import ExceptionTrap File "/usr/lib/python3.11/site-packages/jaraco/context.py", line 17, in <module> from backports import tarfile ModuleNotFoundError: No module named 'backports' ```
What happened up to this point? Did you unmerge anything?
(In reply to Sam James from comment #4) > What happened up to this point? Did you unmerge anything? Not that I remember
Created attachment 897251 [details] emerge -pqv "=dev-python/setuptools-70.0.0"
I didn't find on my system `dev-python/backports-tarfile`, gonna try to emerge it and repeat build
With `dev-python/backports-tarfile` build is successful. Question is: does setuptools has dependency on `dev-python/backports-tarfile`? And if it does, has it been written in ebuild?
`equery g setuptools-70.0.0 --depth=4 | grep backports` shows me `dev-python/backports-tarfile` I think the problem is that dependencies of setuptools were emerged as binaries and that machine in EMERGE_DEFAULT_OPTS don't have `--with-bdeps`, and setuptools has implicit dependency on `dev-python/backports-tarfile`
setuptools doesn't make use of dev-python/backports-tarfile. As described in your build.log, setuptools attempts to import: dev-python/jaraco-text which in turn attempts to import: dev-python/jaraco-context and that last package imports dev-python/backports-tarfile And indeed this dependency chain appears to be correctly described. Unless your recursive dependencies are broken, backports-tarfile should be installed. The `emerge -pv` output for *just setuptools* is not as enlightening as it could be.
The output in full of 'emerge -p -uvDU @world' might help us (so we can see the merge order).
(In reply to Sam James from comment #11) > The output in full of 'emerge -p -uvDU @world' might help us (so we can see > the merge order). Already fixed by manually installing `dev-python/backports-tarfile` and I started upgrading system, so if I will remember after upgrade I will try to delete `dev-python/backports-tarfile` and remerge setuptools
No, please don't do that, it'd invalidate the dependencies of jaraco-context (it won't validly reproduce the issue even if it does fail). Thanks for the update anyhow.
(In reply to Sam James from comment #13) > No, please don't do that, it'd invalidate the dependencies of jaraco-context > (it won't validly reproduce the issue even if it does fail). > > Thanks for the update anyhow. Thank you for your time!