From 77efd512165ca2066dc6547bda52082f8bd11db2 Mon Sep 17 00:00:00 2001 From: Nagy Gabor Date: Sun, 9 Nov 2008 17:34:49 +0100 Subject: New error type: PM_ERR_PKG_IGNORED This patch fixes FS#12059. Now sync_addtarget can return with PM_ERR_PKG_IGNORED, which indicates that although the requested package was found it is in ignorepkg, so alpm could not add it to the transaction. So the front-end can decide what to do. Signed-off-by: Nagy Gabor Signed-off-by: Dan McGee --- src/pacman/sync.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/pacman/sync.c b/src/pacman/sync.c index d8a63481..0e193551 100644 --- a/src/pacman/sync.c +++ b/src/pacman/sync.c @@ -574,11 +574,12 @@ static int sync_trans(alpm_list_t *targets) char *targ = alpm_list_getdata(i); if(alpm_trans_addtarget(targ) == -1) { pmgrp_t *grp = NULL; - int found=0; + int found = 0; alpm_list_t *j; - if(pm_errno == PM_ERR_TRANS_DUP_TARGET) { - /* just ignore duplicate targets */ + if(pm_errno == PM_ERR_TRANS_DUP_TARGET || pm_errno == PM_ERR_PKG_IGNORED) { + /* just skip duplicate or ignored targets */ + pm_printf(PM_LOG_WARNING, _("skipping target: %s\n"), targ); continue; } if(pm_errno != PM_ERR_PKG_NOT_FOUND) { -- cgit v1.2.3