Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 723124

Summary: dev-util/pkgdiff uses ${D} during src_install() phase, causing failure while using Gentoo Prefix
Product: Gentoo Linux Reporter: ZongyuZ <zzy2529420793>
Component: Current packagesAssignee: Miroslav Šulc <fordfrog>
Status: RESOLVED FIXED    
Severity: normal CC: jstein
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build log of dev-uitls/pkgdiff-1.7.2
patch with dodir to create ${PREFIX}
New build log with Gentoo Prefix

Description ZongyuZ 2020-05-15 04:11:05 UTC
The ebuild of dev-util/pkgdiff uses the variable ${D} during the src_install() phase.

I tried to emerge this package inside a Gentoo Prefix.
Trying to install it to ${D} naturally caused failure since we cannot install it outside the Prefix.

I think maybe we should change ${D} to ${ED}.
Comment 1 ZongyuZ 2020-05-15 04:13:05 UTC
the output of emerge --info

Portage 2.3.99 (python 3.6.10-final-0, default/linux/amd64/17.0/no-multilib/prefix/kernel-3.2+, gcc-9.3.0, glibc-2.30-r5, 5.5.0-rc5-amd64 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.5.0-rc5-amd64-x86_64-AMD_EPYC_7702_64-Core_Processor-with-debian-10.3
KiB Mem:  1056657724 total,  16030100 free
KiB Swap:   63998972 total,  63997948 free
Timestamp of repository gentoo: Thu, 14 May 2020 18:15:01 +0000
Head commit of repository gentoo: b3c9738568a19e21a38b45d9263846ab19f144a8
sh bash 5.0_p16
ld GNU ld (Gentoo 2.30 p2) 2.30.0
distcc 3.3.3 x86_64-pc-linux-gnu [disabled]
app-shells/bash:          5.0_p16::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.30.1::gentoo
dev-lang/python:          2.7.17-r1::gentoo, 3.6.10::gentoo, 3.7.7-r1::gentoo, 3.8.2::gentoo
dev-util/cmake:           3.16.5::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.7::gentoo
sys-apps/openrc:          0.42.1::gentoo
sys-apps/sandbox:         2.18::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.16.1-r2::gentoo
sys-devel/binutils:       2.30-r2::gentoo, 2.33.1-r1::gentoo, 2.34::gentoo
sys-devel/gcc:            8.3.0-r3::gentoo, 9.2.0-r4::gentoo, 9.3.0::gentoo
sys-devel/gcc-config:     2.2.1::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.5::gentoo (virtual/os-headers)
sys-libs/glibc:           2.30-r5::gentoo
Repositories:

gentoo
    location: /opt/gentoo/var/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://mirrors.tuna.tsinghua.edu.cn/gentoo-portage
    priority: -1000
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-jobs: 1
    sync-rsync-extra-opts: 
    sync-rsync-verify-metamanifest: no

R_Overlay
    location: /opt/gentoo/var/repos/R_Overlay
    masters: gentoo
    priority: 50

science
    location: /opt/gentoo/var/repos/science
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=znver2"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /opt/gentoo/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /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 /opt/gentoo/etc/env.d /opt/gentoo/etc/gentoo-release"
CXXFLAGS="-O2 -pipe -march=znver2"
DISTDIR="/srv/repos/gentoo/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN 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 -march=znver2"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs candy config-protect-if-modified distlocks ebuild-locks fixlafiles force-prefix ipc-sandbox merge-sync multilib-strict network-sandbox parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sfperms strict unknown-features-warn unmerge-logs unmerge-orphans"
FFLAGS="-O2 -pipe -march=znver2"
GENTOO_MIRRORS="http://mirrors.tuna.tsinghua.edu.cn/gentoo"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-l128 -j256"
PKGDIR="/opt/gentoo/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/opt/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="/tmp"
USE="X acl amd64 berkdb byte-compile bzip2 cli crypt dri eselect-ldso fortran gdbm iconv ipv6 libtirpc ncurses nls nptl openmp pcre prefix readline seccomp split-usr ssl tcpd threads unicode 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 f16c fma3 mmx mmxext pclmul popcnt 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="void" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python3_6" RUBY_TARGETS="ruby25" USERLAND="GNU" VIDEO_CARDS="dummy" 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, LANG, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 ZongyuZ 2020-05-15 04:15:01 UTC
Created attachment 639110 [details]
build log of dev-uitls/pkgdiff-1.7.2
Comment 3 Larry the Git Cow gentoo-dev 2020-05-16 08:08:58 UTC
The bug has been closed via the following commit(s):

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

commit 5251a016c8602321a96af48cee07d9df8e320f70
Author:     Miroslav Šulc <fordfrog@gentoo.org>
AuthorDate: 2020-05-16 08:08:39 +0000
Commit:     Miroslav Šulc <fordfrog@gentoo.org>
CommitDate: 2020-05-16 08:08:39 +0000

    dev-util/pkgdiff: D -> ED in install phase
    
    Closes: https://bugs.gentoo.org/723124
    Package-Manager: Portage-2.3.99, Repoman-2.3.22
    Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>

 dev-util/pkgdiff/pkgdiff-1.7.2.ebuild | 4 ++--
 dev-util/pkgdiff/pkgdiff-9999.ebuild  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
Comment 4 ZongyuZ 2020-05-16 10:12:57 UTC
Created attachment 639598 [details, diff]
patch with dodir to create ${PREFIX}

a patch to make mkdir work properly
Comment 5 ZongyuZ 2020-05-16 10:14:35 UTC
It still failed, because it did not create ${ED}/${PREFIX} properly.

Maybe `dodir` will help to prevent this situation?
Comment 6 ZongyuZ 2020-05-16 10:15:26 UTC
Created attachment 639612 [details]
New build log with Gentoo Prefix
Comment 7 Larry the Git Cow gentoo-dev 2020-05-16 10:18:38 UTC
The bug has been closed via the following commit(s):

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

commit 2b7a99624bf6f2e80edeb87cc6f9baa41757fefc
Author:     Miroslav Šulc <fordfrog@gentoo.org>
AuthorDate: 2020-05-16 10:18:14 +0000
Commit:     Miroslav Šulc <fordfrog@gentoo.org>
CommitDate: 2020-05-16 10:18:31 +0000

    dev-util/pkgdiff: fixed install phase
    
    fix by ZongyuZ <zzy2529420793@gmail.com>
    
    Closes: https://bugs.gentoo.org/723124
    Package-Manager: Portage-2.3.99, Repoman-2.3.22
    Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>

 dev-util/pkgdiff/pkgdiff-1.7.2.ebuild | 2 +-
 dev-util/pkgdiff/pkgdiff-9999.ebuild  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)