On Fri, Nov 16, 2007 at 11:20:30PM +0100, Nagy Gabor wrote:
diff --git a/lib/libalpm/deps.c b/lib/libalpm/deps.c index 548b643..f545d14 100644 --- a/lib/libalpm/deps.c +++ b/lib/libalpm/deps.c @@ -470,38 +470,36 @@ static int dep_vercmp(const char *version1, pmdepmod_t mod,
<snip>
+ /* check provisions */ + for(i = alpm_pkg_get_provides(pkg); i; i = i->next) { + char *provname = i->data; + char *provver = strchr(pkgname, ' ');
I think it should be provname instead of pkgname, which would explain why your broken pactest below passed. It fails now :) And after correcting these little errors, everything looks fine to me, so good job.
diff --git a/pactest/tests/add045.py b/pactest/tests/add045.py new file mode 100644 index 0000000..b53e090 --- /dev/null +++ b/pactest/tests/add045.py @@ -0,0 +1,15 @@ +self.description = "provision>=1.0-2 dependency (3)" + +p = pmpkg("pkg1", "1.0-2") +p.depends = ["provision>=1.0-2"] +self.addpkg(p) + +lp = pmpkg("pkg2", "1.0-2") +lp.provides = ["provision 1.0-1"] +self.addpkg2db("local", lp) + +self.args = "-A %s" % p.filename() + +self.addrule("PACMAN_RETCODE=1") +self.addrule("!PKG_EXIST=pkg1") +self.addrule("PKG_EXIST=pkg2")