From 53fd8f019acfb8c3fa994d964a92a48660c9f4ab Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Fri, 13 Aug 2010 11:14:02 +0200 Subject: Abort if package already exists in repo Don't try to be smart and remove packages from the staging dir without asking. --- db-update | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'db-update') diff --git a/db-update b/db-update index b56a70f..f70bdb9 100755 --- a/db-update +++ b/db-update @@ -27,15 +27,13 @@ fi msg "Updating $reponame..." -# Remove any package from $stagedir that is already in the FTP repository 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 - warning " Package file $bf already exists in FTP repo" \ - " Removing from $stagedir" - /bin/rm $f + error "Package $bf already exists in $ftppath" + exit 1 fi done done -- cgit v1.2.3