1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-08-13 17:03:46 -04:00
pacman/pactest/tests/sync999.py
Nagy Gabor b7db46d610 Do not remove conflict by default
When a conflict is detected, pacman asks if the user wants to remove
the conflicting package.  In many cases this is a bad idea.  e.g.

udev conflicts with initscripts (initscripts<2009.07).
Remove initscripts [Y/n]

This changes the query to [y/N].

The --noconfirm behavior has been also changed, because it chooses the
default answer. Since the yes answer is more interesting in our pactests
dealing with conflicts, I inserted '--ask=4' to all of them with one
exception: sync042.py tests the no answer.

(I also fixed a typo in sync043.py)

Original-work-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
2009-09-08 22:03:24 -05:00

22 lines
426 B
Python

self.description = "System upgrade"
sp1 = pmpkg("pkg1", "1.0-2")
sp1.conflicts = ["pkg2"]
sp1.provides = ["pkg2"]
self.addpkg2db("sync", sp1);
sp2 = pmpkg("pkg2", "1.0-2")
self.addpkg2db("sync", sp2)
lp1 = pmpkg("pkg1")
self.addpkg2db("local", lp1)
lp2 = pmpkg("pkg2")
self.addpkg2db("local", lp2)
self.args = "-Su --ask=4"
self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_EXIST=pkg1")
self.addrule("!PKG_EXIST=pkg2")