summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2010-08-13 11:14:02 +0200
committerPierre Schmitz <pierre@archlinux.de>2010-08-13 11:14:02 +0200
commit53fd8f019acfb8c3fa994d964a92a48660c9f4ab (patch)
tree7cd8e8c3f200a72b4d500f2b9a700da4c3f93ca5
parenta422060414670bb49d2422a38467b73ae01e7ecb (diff)
downloaddbscripts-53fd8f019acfb8c3fa994d964a92a48660c9f4ab.tar.gz
dbscripts-53fd8f019acfb8c3fa994d964a92a48660c9f4ab.tar.xz
Abort if package already exists in repo
Don't try to be smart and remove packages from the staging dir without asking.
-rwxr-xr-xdb-update6
1 files changed, 2 insertions, 4 deletions
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