diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2010-08-13 11:14:02 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2010-08-13 11:14:02 +0200 |
commit | 53fd8f019acfb8c3fa994d964a92a48660c9f4ab (patch) | |
tree | 7cd8e8c3f200a72b4d500f2b9a700da4c3f93ca5 | |
parent | a422060414670bb49d2422a38467b73ae01e7ecb (diff) | |
download | dbscripts-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-x | db-update | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -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 |