summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xlibremakepkg2
-rwxr-xr-xpkgbuild-check-nonfree24
2 files changed, 16 insertions, 10 deletions
diff --git a/libremakepkg b/libremakepkg
index b0e1371..3cbc844 100755
--- a/libremakepkg
+++ b/libremakepkg
@@ -60,7 +60,7 @@ while getopts ${libremakepkgargs} arg ; do
esac
done
-if [ $UID -ne 0 ]; then
+if [ ! -w / ]; then
error "This script must be run as root"
exit 1
fi
diff --git a/pkgbuild-check-nonfree b/pkgbuild-check-nonfree
index f3fcd95..e947a39 100755
--- a/pkgbuild-check-nonfree
+++ b/pkgbuild-check-nonfree
@@ -59,17 +59,23 @@ source ./PKGBUILD
# ./PKGBUILD.
msg "Looking for unfree dependencies"
for item in ${pkgname[@]} ${depends[@]} ${makedepends[@]} ; do
- # We cycle through all of the programs in the array (if any), and check if
- # they are in the `unfree' array.
+# We cycle through all of the programs in the array (if any), and check if
+# they are in the `unfree' array.
if in_array $item ${unfree[@]} ; then
- # if item has a free replacement, use error 16.
- if in_array $item-libre ${freerep[@]} ; then
- warning "$item -> $item-libre"
- else
- ev=15
+# If the package has a replacement of the same name, skip
+ if in_array $item ${freerep[@]} ; then
+ warning "$item is repackaged with the same name."
+ ev=0
+ continue
+# if item has a free replacement, use error 16.
+ elif in_array $item-libre ${freerep[@]} ; then
+ warning "$item -> $item-libre"
+ ev=16
+ else
+ ev=15
msg2 "found $item"
- fi
+ fi
fi
done
-exit $ev \ No newline at end of file
+exit $ev