post-install: warn if cross wrapper not cleared
This commit is contained in:
parent
eef02a2b84
commit
d7f942b709
1 changed files with 21 additions and 0 deletions
21
common/hooks/post-install/99-pkglint-warn-cross-cruft.sh
Normal file
21
common/hooks/post-install/99-pkglint-warn-cross-cruft.sh
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
# This hook warns if :
|
||||||
|
# - Any text file /usr/{bin,lib,libexec,share} contains $XBPS_CROSS_BASE
|
||||||
|
# - Any text file /usr/{bin,lib,libexec,share} contains $XBPS_WRAPPERDIR
|
||||||
|
|
||||||
|
hook() {
|
||||||
|
if [ -z "$CROSS_BUILD" ]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
for d in bin lib libexec share; do
|
||||||
|
for f in $PKGDESTDIR/usr/$d/* $PKGDESTDIR/usr/$d/**/*; do
|
||||||
|
case "$(file -bi "$f")" in
|
||||||
|
text/*) if grep -q -e "$XBPS_CROSS_BASE" \
|
||||||
|
-e "$XBPS_WRAPPERDIR" "$f"; then
|
||||||
|
msg_warn "${f#$PKGDESTDIR} has cross cruft\n"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
done
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
Reference in a new issue