diff options
author | Nicolás Reynolds <apoyosis@correo.inta.gob.ar> | 2011-06-09 16:37:38 -0300 |
---|---|---|
committer | Nicolás Reynolds <apoyosis@correo.inta.gob.ar> | 2011-06-09 16:37:38 -0300 |
commit | 53f875ec295855c6170b61b06d792f8376b514a7 (patch) | |
tree | 3b158af93a636b914a0877d2acac3ea84ea8016f | |
parent | 0dd66858186c4830d29b7b0011d9053739e87819 (diff) |
pkgbuild-check-nonfree doesn't fail when the package shares the same name with the free replacement (ie. initscripts, pacman, etc.)
-rwxr-xr-x | pkgbuild-check-nonfree | 24 |
1 files changed, 15 insertions, 9 deletions
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 |