aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2023-03-20 03:16:43 -0400
committerB. Watson <urchlay@slackware.uk>2023-03-20 03:16:43 -0400
commit76ce2b889d74d6b5586d465b65598d98d4b42412 (patch)
tree94a144210d1d4c41e06fdc2c2a46253d767a6f45
parent8b50871ef8fbbae6cf805c56efd79a87e378fbe7 (diff)
downloadsbo-maintainer-tools-76ce2b889d74d6b5586d465b65598d98d4b42412.tar.gz
sbopkglint: fix predoinst test.
-rwxr-xr-xsbopkglint14
1 files changed, 10 insertions, 4 deletions
diff --git a/sbopkglint b/sbopkglint
index 9029526..c0d7129 100755
--- a/sbopkglint
+++ b/sbopkglint
@@ -563,12 +563,18 @@ for package in $packages; do
# created by doinst, which would be OK).
echo -n "Exploding $package to $PKG ..."
olddir="$( pwd )"
+ package_fullpath="$( realpath $package )"
cd "$PKG"
- /sbin/explodepkg "$PKG" &> $PKG/.tmp.$$
- S="$?"
- if [ "$S" != "0" ]; then
+ /sbin/explodepkg "$package_fullpath" &> $PKG/.tmp.$$
+
+ # 20230319 bkw: explodepkg *never* exits with non-zero status, not
+ # even if the package file doesn't exist. don't bother checking.
+ # check for install/ dir instead: every valid slackware package has
+ # to have this dir.
+ if [ ! -d install ]; then
+ cat $PKG/.tmp.$$
+ warn "not a valid Slackware package"
echo_FAILED
- echo "explodepkg exited with status $S"
rm -rf $PKG
exit_status=1
continue