common/hooks/post-install: show error in $STRIPCMD in 06-strip-and-debug.

Currently fails with a hard to understand error message:

    2021-04-16T11:51:36.1074291Z => ERROR: rust-std-1.51.0_1: post-install_06-strip-and-debug-pkgs: '$STRIPCMD --strip-unneeded "$f"' exited with 1
This commit is contained in:
Érico Nogueira 2021-04-16 09:59:51 -03:00 committed by q66
parent 3ba7e39a80
commit 3d62ba684f

View file

@ -86,16 +86,14 @@ hook() {
chmod +w "$f"
if [[ $(file $f) =~ "statically linked" ]]; then
# static binary
$STRIPCMD "$f"
if [ $? -ne 0 ]; then
if ! $STRIPCMD "$f"; then
msg_red "$pkgver: failed to strip ${f#$PKGDESTDIR}\n"
return 1
fi
echo " Stripped static executable: ${f#$PKGDESTDIR}"
else
make_debug "$f"
$STRIPCMD "$f"
if [ $? -ne 0 ]; then
if ! $STRIPCMD "$f"; then
msg_red "$pkgver: failed to strip ${f#$PKGDESTDIR}\n"
return 1
fi
@ -125,8 +123,7 @@ hook() {
chmod +w "$f"
# shared library
make_debug "$f"
$STRIPCMD --strip-unneeded "$f"
if [ $? -ne 0 ]; then
if ! $STRIPCMD --strip-unneeded "$f"; then
msg_red "$pkgver: failed to strip ${f#$PKGDESTDIR}\n"
return 1
fi
@ -139,8 +136,7 @@ hook() {
;;
application/x-archive*)
chmod +w "$f"
$STRIPCMD --strip-debug "$f"
if [ $? -ne 0 ]; then
if ! $STRIPCMD --strip-debug "$f"; then
msg_red "$pkgver: failed to strip ${f#$PKGDESTDIR}\n"
return 1
fi