mirror of
https://github.com/moparisthebest/pacman
synced 2025-01-10 13:28:12 -05:00
updatesync: incorrect package deletion logic
Fixes FS#9279. Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
c028014f96
commit
b1103a3eaf
@ -116,11 +116,11 @@ if [ "$4" != "" ]; then
|
|||||||
fi
|
fi
|
||||||
opt_force=""
|
opt_force=""
|
||||||
|
|
||||||
if [ ! -f "$option" ]; then
|
|
||||||
die "$(gettext "%s not found")" $option
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$action" = "upd" ]; then # INSERT / UPDATE
|
if [ "$action" = "upd" ]; then # INSERT / UPDATE
|
||||||
|
if [ ! -f "$option" ]; then
|
||||||
|
die "$(gettext "%s not found")" $option
|
||||||
|
fi
|
||||||
|
|
||||||
unset pkgname pkgver pkgrel options
|
unset pkgname pkgver pkgrel options
|
||||||
|
|
||||||
source $option || die "$(gettext "failed to parse %s")" $option
|
source $option || die "$(gettext "failed to parse %s")" $option
|
||||||
@ -141,10 +141,14 @@ if [ "$action" = "upd" ]; then # INSERT / UPDATE
|
|||||||
else # DELETE
|
else # DELETE
|
||||||
fname="$(basename $option)"
|
fname="$(basename $option)"
|
||||||
if [ "$fname" = "PKGBUILD" ]; then
|
if [ "$fname" = "PKGBUILD" ]; then
|
||||||
|
if [ ! -f "$option" ]; then
|
||||||
|
die "$(gettext "%s not found")" $option
|
||||||
|
fi
|
||||||
|
|
||||||
unset pkgname pkgver pkgrel options
|
unset pkgname pkgver pkgrel options
|
||||||
source $option
|
source $option
|
||||||
else
|
else
|
||||||
pkgname=$1
|
pkgname=$option
|
||||||
fi
|
fi
|
||||||
|
|
||||||
repo-remove "$pkgdb" "$pkgname"
|
repo-remove "$pkgdb" "$pkgname"
|
||||||
|
Loading…
Reference in New Issue
Block a user