mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-29 17:41:05 +02:00
eclass/perl-functions: Sync with Gentoo
It's from Gentoo commit 9262dbfb4b2ef95044b3f3d12ced0eba9310f25b.
This commit is contained in:
parent
e690e2782e
commit
5114d15af8
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user