From e259c23bb739c3129e23e053cf1c5a846c6c3e76 Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Tue, 6 May 2008 18:28:34 -0400 Subject: Fix file deletion on package removal Signed-off-by: Aaron Griffin --- db-update | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'db-update') diff --git a/db-update b/db-update index db96704..2dfda2a 100755 --- a/db-update +++ b/db-update @@ -167,14 +167,16 @@ if [ -n "$REMPKGS" ]; then # copy the db file into our working area [ -f "$ftppath/$reponame.db.tar.gz" ] && cp "$ftppath/$reponame.db.tar.gz" build/ - for rem in $to_rem; do - if [ -f "build/$rem" ]; then - /bin/rm "build/$rem" - fi - done cd build/ /usr/bin/repo-remove "$reponame.db.tar.$DB_COMPRESSION" $to_rem + + for rem in $to_rem; do + if [ -f "$ftppath/$rem" ]; then + /bin/rm "$ftppath/$rem" + /bin/rm "$rem" + fi + done else echo "No packages to delete" fi -- cgit v1.2.3-24-g4f1b