error out if /lib64 or /usr/lib64 is found

This commit is contained in:
Leo 2020-06-16 14:30:39 -03:00 committed by Natanael Copa
parent b5549436df
commit cd004c0232
1 changed files with 10 additions and 0 deletions

View File

@ -743,6 +743,16 @@ postcheck() {
fi
fi
# Alpine Linux as a musl libc distro does not use /lib64 or /usr/lib64 under
# any circunstance, packages installing to it are 100% sure a packaging error
if [ -e "$dir"/lib64 ]; then
error "Packages must not put anything under /lib64, use /lib instead"
return 1
elif [ -e "$dir"/usr/lib64 ]; then
error "Packages must not put anything under /usr/lib64, use /usr/lib instead"
return 1
fi
# remove *.la files if libtool is not set
if ! options_has "libtool"; then
find "$dir" -name '*.la' -type f -delete