mirror of
https://github.com/moparisthebest/pacman
synced 2024-08-13 17:03:46 -04:00
remove.c: downgrade TRANS_DUP_TARGET to warning
Matches the behavior for sync packages. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
00fbdabc55
commit
060d06d2f7
@ -43,10 +43,16 @@ static int remove_target(const char *target)
|
|||||||
|
|
||||||
if((pkg = alpm_db_get_pkg(db_local, target)) != NULL) {
|
if((pkg = alpm_db_get_pkg(db_local, target)) != NULL) {
|
||||||
if(alpm_remove_pkg(config->handle, pkg) == -1) {
|
if(alpm_remove_pkg(config->handle, pkg) == -1) {
|
||||||
pm_printf(ALPM_LOG_ERROR, "'%s': %s\n", target,
|
alpm_errno_t err = alpm_errno(config->handle);
|
||||||
alpm_strerror(alpm_errno(config->handle)));
|
if(err == ALPM_ERR_TRANS_DUP_TARGET) {
|
||||||
|
/* just skip duplicate targets */
|
||||||
|
pm_printf(ALPM_LOG_WARNING, _("skipping target: %s\n"), target);
|
||||||
|
return 0;
|
||||||
|
} else {
|
||||||
|
pm_printf(ALPM_LOG_ERROR, "'%s': %s\n", target, alpm_strerror(err));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
config->explicit_removes = alpm_list_add(config->explicit_removes, pkg);
|
config->explicit_removes = alpm_list_add(config->explicit_removes, pkg);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -5,5 +5,5 @@ self.addpkg2db("local", p)
|
|||||||
|
|
||||||
self.args = "-R " + "foo "*5
|
self.args = "-R " + "foo "*5
|
||||||
|
|
||||||
self.addrule("PACMAN_RETCODE=1")
|
self.addrule("PACMAN_RETCODE=0")
|
||||||
self.addrule("PKG_EXIST=foo")
|
self.addrule("!PKG_EXIST=foo")
|
||||||
|
Loading…
Reference in New Issue
Block a user