summaryrefslogtreecommitdiff
path: root/db-check-nonfree
diff options
context:
space:
mode:
Diffstat (limited to 'db-check-nonfree')
-rwxr-xr-xdb-check-nonfree12
1 files changed, 9 insertions, 3 deletions
diff --git a/db-check-nonfree b/db-check-nonfree
index d8f34f0..ab6491d 100755
--- a/db-check-nonfree
+++ b/db-check-nonfree
@@ -23,11 +23,17 @@ 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+=(${pkgname})
+ fi
+ done
if [ ${#cleanpkgs[@]} -ge 1 ]; then
+ msg2 "Unfree: ${cleanpkgs[@]}"
arch_repo_remove "${repo}" "${pkgarch}" ${cleanpkgs[@]}
fi
done