From 27abfce26dc4f667fb4702db40acf27317ecfd9f Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Fri, 13 Aug 2010 11:38:31 +0200 Subject: Simplify check for existing packages --- db-update | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'db-update') 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. -- cgit v1.2.3