diff options
author | Alex Merry <huntedhacker@tiscali.co.uk> | 2008-02-02 17:09:06 +0100 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2008-02-02 17:09:06 +0100 |
commit | b1103a3eaf0c6bb2982ac90000628baa2d5c2079 (patch) | |
tree | a15cbd919891dfe25378c885f2dbedb65cff1ab8 /scripts | |
parent | c028014f96911930bf3b7dce08c0fe997cedfc69 (diff) | |
download | pacman-b1103a3eaf0c6bb2982ac90000628baa2d5c2079.tar.gz pacman-b1103a3eaf0c6bb2982ac90000628baa2d5c2079.tar.xz |
updatesync: incorrect package deletion logic
Fixes FS#9279.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/updatesync.sh.in | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/scripts/updatesync.sh.in b/scripts/updatesync.sh.in index 900f11f3..c777d1f1 100644 --- a/scripts/updatesync.sh.in +++ b/scripts/updatesync.sh.in @@ -116,11 +116,11 @@ if [ "$4" != "" ]; then fi opt_force="" -if [ ! -f "$option" ]; then - die "$(gettext "%s not found")" $option -fi - if [ "$action" = "upd" ]; then # INSERT / UPDATE + if [ ! -f "$option" ]; then + die "$(gettext "%s not found")" $option + fi + unset pkgname pkgver pkgrel options source $option || die "$(gettext "failed to parse %s")" $option @@ -141,10 +141,14 @@ if [ "$action" = "upd" ]; then # INSERT / UPDATE else # DELETE fname="$(basename $option)" if [ "$fname" = "PKGBUILD" ]; then + if [ ! -f "$option" ]; then + die "$(gettext "%s not found")" $option + fi + unset pkgname pkgver pkgrel options source $option else - pkgname=$1 + pkgname=$option fi repo-remove "$pkgdb" "$pkgname" |