summaryrefslogtreecommitdiff
path: root/eclass/perl-functions.eclass
diff options
context:
space:
mode:
Diffstat (limited to 'eclass/perl-functions.eclass')
-rw-r--r--eclass/perl-functions.eclass19
1 files changed, 10 insertions, 9 deletions
diff --git a/eclass/perl-functions.eclass b/eclass/perl-functions.eclass
index d2b6cfb85f73..2b750ce53dca 100644
--- a/eclass/perl-functions.eclass
+++ b/eclass/perl-functions.eclass
@@ -16,11 +16,10 @@
# It provides helper functions, no phases or variable manipulation in
# global scope.
+if [[ -z ${_PERL_FUNCTIONS_ECLASS} ]]; then
+_PERL_FUNCTIONS_ECLASS=1
+
case ${EAPI} in
- 6)
- ewarn "${CATEGORY}/${PF}: ebuild uses ${ECLASS} with deprecated EAPI ${EAPI}!"
- ewarn "${CATEGORY}/${PF}: Support will be removed on 2024-10-08. Please port to newer EAPI."
- ;;
7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
@@ -158,18 +157,18 @@ perl_fix_packlist() {
einfo "Fixing packlist file /${f#${D}}"
# remove the temporary build dir path
- sed -i -e "s:${D%/}/:/:g" "${f}"
+ sed -i -e "s:${D}/:/:g" "${f}" || die
# remove duplicate entries
- sort -u "${f}" > "${packlist_temp}"
- mv "${packlist_temp}" "${f}"
+ sort -u "${f}" > "${packlist_temp}" || die
+ mv "${packlist_temp}" "${f}" || die
# remove files that dont exist
cat "${f}" | while read -r entry; do
if [[ ! -e ${D}/${entry} ]]; then
einfo "Pruning surplus packlist entry ${entry}"
grep -v -x -F "${entry}" "${f}" > "${packlist_temp}"
- mv "${packlist_temp}" "${f}"
+ mv "${packlist_temp}" "${f}" || die
fi
done
fi
@@ -186,7 +185,7 @@ perl_remove_temppath() {
find "${D}" -type f -not -name '*.so' -print0 | while read -rd '' f ; do
if file "${f}" | grep -q -i " text" ; then
grep -q "${D}" "${f}" && ewarn "QA: File contains a temporary path ${f}"
- sed -i -e "s:${D%/}/:/:g" "${f}"
+ sed -i -e "s:${D}/:/:g" "${f}" || die
fi
done
}
@@ -630,3 +629,5 @@ perl_get_wikiurl_features() {
perl_get_wikiurl_tests() {
perl_get_wikiurl Testing
}
+
+fi