1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-11-17 14:55:07 -05:00
pacman/test/pacman/tests/ignore007.py
Dan McGee 79e98316ea Add a 'valid' flag to the database object
Start by converting all of our flags to a 'status' bitmask (pkgcache
status, grpcache status). Add a new 'valid' flag as well. This will let
us keep track if the database itself has been marked valid in whatever
fashion.

For local databases at the moment we ensure there are no depends files;
for sync databases we ensure the PGP signature is valid if
required/requested. The loading of the pkgcache is prohibited if the
database is invalid.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-24 03:46:12 -05:00

22 lines
513 B
Python

self.description = "Sync group with ignored packages"
pkg1 = pmpkg("package1")
pkg1.groups = ["grp"]
self.addpkg2db("sync", pkg1)
pkg2 = pmpkg("package2")
pkg2.groups = ["grp"]
self.addpkg2db("sync", pkg2)
pkg3 = pmpkg("package3")
pkg3.groups = ["grp"]
self.addpkg2db("sync", pkg3)
self.option["IgnorePkg"] = ["package1"]
self.args = "--ask=1 -S grp"
self.addrule("PACMAN_RETCODE=0")
self.addrule("!PKG_EXIST=%s" % pkg1.name)
self.addrule("PKG_EXIST=%s" % pkg2.name)
self.addrule("PKG_EXIST=%s" % pkg3.name)