summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-02-25 14:55:16 +0100
committerDan McGee <dan@archlinux.org>2011-02-25 14:55:16 +0100
commit2f96764058b89ff32c928a736308c5095f1ff764 (patch)
treeb85aa9d1b41b62d38f0ac8aba87bdbcd806d9375 /test
parentd4d304cdb7b59e3b5ab7d5825404593a3476f127 (diff)
downloadpacman-2f96764058b89ff32c928a736308c5095f1ff764.tar.gz
pacman-2f96764058b89ff32c928a736308c5095f1ff764.tar.xz
Continue resolving dependencies rather than bailing on first error
This allows error messages emitted by the frontend to be a bit more descriptive and not have the annoying "well why didn't you tell me that the first time" problem. If a package had multiple missing deps, we would bail on the first one before rather than finish processing all missing dependencies, and only print one error message. Instead, continue through this entire set of missing deps and append all eventual errors. The added pactest tests this case, as the to be installed package has two missing dependencies. However, pactest does not actually test or see the difference in output from before and after, so it passes in both cases, but it is clearly visible in the logs. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'test')
-rw-r--r--test/pacman/tests/upgrade077.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/pacman/tests/upgrade077.py b/test/pacman/tests/upgrade077.py
new file mode 100644
index 00000000..c1d7a54c
--- /dev/null
+++ b/test/pacman/tests/upgrade077.py
@@ -0,0 +1,17 @@
+self.description = "Install a package with multiple missing dependencies"
+
+p = pmpkg("dummy")
+p.files = ["bin/dummy",
+ "usr/man/man1/dummy.1"]
+p.depends = ["dep1", "dep2", "dep3"]
+self.addpkg(p)
+
+p2 = pmpkg("dep2")
+self.addpkg(p2)
+
+self.args = "-U %s %s" % (p.filename(), p2.filename())
+
+self.addrule("PACMAN_RETCODE=1")
+self.addrule("!PKG_EXIST=dummy")
+for f in p.files:
+ self.addrule("!FILE_EXIST=%s" % f)