[pacman-dev] [PATCH 1/6] repo-add: print warning if same version already exists
Xavier Chantry
shiningxc at gmail.com
Thu Feb 26 15:06:12 EST 2009
Simple fix for FS#13414
Signed-off-by: Xavier Chantry <shiningxc at gmail.com>
---
scripts/repo-add.sh.in | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in
index c6d25aa..b12188c 100644
--- a/scripts/repo-add.sh.in
+++ b/scripts/repo-add.sh.in
@@ -172,12 +172,16 @@ db_write_entry()
return 1
fi
- # remove an existing entry if it exists, ignore failures
- db_remove_entry "$pkgname"
-
startdir=$(pwd)
pushd "$gstmpdir" 2>&1 >/dev/null
+ if [ -d "$pkgname-$pkgver" ]; then
+ warning "$(gettext "An entry for '%s' already existed")" "$pkgname-$pkgver"
+ fi
+
+ # remove an existing entry if it exists, ignore failures
+ db_remove_entry "$pkgname"
+
# create package directory
mkdir "$pkgname-$pkgver"
cd "$pkgname-$pkgver"
--
1.6.1.3
More information about the pacman-dev
mailing list