diff options
author | Joshua Ismael Haase Hernández <hahj87@gmail.com> | 2011-05-08 19:04:39 -0700 |
---|---|---|
committer | Joshua Ismael Haase Hernández <hahj87@gmail.com> | 2011-05-08 19:04:39 -0700 |
commit | 3e7ae87a5a2ac70811a016d684a8a24ae18f49f8 (patch) | |
tree | ebde0bcade57dbb606a5454490cf6272a3e5119d /db-update | |
parent | cfb42f6cff6a6161dd7ecf9ac75eadad8af12ca9 (diff) |
* Unique pkgname list for nonfree and dbpkgs
Diffstat (limited to 'db-update')
-rwxr-xr-x | db-update | 17 |
1 files changed, 13 insertions, 4 deletions
@@ -78,17 +78,24 @@ for repo in ${repos[@]}; do done # Repo check nonfree -nonfree=($(cut -d: -f1 ${BLACKLIST_FILE})) +nonfree=($(cut -d: -f1 ${BLACKLIST_FILE} | sort -u)) for repo in ${ARCHREPOS[@]}; do - for pkgarch in ${ARCHARCHES[@]}; do + for pkgarch in ${ARCHES[@]}; do + if [ ! -f "${FTP_BASE}/${repo}/os/${pkgarch}/${repo}${DBEXT}" ]; then + continue + fi + unset dbpkgs + unset cleanpkgs cleanpkgs=() - dbpkgs=($(bsdtar -xOf "${FTP_BASE}/${repo}/os/${arch}/${repo}${DBEXT}" | awk '/^%NAME%/{getline;print}' | sort )) + 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 - arch_repo_remove "${repo}" "${pkgarch}" ${cleanpkgs[@]} + if [ ${#cleanpkgs[@]} -ge 1 ]; then + arch_repo_remove "${repo}" "${pkgarch}" ${cleanpkgs[@]} + fi done done @@ -97,3 +104,5 @@ for repo in ${repos[@]}; do repo_unlock ${repo} ${pkgarch} done done + + |