summaryrefslogtreecommitdiff
path: root/sys-apps/portage/portage-3.0.16.ebuild
diff options
context:
space:
mode:
Diffstat (limited to 'sys-apps/portage/portage-3.0.16.ebuild')
-rw-r--r--sys-apps/portage/portage-3.0.16.ebuild11
1 files changed, 8 insertions, 3 deletions
diff --git a/sys-apps/portage/portage-3.0.16.ebuild b/sys-apps/portage/portage-3.0.16.ebuild
index 0c20c5376262..4bcace7f5405 100644
--- a/sys-apps/portage/portage-3.0.16.ebuild
+++ b/sys-apps/portage/portage-3.0.16.ebuild
@@ -6,6 +6,7 @@ EAPI=7
DISTUTILS_USE_SETUPTOOLS=no
PYTHON_COMPAT=( pypy3 python3_{7..9} )
PYTHON_REQ_USE='bzip2(+),threads(+)'
+TMPFILES_OPTIONAL=1
inherit distutils-r1 linux-info tmpfiles prefix
@@ -137,13 +138,17 @@ python_prepare_all() {
-w "/_BINARY/" lib/portage/const.py
einfo "Prefixing shebangs ..."
+ > "${T}/shebangs" || die
while read -r -d $'\0' ; do
local shebang=$(head -n1 "$REPLY")
if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then
- sed -i -e "1s:.*:#!${EPREFIX}${shebang:2}:" "$REPLY" || \
- die "sed failed"
+ echo "${REPLY}" >> "${T}/shebangs" || die
fi
- done < <(find . -type f ! -name etc-update -print0)
+ done < <(find . -type f -executable ! -name etc-update -print0)
+
+ if [[ -s ${T}/shebangs ]]; then
+ xargs sed -i -e "1s:^#!:#!${EPREFIX}:" < "${T}/shebangs" || die "sed failed"
+ fi
einfo "Adjusting make.globals, repos.conf and etc-update ..."
hprefixify cnf/{make.globals,repos.conf} bin/etc-update