sys-apps/portage-3.0.17 fails to install on an amd64 prefix system. 3.0.16 works. Reproducible: Always Steps to Reproduce: 1. Install Gentoo Prefix 2. emerge -va1 portage Actual Results: >>> Merging sys-apps/portage-3.0.17 to / * Using python3.9 in global scope !!! Repository 'gentoo' has sync-uri attribute, but is missing sync-type attribute !!! Section 'gentoo' in repos.conf is missing location attribute Unavailable repository 'gentoo' referenced by masters entry in '/home/marienz/portage/metadata/layout.conf' !!! Repository 'gentoo' has sync-uri attribute, but is missing sync-type attribute !!! Section 'gentoo' in repos.conf is missing location attribute Unavailable repository 'gentoo' referenced by masters entry in '/home/marienz/portage/metadata/layout.conf' Traceback (most recent call last): File "/home/marienz/gentoo/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "/home/marienz/gentoo/usr/lib/python3.9/runpy.py", line 87, in _run_code exec(code, run_globals) File "/home/marienz/gentoo/var/tmp/portage/sys-apps/portage-3.0.17/image/home/marienz/gentoo/usr/lib/python3.9/site-packages/portage/_compat_upgrade/binpkg_compression.py", line 40, in <module> main() File "/home/marienz/gentoo/var/tmp/portage/sys-apps/portage-3.0.17/image/home/marienz/gentoo/usr/lib/python3.9/site-packages/portage/_compat_upgrade/binpkg_compression.py", line 30, in main with open(config_path) as f: FileNotFoundError: [Errno 2] No such file or directory: '/home/marienz/gentoo/var/tmp/portage/sys-apps/portage-3.0.17/image/home/marienz/gentoo/home/marienz/gentoo/usr/share/portage/config/make.globals' * ERROR: sys-apps/portage-3.0.17::gentoo failed (preinst phase): * (no error message) * * Call stack: * ebuild.sh, line 125: Called pkg_preinst * environment, line 2974: Called die * The specific snippet of code: * env -u BINPKG_COMPRESS -u PORTAGE_REPOSITORIES PYTHONPATH="${D}${sitedir}${PYTHONPATH:+:${PYTHONPATH}}" "${PYTHON}" -m portage._compat_upgrade.binpkg_compression || die; * * If you need support, post the output of `emerge --info '=sys-apps/portage-3.0.17::gentoo'`, * the complete build log and the output of `emerge -pqv '=sys-apps/portage-3.0.17::gentoo'`. * The complete build log is located at '/home/marienz/gentoo/var/tmp/portage/sys-apps/portage-3.0.17/temp/build.log'. * The ebuild environment file is located at '/home/marienz/gentoo/var/tmp/portage/sys-apps/portage-3.0.17/temp/environment'. * Working directory: '/home/marienz/gentoo/var/tmp/portage/sys-apps/portage-3.0.17/homedir' * S: '/home/marienz/gentoo/var/tmp/portage/sys-apps/portage-3.0.17/work/portage-3.0.17' !!! FAILED preinst: 1 >>> Failed to install sys-apps/portage-3.0.17, Log file: >>> '/home/marienz/gentoo/var/tmp/portage/sys-apps/portage-3.0.17/temp/build.log' (I'll attach build.log momentarily) Expected Results: Successful update. preinst ends up looking for make.globals with EPREFIX prefixed twice (it looks for /home/marienz/gentoo/var/tmp/portage/sys-apps/portage-3.0.17/image/home/marienz/gentoo/home/marienz/gentoo/usr/share/portage/config/make.globals, while gentoo/var/tmp/portage/sys-apps/portage-3.0.17/image/home/marienz/gentoo/usr/share/portage/config/make.globals exists). Comparing const.py to the installed version shows GLOBAL_CONFIG_PATH got EPREFIX prepended: % diff -u gentoo/usr/lib/python3.9/site-packages/portage/const.py gentoo/var/tmp/portage/sys-apps/portage-3.0.17/image/home/marienz/gentoo/usr/lib/python3.9/site-packages/portage/const.py --- gentoo/usr/lib/python3.9/site-packages/portage/const.py 2021-03-09 14:06:51.295368148 -0000 +++ gentoo/var/tmp/portage/sys-apps/portage-3.0.17/image/home/marienz/gentoo/usr/lib/python3.9/site-packages/portage/const.py 2021-03-09 14:07:29.946164878 -0000 @@ -54,7 +54,7 @@ # these variables get EPREFIX prepended automagically when they are # translated into their lowercase variants DEPCACHE_PATH = "/var/cache/edb/dep" -GLOBAL_CONFIG_PATH = "/usr/share/portage/config" +GLOBAL_CONFIG_PATH = '/home/marienz/gentoo/usr/share/portage/config' # these variables are not used with target_root or config_root # NOTE: Use realpath(__file__) so that python module symlinks in site-packages Judging by the comment above it, GLOBAL_CONFIG_PATH is not supposed to already have EPREFIX prepended (and the compat_upgrade code does indeed not expect this). Comparing setup.py against 3.0.16, the non-create_entry_points code now passes GLOBAL_CONFIG_PATH to rewrite_file while before it passed PORTAGE_CONFIG_PATH. It looks like the old code was dead (I don't see PORTAGE_CONFIG_PATH in 3.0.16 other than in setup.py, it wasn't replacing anything), but at least for the non-create_entry_points case it probably should've been dropped, not replaced with GLOBAL_CONFIG_PATH (not sure about the create_entry_points case). (It doesn't look like the new create_entry_points code is triggering when it shouldn't, as I don't see the "Rewriting %s" lines from re_sub_file that would cause. It looks like an unintentional change to the original code that's probably a noop on normal systems but doesn't work on prefix.) Portage 3.0.16 (python 3.9.2-final-0, default/linux/amd64/17.1/no-multilib/prefix/kernel-3.2+, gcc-10.2.0, glibc-2.32-r8, 5.10.19-200.fc33.x86_64 x86_64) ================================================================= System uname: Linux-5.10.19-200.fc33.x86_64-x86_64-AMD_Ryzen_9_3900XT_12-Core_Processor-with-glibc2.32 KiB Mem: 65856584 total, 57336852 free KiB Swap: 4194300 total, 4194300 free Timestamp of repository gentoo: Tue, 09 Mar 2021 13:15:01 +0000 Head commit of repository gentoo: 458671f972cb2a1b0dcea855ec6477c0cad9b4ff sh bash 5.1_p4 ld GNU gold (Gentoo 2.35.2 p1 2.35.2) 1.16 ccache version 4.2 [disabled] app-shells/bash: 5.1_p4::gentoo dev-lang/perl: 5.32.1::gentoo dev-lang/python: 3.9.2::gentoo sys-apps/baselayout: 2.7-r1::gentoo sys-apps/sandbox: 2.20::gentoo sys-devel/autoconf: 2.69-r5::gentoo sys-devel/automake: 1.16.3-r1::gentoo sys-devel/binutils: 2.35.2::gentoo sys-devel/gcc: 10.2.0-r5::gentoo sys-devel/gcc-config: 2.4::gentoo sys-devel/libtool: 2.4.6-r6::gentoo sys-devel/make: 4.3::gentoo sys-kernel/linux-headers: 5.11::gentoo (virtual/os-headers) sys-libs/glibc: 2.32-r8::gentoo Repositories: gentoo location: /home/marienz/gentoo/var/db/repos/gentoo sync-type: rsync sync-uri: rsync://minotaur/gentoo-portage priority: -1000 sync-rsync-verify-metamanifest: yes sync-rsync-verify-jobs: 1 sync-rsync-extra-opts: sync-rsync-verify-max-age: 24 marienz location: /home/marienz/portage masters: gentoo ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="@FREE" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -ggdb -O2 -pipe -march=native" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /home/marienz/gentoo/etc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /home/marienz/gentoo/etc/env.d /home/marienz/gentoo/etc/gentoo-release" CXXFLAGS="-O2 -pipe -ggdb -O2 -pipe -march=native" DISTDIR="/home/marienz/gentoo/var/cache/distfiles" 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 collision-protect compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles force-prefix ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans unprivileged xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://mirror.internode.on.net/pub/gentoo/" LANG="en_US.UTF-8" LDFLAGS="-Wl,--hash-style=gnu -Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j22" PKGDIR="/home/marienz/gentoo/var/cache/binpkgs" PORTAGE_CONFIGROOT="/home/marienz/gentoo/" 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="/home/marienz/gentoo/var/tmp" USE="acl adns amd64 avahi btrfs bzip2 canberra caps cargo cdio chromecast clang cli clippy clutter corefonts crypt dav1d dbus default-gold device-mapper distinct-l dos dot dri dri3 drm dvi efi egl expat ffmpeg fontconfig fuse g3dvl gbm geckodriver gegl gflags ghcbootstrap gles2 gmp gnuefi go gold google gpg hostonly http http2 iconv icu idn imap inotify ipv6 irc json lame libass libdrm libffi libglvnd libidn2 libinput libkms libtirpc libvisual libxml2 llvm llvm-shared-libs lm-sensors lto lua lzma maildir mtp multimedia ncurses nfsidmap nls nptl numpy openmp opus pch pcre pgo playlist postscript prefix prelink preview-latex projectm python python3 qml readline realtime rls rustfmt s3tc seccomp semantic-desktop sip smtp speex spice split-usr sqlite ssl svc system-bootstrap system-harfbuzz system-icu system-jflex system-jpeg system-jsoncpp system-llvm sysv-utils theora toolkit-scroll-bars udisks2 uefi unicode unicode3 unwind urwid usbredir user-session vaapi vala valgrind vpx vulkan wasm wayland webkit webp widevine widgets xattr xcomposite xetex xft xinerama xml xmp xwayland zlib zsh-completion zstd" 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 f16c fma3 mmx mmxext pclmul popcnt rdrand sha sse sse2 sse3 sse4_1 sse4_2 sse4a 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="libinput" KERNEL="linux" L10N="en en-GB en-US nl fy" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="ARM WebAssembly BPF NVPTX" 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_9" PYTHON_TARGETS="pypy3 python3_9" QEMU_SOFTMMU_TARGETS="x86_64" RUBY_TARGETS="ruby26" USERLAND="GNU" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy v4l" 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, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Created attachment 690234 [details] build.log (gzipped)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=ff7d78442895e53afb534c072477f98bada4f248 commit ff7d78442895e53afb534c072477f98bada4f248 Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2021-03-10 05:01:07 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2021-03-10 05:14:02 +0000 setup.py: fix GLOBAL_CONFIG_PATH double prefix Bug: https://bugs.gentoo.org/775053 Reported-by: Marien Zwart <marien.zwart@gmail.com> Signed-off-by: Zac Medico <zmedico@gentoo.org> setup.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0de24937f715fcbcf275d9c715ad2cbe6819227a commit 0de24937f715fcbcf275d9c715ad2cbe6819227a Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2021-03-10 05:30:43 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2021-03-10 05:33:07 +0000 sys-apps/portage: 3.0.17-r1 revbump for bug 775053 Bug: https://bugs.gentoo.org/766117 Closes: https://bugs.gentoo.org/775053 Package-Manager: Portage-3.0.17, Repoman-3.0.2 Signed-off-by: Zac Medico <zmedico@gentoo.org> sys-apps/portage/Manifest | 1 + .../portage/{portage-3.0.17.ebuild => portage-3.0.17-r1.ebuild} | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-)
Thanks!