1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-11-16 06:15:08 -05:00
pacman/pactest/tests/sync1004.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

19 lines
370 B
Python

self.description = "Induced removal would break dependency (2)"
sp1 = pmpkg("pkg1")
sp1.conflicts = [ "depend" ]
self.addpkg2db("sync", sp1)
sp2 = pmpkg("pkg2")
sp2.depends = ["depend"]
self.addpkg2db("sync", sp2)
lp = pmpkg("depend")
self.addpkg2db("local", lp)
self.args = "-S pkg1 pkg2 --ask=4"
self.addrule("PACMAN_RETCODE=1")
self.addrule("PKG_EXIST=depend")