Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 911966 - sys-apps/portage-3.0.50: does not install under prefix
Summary: sys-apps/portage-3.0.50: does not install under prefix
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-09 11:04 UTC by Marien Zwart
Modified: 2023-08-09 17:08 UTC (History)
1 user (show)

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


Attachments
build.log (build.log,343.98 KB, text/plain)
2023-08-09 11:04 UTC, Marien Zwart
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marien Zwart 2023-08-09 11:04:29 UTC
Created attachment 867473 [details]
build.log

In a prefix install (installed into ~/gentoo):

Running custom install script '/home/marienz/gentoo/usr/bin/python3.11 /home/marienz/gentoo/var/tmp/portage/sys-apps/portage-3.0.50/work/portage-3.0.50-python3_11/meson-private/pycompile.py python-3.11-installed.json 0'
 * Optimize Python modules for /home/marienz/gentoo/usr/lib/python3.11/site-packages
 * Optimize Python modules for /usr/lib/portage/python3.11
Can't list '/home/marienz/gentoo/var/tmp/portage/sys-apps/portage-3.0.50/image/usr/lib/portage/python3.11'
 * Fixing shebang in /home/marienz/gentoo/usr/lib/python3.11/site-packages/portage/tests/conftest.py.
 * Fixing shebang in /home/marienz/gentoo/usr/lib/python3.11/site-packages/portage/util/changelog.py.
find: ‘/home/marienz/gentoo/var/tmp/portage/sys-apps/portage-3.0.50/image/usr/lib/portage/python3.11’: No such file or directory
 * ERROR: sys-apps/portage-3.0.50::gentoo failed (install phase):
 *   (no error message)
 *
 * Call stack:
 *     ebuild.sh, line  136:  Called src_install
 *   environment, line 3271:  Called python_foreach_impl 'my_src_install'
 *   environment, line 2913:  Called multibuild_foreach_variant '_python_multibuild_wrapper' 'my_src_install'
 *   environment, line 2404:  Called _multibuild_run '_python_multibuild_wrapper' 'my_src_install'
 *   environment, line 2402:  Called _python_multibuild_wrapper 'my_src_install'
 *   environment, line  809:  Called my_src_install
 *   environment, line 2651:  Called python_fix_shebang '/home/marienz/gentoo/var/tmp/portage/sys-apps/portage-3.0.50/image/home/marienz/gentoo/usr/lib/python3.11/site-packages' '/home/marienz/gentoo/var/tmp/portage/sys-apps/portage-3.0.50/image/usr/lib/portage/python3.11'
 *   environment, line 2838:  Called die

/home/marienz/gentoo/var/tmp/portage/sys-apps/portage-3.0.50/image/home/marienz/gentoo/usr/lib/portage/python3.11 does exist. The ebuild contains:

        local pydirs=(
                "${D}$(python_get_sitedir)"
                "${D}/usr/lib/portage/${EPYTHON}"
        )

and it looks like the second half of that doesn't take prefix into account.

% emerge --info '=sys-apps/portage-3.0.50::gentoo'
Portage 3.0.49 (python 3.12.0-candidate-1, default/linux/amd64/17.1/no-multilib/prefix/kernel-3.2+, gcc-13, glibc-2.37-r4, 6.4.7-200.fc38.x86_64 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-6.4.7-200.fc38.x86_64-x86_64-AMD_Ryzen_9_5900X_12-Core_Processor-with-glibc2.37
KiB Mem:    65722356 total,  55135832 free
KiB Swap:    8388604 total,   8388604 free
Timestamp of repository gentoo: Wed, 09 Aug 2023 09:45:01 +0000
Head commit of repository gentoo: 94f9589bc808d609d82bf67a1e76b8b396c8b00f
sh bash 5.2_p15-r6
ld GNU ld (Gentoo 2.41 p2) 2.41.0
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p15-r6::gentoo
dev-lang/perl:             5.38.0-r1::gentoo
dev-lang/python:           3.11.4::gentoo, 3.12.0_rc1::gentoo
dev-lang/rust:             1.71.1::gentoo
dev-util/cmake:            3.27.1-r1::gentoo
dev-util/meson:            1.2.1::gentoo
sys-apps/baselayout:       2.14::gentoo
sys-apps/sandbox:          2.38::gentoo
sys-devel/autoconf:        2.71-r7::gentoo
sys-devel/automake:        1.16.5-r1::gentoo
sys-devel/binutils:        2.41-r1::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/gcc:             13.2.0::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/libtool:         2.4.7-r1::gentoo
sys-devel/llvm:            16.0.6::gentoo
sys-devel/make:            4.4.1-r1::gentoo
sys-kernel/linux-headers:  6.4::gentoo (virtual/os-headers)
sys-libs/glibc:            2.37-r4::gentoo
Repositories:

gentoo
    location: /home/marienz/gentoo/var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://minotaur/gentoo-portage
    priority: -1000
    volatile: True
    sync-rsync-verify-jobs: 1
    sync-rsync-extra-opts:
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-metamanifest: yes

marienz
    location: /home/marienz/portage
    masters: gentoo
    volatile: True

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/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /home/marienz/gentoo/e
tc/env.d"
CONFIG_SHELL="/home/marienz/gentoo/bin/bash"
CXXFLAGS="-O2 -pipe -ggdb -O2 -pipe -march=native"
DISTDIR="/home/marienz/gentoo/var/cache/distfiles"
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 XAUTHO
RITY 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 binpkg-multi-instance buildpkg-live collision-protect compressdebug config-protect-if-modi
fied distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unr
esolved-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"
LEX="flex"
MAKEOPTS="-j22"
PKGDIR="/home/marienz/gentoo/var/cache/binpkgs"
PORTAGE_COMPRESS="zstd"
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 --timeou
t=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/home/marienz/gentoo/var/tmp"
RUSTFLAGS=""
SHELL="/home/marienz/gentoo/bin/zsh"
USE="acl adns amd64 avahi btrfs bzip2 canberra caps cdio chromecast clang cli clutter corefonts crypt dav1d dbus default-gold device-mapper distinct-l dos dot d
ri dri3 drm dvi efi egl expat ffmpeg fontconfig fuse g3dvl gbm geckodriver gegl gflags ghcbootstrap gles2 gmp gnuefi gold google gpg hostonly http http2 iconv i
cu idn imap inotify ipv6 irc json lame libass libdrm libffi libidn2 libinput libkms libtirpc libvisual libxml2 llvm llvm-shared-libs lm-sensors lto lua lzma mai
ldir mtp multimedia ncurses nfsidmap nls nptl numpy openmp opus pcre32 pgo playlist postscript prefix prelink preview-latex projectm python python3 qml readline
 realtime s3tc seccomp semantic-desktop sip smtp speex spice split-usr sqlite ssl svc system-bootstrap system-harfbuzz system-icu system-jflex system-jpeg syste
m-jsoncpp system-llvm sysv-utils test-rust theora toolkit-scroll-bars udisks2 uefi unicode unicode3 unwind urwid usbredir user-session vaapi vala vpx vulkan way
land webkit webp widevine widgets xattr xcomposite xetex xft xinerama xml xmp xwayland zlib zsh-completion zstd" ABI_X86="64" ADA_TARGET="gnat_2021" APACHE2_MOD
ULES="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 header
s 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 mt
k3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KER
NEL="linux" L10N="en en-GB en-US nl fy" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-co
nsole presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-1" POSTGRES_TARGETS="postgres15
" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11 pypy3 python3_12" QEMU_SOFTMMU_TARGETS="x86_64" RUBY_TARGETS="ruby26" VIDEO_CARDS="amdgpu fbdev i
ntel nouveau radeon radeonsi vesa dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysr
q proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPRO
F, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS_FLAGS,
PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, SIZE, STRINGS, STRIP, YACC, YFLAGS


% emerge -pqv '=sys-apps/portage-3.0.50::gentoo'
[ebuild     U ] sys-apps/portage-3.0.50 [3.0.49-r2] USE="(ipc) rsync-verify xattr -apidoc -build -doc -gentoo-dev (-native-extensions) (-selinux) -test (-debug%)" PYTHON_TARGETS="pypy3 python3_11 python3_12 -python3_10"

(that has pypy3, the above error message does not, because I ran the above with PYTHON_TARGETS='python3_11 python3_12' to make sure it wasn't a pypy-specific problem. With pypy3 enabled, it fails on /home/marienz/gentoo/var/tmp/portage/sys-apps/portage-3.0.50/image/usr/lib/portage/pypy3 while /home/marienz/gentoo/var/tmp/portage/sys-apps/portage-3.0.50/image/home/marienz/gentoo/usr/lib/portage/pypy3 exists, same problem.)
Comment 1 Larry the Git Cow gentoo-dev 2023-08-09 17:06:17 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ec78431e571874c6b292dd42b9895e28e07399ce

commit ec78431e571874c6b292dd42b9895e28e07399ce
Author:     James Le Cuirot <chewi@gentoo.org>
AuthorDate: 2023-08-09 17:05:41 +0000
Commit:     James Le Cuirot <chewi@gentoo.org>
CommitDate: 2023-08-09 17:05:41 +0000

    sys-apps/portage: Fix unprefixed Portage lib path in src_install
    
    Closes: https://bugs.gentoo.org/911966
    Signed-off-by: James Le Cuirot <chewi@gentoo.org>

 sys-apps/portage/portage-3.0.50.ebuild | 2 +-
 sys-apps/portage/portage-9999.ebuild   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Comment 2 James Le Cuirot gentoo-dev 2023-08-09 17:08:05 UTC
Thanks for reporting. That was my bad. I initially had ED on both lines, but pkgcheck complained about the first line. I should have left the second line as it was.

On a side note, cross-prefix is still broken here, as python_get_sitedir returns the wrong thing, but that requires an eclass fix.