pacman/test/pacman/tests/remove049.py
morganamilo ea73e66730
pacman: refactor transaction code to one path
This refactors the -S, -U and -R code to share the same implementation.

The goal here is to firstly simplify all transactoions into one code path,
then eventually allow pacman to perform multiple kinds of transactions in
one command.
2023-09-19 22:25:02 +01:00

18 lines
372 B
Python

self.description = "-Ru test"
lp1 = pmpkg("pkg1")
self.addpkg2db("local", lp1)
lp2 = pmpkg("pkg2")
self.addpkg2db("local", lp2)
lp3 = pmpkg("pkg3")
lp3.depends = [ "pkg1" ]
self.addpkg2db("local", lp3)
self.args = "-R --unneeded pkg1 pkg2"
self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_EXIST=pkg1")
self.addrule("!PKG_EXIST=pkg2")
self.addrule("PKG_EXIST=pkg3")