summaryrefslogtreecommitdiff
path: root/pkgbuild-check-nonfree
diff options
context:
space:
mode:
authorNicolás Reynolds <apoyosis@correo.inta.gob.ar>2011-05-16 19:14:47 -0300
committerNicolás Reynolds <apoyosis@correo.inta.gob.ar>2011-05-16 19:14:47 -0300
commitbf87a77517cb5d960865faaf820decaa338c4f63 (patch)
tree6c10ea4f2a80ae3d5df3ae08b40f6ad5c9195ed6 /pkgbuild-check-nonfree
parent56e183631d6e4e12df4990d119456dd81423938e (diff)
parent76c75b8971e4ad2f6c336c9413088e6fd0e70f69 (diff)
Merge branch 'master' of ssh://vparabola/srv/git/projects/libretools
Conflicts: libremakepkg
Diffstat (limited to 'pkgbuild-check-nonfree')
-rwxr-xr-xpkgbuild-check-nonfree18
1 files changed, 13 insertions, 5 deletions
diff --git a/pkgbuild-check-nonfree b/pkgbuild-check-nonfree
index c55e7f6..7f04787 100755
--- a/pkgbuild-check-nonfree
+++ b/pkgbuild-check-nonfree
@@ -23,7 +23,7 @@ source /etc/libretools.conf
[[ -f $XDG_CONFIG_HOME/libretools/libretools.conf ]] && \
source $XDG_CONFIG_HOME/libretools/libretools.conf
-pushd /tmp >/dev/null
+pushd $(mktemp -d) >/dev/null
# This is the exit status.
ev=0
@@ -44,6 +44,7 @@ wget -N -q -O blacklist.txt "${BLACKLIST}" 2>/dev/null || {
# Get everything before the `:' in the blacklist (that's the names of the
# packages).
unfree=($(cut -d: -f1 blacklist.txt))
+freerep=($(cut -d: -f2 blacklist.txt))
popd >/dev/null
@@ -59,10 +60,17 @@ 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.
- if in_array $item ${unfree[@]}
- then
- ev=15
- msg2 "found $item"
+ 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"
+ if [[ $ev -ne 15 ]]; then
+ ev=16
+ fi
+ else
+ ev=15
+ msg2 "found $item"
+ fi
fi
done