From f09f82ee595319917c794dff69486bca851a5601 Mon Sep 17 00:00:00 2001 From: Xavier Chantry Date: Thu, 26 Feb 2009 18:00:15 +0100 Subject: repo-add: print warning if same version already exists Simple fix for FS#13414. Signed-off-by: Xavier Chantry Signed-off-by: Dan McGee --- scripts/repo-add.sh.in | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in index c6d25aac..b12188ce 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" -- cgit v1.2.3-70-g09d2