diff options
author | Nagy Gabor <ngaba@bibl.u-szeged.hu> | 2009-08-31 23:54:51 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2009-09-09 05:03:24 +0200 |
commit | b7db46d610efd5f71d5e4e887fed7a3fd3b3dd86 (patch) | |
tree | 2b51620b6b0214dba6f13045dd9b25e7c9f99b44 | |
parent | 90e3e026d1236ad89c142b427d7eeb842bbb7ff4 (diff) | |
download | pacman-b7db46d610efd5f71d5e4e887fed7a3fd3b3dd86.tar.gz pacman-b7db46d610efd5f71d5e4e887fed7a3fd3b3dd86.tar.xz |
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>
-rw-r--r-- | pactest/tests/sync042.py | 6 | ||||
-rw-r--r-- | pactest/tests/sync043.py | 6 | ||||
-rw-r--r-- | pactest/tests/sync044.py | 2 | ||||
-rw-r--r-- | pactest/tests/sync1004.py | 2 | ||||
-rw-r--r-- | pactest/tests/sync890.py | 2 | ||||
-rw-r--r-- | pactest/tests/sync892.py | 2 | ||||
-rw-r--r-- | pactest/tests/sync893.py | 2 | ||||
-rw-r--r-- | pactest/tests/sync895.py | 2 | ||||
-rw-r--r-- | pactest/tests/sync896.py | 2 | ||||
-rw-r--r-- | pactest/tests/sync897.py | 2 | ||||
-rw-r--r-- | pactest/tests/sync899.py | 2 | ||||
-rw-r--r-- | pactest/tests/sync900.py | 2 | ||||
-rw-r--r-- | pactest/tests/sync901.py | 2 | ||||
-rw-r--r-- | pactest/tests/sync992.py | 2 | ||||
-rw-r--r-- | pactest/tests/sync999.py | 2 | ||||
-rw-r--r-- | src/pacman/callback.c | 4 |
16 files changed, 21 insertions, 21 deletions
diff --git a/pactest/tests/sync042.py b/pactest/tests/sync042.py index 0aa7e37b..7c3498d3 100644 --- a/pactest/tests/sync042.py +++ b/pactest/tests/sync042.py @@ -9,6 +9,6 @@ self.addpkg2db("local", lp); self.args = "-S %s" % sp.name -self.addrule("PACMAN_RETCODE=0") -self.addrule("PKG_EXIST=pkg1") -self.addrule("!PKG_EXIST=pkg2") +self.addrule("PACMAN_RETCODE=1") +self.addrule("!PKG_EXIST=pkg1") +self.addrule("PKG_EXIST=pkg2") diff --git a/pactest/tests/sync043.py b/pactest/tests/sync043.py index 1302bf04..8461e9f9 100644 --- a/pactest/tests/sync043.py +++ b/pactest/tests/sync043.py @@ -7,10 +7,10 @@ self.addpkg2db("sync", sp); lp1 = pmpkg("pkg2") self.addpkg2db("local", lp1); -lp1 = pmpkg("pkg3") -self.addpkg2db("local", lp1); +lp2 = pmpkg("pkg3") +self.addpkg2db("local", lp2); -self.args = "-S %s" % sp.name +self.args = "-S %s --ask=4" % sp.name self.addrule("PACMAN_RETCODE=0") self.addrule("PKG_EXIST=pkg1") diff --git a/pactest/tests/sync044.py b/pactest/tests/sync044.py index c4ff1549..0c8fd2e9 100644 --- a/pactest/tests/sync044.py +++ b/pactest/tests/sync044.py @@ -11,7 +11,7 @@ sp3 = pmpkg("pkg3") sp3.conflicts = ["pkg1"] self.addpkg2db("sync", sp3); -self.args = "-S pkg2" +self.args = "-S pkg2 --ask=4" self.addrule("PACMAN_RETCODE=0") self.addrule("!PKG_EXIST=pkg1") diff --git a/pactest/tests/sync1004.py b/pactest/tests/sync1004.py index f87bbe9b..a9cee49c 100644 --- a/pactest/tests/sync1004.py +++ b/pactest/tests/sync1004.py @@ -11,7 +11,7 @@ self.addpkg2db("sync", sp2) lp = pmpkg("depend") self.addpkg2db("local", lp) -self.args = "-S pkg1 pkg2" +self.args = "-S pkg1 pkg2 --ask=4" self.addrule("PACMAN_RETCODE=1") self.addrule("PKG_EXIST=depend") diff --git a/pactest/tests/sync890.py b/pactest/tests/sync890.py index 75947e9a..e8380b79 100644 --- a/pactest/tests/sync890.py +++ b/pactest/tests/sync890.py @@ -12,7 +12,7 @@ lp2.conflicts = ["pkg3"] for p in lp1, lp2: self.addpkg2db("local", p) -self.args = "-S %s" % sp.name +self.args = "-S %s --ask=4" % sp.name self.addrule("PACMAN_RETCODE=0") self.addrule("PKG_EXIST=pkg1") diff --git a/pactest/tests/sync892.py b/pactest/tests/sync892.py index 04cc79c5..dfd889ea 100644 --- a/pactest/tests/sync892.py +++ b/pactest/tests/sync892.py @@ -16,7 +16,7 @@ lp2.conflicts = ["pkg3"] for p in lp1, lp2: self.addpkg2db("local", p) -self.args = "-S %s" % " ".join([p.name for p in sp1, sp2]) +self.args = "-S %s --ask=4" % " ".join([p.name for p in sp1, sp2]) self.addrule("PACMAN_RETCODE=0") self.addrule("!PKG_EXIST=pkg1") diff --git a/pactest/tests/sync893.py b/pactest/tests/sync893.py index 1c8494a3..e96bb7b6 100644 --- a/pactest/tests/sync893.py +++ b/pactest/tests/sync893.py @@ -13,7 +13,7 @@ self.addpkg2db("local", lp1) lp2 = pmpkg("pkg2") self.addpkg2db("local", lp2) -self.args = "-S %s" % " ".join([p.name for p in sp1, sp2]) +self.args = "-S %s --ask=4" % " ".join([p.name for p in sp1, sp2]) self.addrule("PACMAN_RETCODE=1") self.addrule("PKG_EXIST=pkg1") diff --git a/pactest/tests/sync895.py b/pactest/tests/sync895.py index 1b348c19..fd987864 100644 --- a/pactest/tests/sync895.py +++ b/pactest/tests/sync895.py @@ -12,7 +12,7 @@ lp2 = pmpkg("pkg2") lp2.depends = ["foo"] self.addpkg2db("local", lp2) -self.args = "-S %s" % sp.name +self.args = "-S %s --ask=4" % sp.name self.addrule("PACMAN_RETCODE=1") self.addrule("PKG_EXIST=pkg1") diff --git a/pactest/tests/sync896.py b/pactest/tests/sync896.py index a89b5c70..492bd7b4 100644 --- a/pactest/tests/sync896.py +++ b/pactest/tests/sync896.py @@ -13,7 +13,7 @@ lp2 = pmpkg("pkg2") lp2.depends = ["foo"] self.addpkg2db("local", lp2) -self.args = "-S %s" % sp.name +self.args = "-S %s --ask=4" % sp.name self.addrule("PACMAN_RETCODE=0") self.addrule("!PKG_EXIST=pkg1") diff --git a/pactest/tests/sync897.py b/pactest/tests/sync897.py index f7bd3d71..8a1c5a7c 100644 --- a/pactest/tests/sync897.py +++ b/pactest/tests/sync897.py @@ -16,7 +16,7 @@ self.addpkg2db("local", lp2) lp3 = pmpkg("pkg3") self.addpkg2db("local", lp3) -self.args = "-Su" +self.args = "-Su --ask=4" self.addrule("PACMAN_RETCODE=1") self.addrule("PKG_EXIST=pkg1") diff --git a/pactest/tests/sync899.py b/pactest/tests/sync899.py index a561ae63..fd308050 100644 --- a/pactest/tests/sync899.py +++ b/pactest/tests/sync899.py @@ -11,7 +11,7 @@ self.addpkg2db("local", lp1) lp2 = pmpkg("pkg2") self.addpkg2db("local", lp2) -self.args = "-Su" +self.args = "-Su --ask=4" self.addrule("PACMAN_RETCODE=0") self.addrule("PKG_EXIST=pkg1") diff --git a/pactest/tests/sync900.py b/pactest/tests/sync900.py index 16dfee12..744fad03 100644 --- a/pactest/tests/sync900.py +++ b/pactest/tests/sync900.py @@ -16,7 +16,7 @@ lp2 = pmpkg("pkg2") lp2.depends = ["foo"] self.addpkg2db("local", lp2) -self.args = "-S %s" % sp.name +self.args = "-S %s --ask=4" % sp.name self.addrule("PACMAN_RETCODE=0") self.addrule("!PKG_EXIST=foo") diff --git a/pactest/tests/sync901.py b/pactest/tests/sync901.py index bb420b79..f5834533 100644 --- a/pactest/tests/sync901.py +++ b/pactest/tests/sync901.py @@ -16,7 +16,7 @@ lp2 = pmpkg("pkg2") lp2.depends = ["foo"] self.addpkg2db("local", lp2) -self.args = "-S %s" % sp.name +self.args = "-S %s --ask=4" % sp.name self.addrule("PACMAN_RETCODE=0") self.addrule("PKG_EXIST=foo") diff --git a/pactest/tests/sync992.py b/pactest/tests/sync992.py index a7ad1110..63faaaba 100644 --- a/pactest/tests/sync992.py +++ b/pactest/tests/sync992.py @@ -15,7 +15,7 @@ for p in sp1, sp2, sp3: lp1 = pmpkg("pkg2", "0.1-1") self.addpkg2db("local", lp1) -self.args = "-S %s" % " ".join([p.name for p in sp1, sp2]) +self.args = "-S %s --ask=4" % " ".join([p.name for p in sp1, sp2]) self.addrule("PACMAN_RETCODE=0") self.addrule("PKG_EXIST=pkg1") diff --git a/pactest/tests/sync999.py b/pactest/tests/sync999.py index 69089fa1..89447cad 100644 --- a/pactest/tests/sync999.py +++ b/pactest/tests/sync999.py @@ -14,7 +14,7 @@ self.addpkg2db("local", lp1) lp2 = pmpkg("pkg2") self.addpkg2db("local", lp2) -self.args = "-Su" +self.args = "-Su --ask=4" self.addrule("PACMAN_RETCODE=0") self.addrule("PKG_EXIST=pkg1") diff --git a/src/pacman/callback.c b/src/pacman/callback.c index 05d7ed01..1dd3ffba 100644 --- a/src/pacman/callback.c +++ b/src/pacman/callback.c @@ -262,12 +262,12 @@ void cb_trans_conv(pmtransconv_t event, void *data1, void *data2, /* data parameters: target package, local package, conflict (strings) */ /* print conflict only if it contains new information */ if(!strcmp(data1, data3) || !strcmp(data2, data3)) { - *response = yesno(_(":: %s and %s are in conflict. Remove %s?"), + *response = noyes(_(":: %s and %s are in conflict. Remove %s?"), (char *)data1, (char *)data2, (char *)data2); } else { - *response = yesno(_(":: %s and %s are in conflict (%s). Remove %s?"), + *response = noyes(_(":: %s and %s are in conflict (%s). Remove %s?"), (char *)data1, (char *)data2, (char *)data3, |