summaryrefslogtreecommitdiff
path: root/db-update
diff options
context:
space:
mode:
authorJoshua Ismael Haase Hernández <hahj87@gmail.com>2011-05-08 19:04:39 -0700
committerJoshua Ismael Haase Hernández <hahj87@gmail.com>2011-05-08 19:04:39 -0700
commit3e7ae87a5a2ac70811a016d684a8a24ae18f49f8 (patch)
treeebde0bcade57dbb606a5454490cf6272a3e5119d /db-update
parentcfb42f6cff6a6161dd7ecf9ac75eadad8af12ca9 (diff)
* Unique pkgname list for nonfree and dbpkgs
Diffstat (limited to 'db-update')
-rwxr-xr-xdb-update17
1 files changed, 13 insertions, 4 deletions
diff --git a/db-update b/db-update
index 6c220d9..f077aff 100755
--- a/db-update
+++ b/db-update
@@ -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
+
+