Can't emerge virtual/awk-1 which is required in order to emerge evince. Reproducible: Always Steps to Reproduce: 1. emerge -1v virtual/awk Actual Results: # emerge -1v virtual/awk These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild N ] virtual/awk-1::gentoo 0 KiB Total: 1 package (1 new), Size of downloads: 0 KiB Would you like to merge these packages? [Yes/No] y >>> Verifying ebuild manifests >>> Emerging (1 of 1) virtual/awk-1::gentoo >>> Failed to emerge virtual/awk-1, Log file: >>> '/tmp/ebuild.logs/build/virtual/awk-1:20200220-124217.log' >>> Jobs: 0 of 1 complete, 1 failed Load avg: 0.17, 0.49, 1.51 * Package: virtual/awk-1 * Repository: gentoo * Maintainer: junghans@gentoo.org base-system@gentoo.org * USE: abi_x86_64 amd64 elibc_glibc kernel_linux userland_GNU * FEATURES: ccache fakeroot network-sandbox nostrip preserve-libs sandbox suidctl userpriv usersandbox >>> Unpacking source... >>> Source unpacked in /var/tmp/portage/virtual/awk-1/work * QA Notice: ECLASS 'estack' inherited illegally in virtual/awk-1 prepare /usr/lib/portage/python3.6/ebuild.sh: line 309: unset: IUSE: cannot unset: readonly variable /usr/lib/portage/python3.6/ebuild.sh: line 309: unset: REQUIRED_USE: cannot unset: readonly variable /usr/lib/portage/python3.6/ebuild.sh: line 309: unset: DEPEND: cannot unset: readonly variable /usr/lib/portage/python3.6/ebuild.sh: line 309: unset: RDEPEND: cannot unset: readonly variable /usr/lib/portage/python3.6/ebuild.sh: line 309: unset: PDEPEND: cannot unset: readonly variable /usr/lib/portage/python3.6/ebuild.sh: line 309: unset: BDEPEND: cannot unset: readonly variable /usr/lib/portage/python3.6/ebuild.sh: line 329: IUSE: readonly variable * The ebuild phase 'prepare' has exited unexpectedly. This type of * behavior is known to be triggered by things such as failed variable * assignments (bug #190128) or bad substitution errors (bug #200313). * Normally, before exiting, bash should have displayed an error message * above. If bash did not produce an error message above, it's possible * that the ebuild has called `exit` when it should have called `die` * instead. This behavior may also be triggered by a corrupt bash binary or * a hardware problem such as memory or cpu malfunction. If the problem is * not reproducible or it appears to occur randomly, then it is likely to * be triggered by a hardware problem. If you suspect a hardware problem * then you should try some basic hardware diagnostics such as memtest. * Please do not report this as a bug unless it is consistently * reproducible and you are sure that your bash binary and hardware are * functioning properly. * Messages for package virtual/awk-1: * Log file: /tmp/ebuild.logs/build/virtual/awk-1:20200220-124217.log * The ebuild phase 'prepare' has exited unexpectedly. This type of * behavior is known to be triggered by things such as failed variable * assignments (bug #190128) or bad substitution errors (bug #200313). * Normally, before exiting, bash should have displayed an error message * above. If bash did not produce an error message above, it's possible * that the ebuild has called `exit` when it should have called `die` * instead. This behavior may also be triggered by a corrupt bash binary or * a hardware problem such as memory or cpu malfunction. If the problem is * not reproducible or it appears to occur randomly, then it is likely to * be triggered by a hardware problem. If you suspect a hardware problem * then you should try some basic hardware diagnostics such as memtest. * Please do not report this as a bug unless it is consistently * reproducible and you are sure that your bash binary and hardware are * functioning properly. Expected Results: no failures during emerge This virtual/awk-1 gets emerged when I want to emerge evince: # time emerge -nav evince These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild N ] virtual/awk-1::gentoo 0 KiB [ebuild N ] dev-libs/libyaml-0.2.2::gentoo USE="-doc -static-libs -test" 0 KiB [ebuild N ] media-libs/lcms-2.9:2::gentoo USE="jpeg threads -doc -static-libs -test -tiff" ABI_X86="(64) -32 (-x32)" 0 KiB [ebuild N ] gnome-extra/yelp-xsl-3.32.1::gentoo 0 KiB [ebuild N ] dev-libs/json-glib-1.4.4::gentoo USE="introspection -gtk-doc" ABI_X86="(64) -32 (-x32)" 0 KiB [ebuild N ] net-libs/libpsl-0.21.0::gentoo USE="idn man -icu" ABI_X86="(64) -32 (-x32)" 0 KiB [ebuild N ] net-libs/libproxy-0.4.15-r1::gentoo USE="-gnome -kde -mono -networkmanager -spidermonkey -test -webkit" ABI_X86="(64) -32 (-x32)" 0 KiB [ebuild N ] media-libs/tiff-4.1.0::gentoo USE="cxx jpeg zlib -jbig -lzma -static-libs -test -webp -zstd" ABI_X86="(64) -32 (-x32)" 0 KiB [ebuild N ] app-text/yelp-tools-3.32.2::gentoo 0 KiB [ebuild N ] net-libs/glib-networking-2.60.4::gentoo USE="libproxy ssl -gnome -test" ABI_X86="(64) -32 (-x32)" 0 KiB [ebuild N ] media-libs/openjpeg-2.3.1:2/7::gentoo USE="-doc -static-libs -test" ABI_X86="(64) -32 (-x32)" 0 KiB [ebuild N ] app-text/poppler-0.85.0:0/95::gentoo USE="cairo cxx introspection jpeg jpeg2k lcms png qt5 utils -cjk -curl -debug -doc -nss -tiff" 0 KiB [ebuild N ] net-libs/libsoup-2.66.4:2.4::gentoo USE="introspection ssl vala -gssapi -gtk-doc -samba -test" ABI_X86="(64) -32 (-x32)" 0 KiB [ebuild N ] dev-libs/appstream-glib-0.7.16:0/8::gentoo USE="introspection -fonts -gtk-doc -stemmer" 0 KiB [ebuild N ] app-text/evince-3.32.1:0/evd3.4-evv3.3::gentoo USE="introspection -djvu -dvi -gnome -gnome-keyring -gstreamer -nautilus -nsplugin -postscript -spell -t1lib -tiff -xps" 0 KiB Total: 15 packages (15 new), Size of downloads: 0 KiB Would you like to merge these packages? [Yes/No] # emerge --info Portage 2.3.89 (python 3.6.10-final-0, default/linux/amd64/17.1, gcc-9.2.0, glibc-9999, 5.5.4-gentoo-x86_64 x86_64) ================================================================= System uname: Linux-5.5.4-gentoo-x86_64-x86_64-Intel-R-_Core-TM-_i7-8700K_CPU_@_3.70GHz-with-gentoo-2.7 KiB Mem: 32195932 total, 24850732 free KiB Swap: 0 total, 0 free Timestamp of repository gentoo: Thu, 20 Feb 2020 12:00:01 +0000 Head commit of repository gentoo: 1799bd53b7a5d2a3e7da6a4b6324eee80fc00171 sh bash 5.0_p16 ld GNU ld (Gentoo 2.34 p1) 2.34.0 ccache version 3.7.7 [enabled] app-shells/bash: 5.0_p16::gentoo dev-lang/perl: 5.30.1::gentoo dev-lang/python: 2.7.17-r1::gentoo, 3.6.10::gentoo, 3.7.6::gentoo, 3.8.1::gentoo dev-util/ccache: 3.7.7-r1::gentoo dev-util/cmake: 3.16.4::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.34::gentoo sys-devel/gcc: 9.2.0-r4::gentoo sys-devel/gcc-config: 2.2.1::gentoo sys-devel/libtool: 2.4.6-r6::gentoo sys-devel/make: 4.2.1-r4::gentoo sys-kernel/linux-headers: 5.5::gentoo (virtual/os-headers) sys-libs/glibc: 9999::gentoo Repositories: gentoo location: /var/db/repos/gentoo sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: 5000 sync-rsync-verify-metamanifest: yes sync-rsync-vcs-ignore: false sync-rsync-verify-jobs: 1 sync-rsync-extra-opts: sync-rsync-verify-max-age: 24 ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="@FREE" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=skylake -mtune=skylake-avx512 -mprefer-vector-width=128 -O2 -pipe -frecord-gcc-switches -ggdb -fvar-tracking-assignments -fno-omit-frame-pointer -ftrack-macro-expansion=2 -fstack-protector-all -Wno-trigraphs -fno-schedule-insns2 -fno-delete-null-pointer-checks -D_FORTIFY_SOURCE=2" 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" CXXFLAGS="-march=skylake -mtune=skylake-avx512 -mprefer-vector-width=128 -O2 -pipe -frecord-gcc-switches -ggdb -fvar-tracking-assignments -fno-omit-frame-pointer -ftrack-macro-expansion=2 -fstack-protector-all -Wno-trigraphs -fno-schedule-insns2 -fno-delete-null-pointer-checks -D_FORTIFY_SOURCE=2" DISTDIR="/var/cache/distfiles" EMERGE_DEFAULT_OPTS=" --jobs=4 --load-average=4 --keep-going n --ask --ask-enter-invalid --jobs=12 --load-average=12" 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="-march=skylake -mtune=skylake-avx512 -mprefer-vector-width=128 -O2 -pipe -frecord-gcc-switches -ggdb -fvar-tracking-assignments -fno-omit-frame-pointer -ftrack-macro-expansion=2 -fstack-protector-all -Wno-trigraphs -fno-schedule-insns2 -fno-delete-null-pointer-checks -D_FORTIFY_SOURCE=2" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs ccache cgroup collision-protect config-protect-if-modified distlocks downgrade-backup ebuild-locks fakeroot fixlafiles force-mirror ipc-sandbox merge-sync multilib-strict network-sandbox news nostrip parallel-fetch pid-sandbox prelink-checksums preserve-libs qa-unresolved-soname-deps sandbox sfperms skiprocheck split-elog split-log strict suidctl unknown-features-warn unmerge-logs userfetch userpriv usersandbox" FFLAGS="-march=skylake -mtune=skylake-avx512 -mprefer-vector-width=128 -O2 -pipe -frecord-gcc-switches -ggdb -fvar-tracking-assignments -fno-omit-frame-pointer -ftrack-macro-expansion=2 -fstack-protector-all -Wno-trigraphs -fno-schedule-insns2 -fno-delete-null-pointer-checks -D_FORTIFY_SOURCE=2" GENTOO_MIRRORS="https://mirrors.evowise.com/gentoo/ https://mirror.dkm.cz/gentoo/ https://ftp.fau.de/gentoo https://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ https://gentoo.wheel.sk/" INSTALL_MASK="/lib/systemd /lib32/systemd /lib64/systemd /usr/lib/systemd /usr/lib32/systemd /usr/lib64/systemd /etc/systemd" LANG="en_US.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="--no-keep-going -j18" PKGDIR="/var/cache/binpkgs" PORTAGE_BINHOST="" 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" USE="X acl aes amd64 avx avx2 berkdb bindist btrfs bzip2 ccache cli consolekit cscope cxx dbus dri extensions f16c fma3 gdbm git gpg gpm gtk3 iconv jpeg libtirpc lm_sensors lock mmx mmxext mosh-hardening multilib ncurses nptl ogg openmp opus pam pclmul pcre pie png policykit popcnt pulseaudio qt5 readline rsync-verify seccomp session smp source-highlight split-usr sse sse2 sse3 sse4_1 sse4_2 ssl ssp ssse3 startup-notification strong-security unicode xcomposite 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 sse sse2 sse3 sse4_1 sse4_2 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" GRUB_PLATFORMS="pc" INPUT_DEVICES="keyboard evdev" 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="python2_7 python3_6" RUBY_TARGETS="ruby24 ruby25" USERLAND="GNU" VIDEO_CARDS="intel" XFCE_PLUGINS="brightness clock trash battery power" 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, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
I don't think that is a bug in virtual/awk.
This looks like something you'd get via FEATURES=keeptemp or alike but I don't see it used here.
Created attachment 614618 [details] this is causing the issue: /etc/portage/bashrc because source-ing epatch.class from /etc/portage/bashrc, which in turn sources estack.class and thus resulting in this very bug/issue.
I mean, eclass not class: /var/db/repos/gentoo/eclass/epatch.eclass /var/db/repos/gentoo/eclass/estack.eclass
You're on your own with that bashrc code.
(In reply to Mike Gilbert from comment #5) > You're on your own with that bashrc code. Right, of course. I just didn't realize it was the cause until then. Sorry for wasting people's time. From now on, I promise to wait at least 2 days (during which I try to find the causes) before opening any (new)bug reports, as a sign of respect for devs time:) Cheers!
ok, so all I had to do to make it work with my bashrc (from above), was to just add the line "inherit eutils" in virtual/awk/awk-1.ebuild after the EAPI=5 line test with: # emerge --ask n --unmerge virtual/awk ; time emerge -v1 --ask n virtual/awk::localrepo The localrepo, for whoever stumbles upon this(including future me) was created as per [1] and [2] in order to make it more convenient to change/override ebuilds without modifying them in the rsync-ed repo directly. [1] https://wiki.gentoo.org/wiki/Handbook:AMD64/Portage/CustomTree#Defining_a_custom_repository [2] https://wiki.gentoo.org/wiki/Custom_repository#Creating_a_local_repository
on second thought, just 'inherit epatch' is necessary! which eutils already does.
(In reply to gentoo_eshoes from comment #7) > ok, so all I had to do to make it work with my bashrc (from above), was to > just add the line "inherit eutils" in virtual/awk/awk-1.ebuild after the > EAPI=5 line There's no valid reason for the virtual/awk ebuild to inherit any eclasses.
You're right, that's just something for my bashrc to work(and I'm still trying to figure out why). Nothing for Gentoo devs to change!
If I source/inherit epatch inside this 'if' (within /etc/portage/bashrc ofc): if [[ $EBUILD_PHASE == @(setup) ]]; then then it works without modifying virtual/awk-1 ebuild But if I try to source it inside this 'if': if [[ $EBUILD_PHASE == @(prepare|src_prepare) ]]; then or within these 3 functions(thus far tested): pre_pkg_setup() { post_pkg_setup() { pre_src_prepare() { then it fails as in OP. This seems a bit inconsistent because those pre/post_pkg_setup functions should be the same as that first 'if' mentioned: if [[ $EBUILD_PHASE == @(setup) ]]; then and yet, they act differently. oh well.
You should not need to source or inherit any eclasses inside bashrc, and it's not considered a valid use case. Ebuilds using EAPI 6 and later have built-in support for user patches via the eapply_user function. For ebuilds using older EAPIs, you can send a pull request to add an epatch_user call to the ebuild.