From 6c00ca8f234cfcbfde7e36b68d85f9dcab5716c8 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sun, 20 Jun 2010 15:15:05 -0500 Subject: Handle sync target + ignore properly Rather than say we can't find the target after saying "No, I guess I don't want to install this", we should make sure the ignored status gets passed all the way through. This fixes FS#19866. Pactest is also included that failed before due to the fact that we normally treat an unfound package as a reason to exit with a non-zero status. Signed-off-by: Dan McGee --- lib/libalpm/sync.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c index 67afd397..68ee8dc7 100644 --- a/lib/libalpm/sync.c +++ b/lib/libalpm/sync.c @@ -291,7 +291,11 @@ int _alpm_sync_target(alpm_list_t *dbs_sync, char *target) } if(!found) { - RET_ERR(PM_ERR_PKG_NOT_FOUND, -1); + /* pass through any 'found but ignored' errors */ + if(pm_errno != PM_ERR_PKG_IGNORED) { + pm_errno = PM_ERR_PKG_NOT_FOUND; + } + return(-1); } return(0); -- cgit v1.2.3-70-g09d2