diff options
author | Chantry Xavier <shiningxc@gmail.com> | 2008-02-02 23:21:24 +0100 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2008-02-03 01:52:37 +0100 |
commit | 37bb99abfa5672e101e34579882e22c7a1016a9b (patch) | |
tree | ae30895e00cda5d3fc4b51d24272acb7acfdb3c2 | |
parent | 7786bf6024b6fbf13ba474aaa24613f2079d8cef (diff) | |
download | pacman-37bb99abfa5672e101e34579882e22c7a1016a9b.tar.gz pacman-37bb99abfa5672e101e34579882e22c7a1016a9b.tar.xz |
repo-remove: print an error in case of an empty db
When removing the last packages from a database, repo-remove silently
failed. Now an error is printed.
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r-- | scripts/repo-remove.sh.in | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/repo-remove.sh.in b/scripts/repo-remove.sh.in index 05bec390..fe230b02 100644 --- a/scripts/repo-remove.sh.in +++ b/scripts/repo-remove.sh.in @@ -25,7 +25,6 @@ export TEXTDOMAINDIR='@localedir@' myver='@PACKAGE_VERSION@' confdir='@sysconfdir@' -FORCE=0 REPO_DB_FILE="" msg() { @@ -169,6 +168,9 @@ if [ $success -eq 1 ]; then esac bsdtar -c${TAR_OPT}f "$REPO_DB_FILE" * + else + error "$(gettext "All packages have been removed from the database. Deleting '%s'.")" "$REPO_DB_FILE" + rm "$REPO_DB_FILE" fi popd 2>&1 >/dev/null |