summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2010-08-13 11:38:31 +0200
committerPierre Schmitz <pierre@archlinux.de>2010-08-13 11:38:31 +0200
commit27abfce26dc4f667fb4702db40acf27317ecfd9f (patch)
tree055ccdd0060d1fd13a24da94427bd434bc7c0998
parent2f7415d9e0383dc9f86defdb9e41e397b0ae4cde (diff)
Simplify check for existing packages
-rwxr-xr-xdb-update15
1 files changed, 5 insertions, 10 deletions
diff --git a/db-update b/db-update
index 3372dfb..78a08b5 100755
--- a/db-update
+++ b/db-update
@@ -9,7 +9,6 @@ fi
. "$(dirname $0)/config"
reponame="$1"
-current_arch=""
if ! check_repo_permission "$reponame"; then
error "you shouldn't be updating $reponame on this server!"
@@ -27,15 +26,11 @@ fi
msg "Updating $reponame..."
-for current_arch in ${ARCHES[@]} any; do
- ftppath="$FTP_BASE/$reponame/os/$current_arch"
- for f in $stagedir/*-$current_arch$PKGEXT; do
- bf=$(basename $f)
- if [[ -f $ftppath/$bf ]]; then
- error "Package $bf already exists in $ftppath"
- exit 1
- fi
- done
+for f in $stagedir/*$PKGEXT; do
+ if [ -f "$FTP_BASE/$(get_pkgpool_for_host)/$(basename f)" ]; then
+ error "Package $(basename f) already exists"
+ exit 1
+ fi
done
# Process architecture-independent packages first.