summaryrefslogtreecommitdiff
path: root/db-check-nonfree
diff options
context:
space:
mode:
authorJoshua Ismael Haase Hernández <hahj87@gmail.com>2011-06-13 08:17:13 -0700
committerJoshua Ismael Haase Hernández <hahj87@gmail.com>2011-06-13 08:17:13 -0700
commit7e8840e0a76d28c27ed7efc041106d338ca0c607 (patch)
treea7a1ad26af29f7cd968520741eb4bc698baa461e /db-check-nonfree
parentaf00a528573bb210260e20a0fa27a0a0a393244a (diff)
repos are working fine like this
Diffstat (limited to 'db-check-nonfree')
-rwxr-xr-xdb-check-nonfree11
1 files changed, 8 insertions, 3 deletions
diff --git a/db-check-nonfree b/db-check-nonfree
index d8f34f0..83efb14 100755
--- a/db-check-nonfree
+++ b/db-check-nonfree
@@ -23,10 +23,15 @@ for repo in ${ARCHREPOS[@]}; do
if [ ! -f "${FTP_BASE}/${repo}/os/${pkgarch}/${repo}${DBEXT}" ]; then
continue
fi
+ unset dbpkgs
unset cleanpkgs
- cmd_="$(dirname $0)/list_nonfree_in_db.py -k ${BLACKLIST_FILE} \
- -b ${FTP_BASE}/${repo}/os/${pkgarch}/${repo}${DBEXT}"
- cleanpkgs=($(${cmd_}))
+ cleanpkgs=()
+ dbpkgs=($(bsdtar -xOf "${FTP_BASE}/${repo}/os/${pkgarch}/${repo}${DBEXT}" | awk '/^%NAME%/{getline;print}' | sort -u ))
+ for pkgname in ${dbpkgs[@]}; do
+ if in_array ${pkgname} ${nonfree[@]}; then
+ cleanpkgs[${#cleanpkgs[*]}]=${pkgname}
+ fi
+ done
if [ ${#cleanpkgs[@]} -ge 1 ]; then
arch_repo_remove "${repo}" "${pkgarch}" ${cleanpkgs[@]}
fi