diff options
author | Joshua Ismael Haase Hernández <hahj87@gmail.com> | 2011-05-08 18:45:02 -0500 |
---|---|---|
committer | Joshua Ismael Haase Hernández <hahj87@gmail.com> | 2011-05-08 18:45:02 -0500 |
commit | 74093d95cba935badaf7572e1dcd38ffd76bdc53 (patch) | |
tree | 7bf49456237829a0e37c6a8e8b83be5db16d4211 | |
parent | 63bf094a4e472b2bc15ed03fb956401b9246660e (diff) |
* Remove non free packages on db-update
-rw-r--r-- | config | 1 | ||||
-rwxr-xr-x | db-update | 17 |
2 files changed, 17 insertions, 1 deletions
@@ -33,3 +33,4 @@ PKGEXT=".pkg.tar.?z" SRCEXT=".src.tar.gz" MAKEPKGCONF="$HOME/etc/makepkg.conf" +BLACKLIST_FILE="$HOME/parabolagnulinux.org/docs/blacklist.txt"
\ No newline at end of file @@ -69,7 +69,7 @@ for repo in ${repos[@]}; do if [ -f "$FTP_BASE/${PKGPOOL}/${pkgfile}.sig" ]; then ln -s "../../../${PKGPOOL}/${pkgfile}.sig" "$FTP_BASE/$repo/os/${pkgarch}" fi - add_pkgs[${#add_pkgs[*]}]=${pkgfile} + add_pkgs[${#add_pkgs[*]}]=${pkgfile} done if [ ${#add_pkgs[@]} -ge 1 ]; then arch_repo_add "${repo}" "${pkgarch}" ${add_pkgs[@]} @@ -77,6 +77,21 @@ for repo in ${repos[@]}; do done done +# Repo check nonfree +nonfree=($(cut -d: -f1 ${BLACKLIST_FILE})) +for repo in ${ARCHREPOS[@]}; do + for pkgarch in ${ARCHARCHES[@]}; do + cleanpkgs=() + dbpkgs=($(bsdtar -xOf "${FTP_BASE}/${repo}/os/${arch}/${repo}${DBEXT}" | awk '/^%NAME%/{getline;print}' | sort )) + for pkgname in ${dbpkgs[@]}; do + if in_array ${pkgname} ${nonfree[@]}; then + cleanpkgs[${#cleanpkgs[*]}]=${pkgname} + fi + done + arch_repo_remove "${repo}" "${pkgarch}" ${cleanpkgs[@]} + done +done + for repo in ${repos[@]}; do for pkgarch in ${ARCHES[@]}; do repo_unlock ${repo} ${pkgarch} |