index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Andrew Gregory <andrew.gregory.8@gmail.com> | 2014-05-05 22:34:15 -0400 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2014-05-07 14:14:41 +1000 |
commit | 060d06d2f7f93ebc2d3af6a0846f06b2f7d38c3a (patch) | |
tree | 0ad03db69d906fad3ee62fbfb01679cfdbd0cd34 /src | |
parent | 00fbdabc55c1de28f65eef27cb6448608c3d4e1f (diff) |
-rw-r--r-- | src/pacman/remove.c | 12 |
diff --git a/src/pacman/remove.c b/src/pacman/remove.c index 933e6f72..38ad2a29 100644 --- a/src/pacman/remove.c +++ b/src/pacman/remove.c @@ -43,9 +43,15 @@ static int remove_target(const char *target) if((pkg = alpm_db_get_pkg(db_local, target)) != NULL) { if(alpm_remove_pkg(config->handle, pkg) == -1) { - pm_printf(ALPM_LOG_ERROR, "'%s': %s\n", target, - alpm_strerror(alpm_errno(config->handle))); - return -1; + alpm_errno_t err = 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; + } } config->explicit_removes = alpm_list_add(config->explicit_removes, pkg); return 0; |