1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-11-11 03:54:59 -05:00
pacman/pactest/tests/upgrade058.py
Dan McGee 54e1e3e642 Fix versioncmp regression after update
Commit 8428367285 introduced the regression,
and a previous commit introduced the vercmptest.sh test script to track down
these issues. This commit solves the problem by removing the previous
attempt at locating the pkgrel portions and replacing it with something that
performs the correct logic.

While tracking down everything I needed to, I also found a mistake in one of
the pactests which is fixed here as well as increased the functionality and
verbosity of the vercmptest script to both print out each test it is running
as well as automatically run the mirror of each test case.

Signed-off-by: Dan McGee <dan@archlinux.org>
2008-05-30 16:54:15 -05:00

18 lines
411 B
Python

self.description = "Upgrade a package that's older version is required by another package."
lp1 = pmpkg("pkg1")
lp1.depends = [ "pkg2=1.0" ]
self.addpkg2db("local", lp1)
lp2 = pmpkg("pkg2", "1.0-1")
lp2.requiredby = [ "pkg1" ]
self.addpkg2db("local", lp2)
p = pmpkg("pkg2", "1.1-1")
self.addpkg(p)
self.args = "-U %s" % p.filename()
self.addrule("PACMAN_RETCODE=1")
self.addrule("!PKG_VERSION=pkg2|1.1-1")