summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/libalpm/sync.c6
-rw-r--r--test/pacman/tests/ignore006.py10
2 files changed, 15 insertions, 1 deletions
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);
diff --git a/test/pacman/tests/ignore006.py b/test/pacman/tests/ignore006.py
new file mode 100644
index 00000000..4c1c1cac
--- /dev/null
+++ b/test/pacman/tests/ignore006.py
@@ -0,0 +1,10 @@
+self.description = "Sync with target in ignore list and say no"
+
+pkg = pmpkg("package1")
+self.addpkg2db("sync", pkg)
+
+self.option["IgnorePkg"] = ["package1"]
+self.args = "--ask=1 -S %s" % pkg.name
+
+self.addrule("PACMAN_RETCODE=0")
+self.addrule("!PKG_EXIST=package1")