I'm trying to update portage under a prefix environment, EPREFIX=/opt/gentoo The ebuild aborts at post-install phase, where "etc-update" has an invalid shebang: opt/gentoo/usr/sbin/etc-update:/opt/gentoo/opt/gentoo/bin/bash (explicit EPREFIX but target not found) This might relate to bug#677246 and commit b4a709ce51b8ab874c355c7edae8a56ba34cb985 where "hprefixify()" from prefix.eclass was used in the ebuild. In "python_prepare_all()", "etc-update" is first prefixed along all other files, getting a shebang "#!/opt/gentoo/bin/bash". Then it's changed into "#!/opt/gentoo/opt/gentoo/bin/bash" by "hprefixify()". Seems that "hprefixify()" would prefix any path starting with /(usr|lib(|[onx]?32|n?64)|etc|bin|sbin|var|opt|run) even if it's already under EPREFIX Reproducible: Always Steps to Reproduce: 1. setup a prefix environment at /opt/gentoo 2. install/update sys-apps/portage-2.3.67 Actual Results: ... >>> Completed installing portage-2.3.67 into /opt/gentoo/var/tmp/portage/sys-apps/portage-2.3.67/image/ * Final size of build directory: 19148 KiB (18.6 MiB) * Final size of installed tree: 35828 KiB (34.9 MiB) * QA Notice: the following files use invalid (possible non-prefixed) shebangs: * opt/gentoo/usr/sbin/etc-update:/opt/gentoo/opt/gentoo/bin/bash (explicit EPREFIX but target not found) * ERROR: sys-apps/portage-2.3.67::gentoo failed: * Aborting due to QA concerns: invalid shebangs found * * Call stack: * misc-functions.sh, line 586: Called install_qa_check * misc-functions.sh, line 132: Called source 'install_symlink_html_docs' * 05prefix, line 114: Called install_qa_check_prefix * 05prefix, line 110: Called die * The specific snippet of code: * die "Aborting due to QA concerns: invalid shebangs found" * * If you need support, post the output of `emerge --info '=sys-apps/portage-2.3.67::gentoo'`, * the complete build log and the output of `emerge -pqv '=sys-apps/portage-2.3.67::gentoo'`. * The complete build log is located at '/opt/gentoo/var/tmp/portage/sys-apps/portage-2.3.67/temp/build.log'. * The ebuild environment file is located at '/opt/gentoo/var/tmp/portage/sys-apps/portage-2.3.67/temp/environment'. * Working directory: '/opt/gentoo/var/tmp/portage/sys-apps/portage-2.3.67/image/opt/gentoo' * S: '/opt/gentoo/var/tmp/portage/sys-apps/portage-2.3.67/work/portage-2.3.67' !!! post install failed; exiting. Expected Results: without error
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=61aa6eec0b6b32818e6d77adfe78e163652d1baa commit 61aa6eec0b6b32818e6d77adfe78e163652d1baa Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2019-05-29 19:36:02 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2019-05-29 19:37:31 +0000 sys-apps/portage: fix etc-update shebang for prefix Reported-by: dingyuc@126.com Closes: https://bugs.gentoo.org/686940 Package-Manager: Portage-2.3.67, Repoman-2.3.13 Signed-off-by: Zac Medico <zmedico@gentoo.org> sys-apps/portage/portage-2.3.62-r2.ebuild | 2 +- sys-apps/portage/portage-2.3.66-r1.ebuild | 2 +- sys-apps/portage/portage-2.3.67.ebuild | 2 +- sys-apps/portage/portage-9999.ebuild | 24 ++++++------------------ 4 files changed, 9 insertions(+), 21 deletions(-)
Thanks!