[pacman-dev] [PATCH] 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. Remove initscripts [Y/n] util-linux-ng conflicts with e2fsprogs. Remove e2fsprogs? [Y/n] This changes the query to [y/N]. Signed-off-by: Allan McRae <allan@archlinux.org> --- src/pacman/callback.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/pacman/callback.c b/src/pacman/callback.c index e83a97d..0f52343 100644 --- a/src/pacman/callback.c +++ b/src/pacman/callback.c @@ -259,7 +259,7 @@ void cb_trans_conv(pmtransconv_t event, void *data1, void *data2, alpm_pkg_get_name(data2)); break; case PM_TRANS_CONV_CONFLICT_PKG: - *response = yesno(_(":: %s conflicts with %s. Remove %s?"), + *response = noyes(_(":: %s conflicts with %s. Remove %s?"), (char *)data1, (char *)data2, (char *)data2); -- 1.6.4.1
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. Remove initscripts [Y/n] util-linux-ng conflicts with e2fsprogs. Remove e2fsprogs? [Y/n]
This changes the query to [y/N].
Signed-off-by: Allan McRae <allan@archlinux.org>
You need to modify "some" pactest files as well, because this patch induces 7 unexpected fails. Imho your noyes default behavior is better... Moreover, maybe we should also print somehow the conflict itself in warning, because 'udev conflicts with initscripts<2009.07' (btw, why is there 2 conflicts line udev's PPKGBUILD?) is much different from "foo conflicts with bar"... However, in most cases that would be redundant information, so I am unsure. (In fact we print redundant information in case of unresolvable dependencies, too) Bye
Nagy Gabor wrote:
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. Remove initscripts [Y/n] util-linux-ng conflicts with e2fsprogs. Remove e2fsprogs? [Y/n]
This changes the query to [y/N].
Signed-off-by: Allan McRae <allan@archlinux.org>
You need to modify "some" pactest files as well, because this patch induces 7 unexpected fails.
Hmmm... you would have thought a two character change would cause so much damage? Obviously not me! :P I will fix.
Imho your noyes default behavior is better... Moreover, maybe we should also print somehow the conflict itself in warning, because 'udev conflicts with initscripts<2009.07' (btw, why is there 2 conflicts line udev's PPKGBUILD?) is much different from "foo conflicts with bar"... However, in most cases that would be redundant information, so I am unsure. (In fact we print redundant information in case of unresolvable dependencies, too)
I can see adding this information would be a good idea. I will see if I can do that too (it has been a long time since I touched actual pacman code). Allan
On Mon, Aug 31, 2009 at 4:50 AM, Allan McRae<allan@archlinux.org> wrote:
Imho your noyes default behavior is better... Moreover, maybe we should also print somehow the conflict itself in warning, because 'udev conflicts with initscripts<2009.07' (btw, why is there 2 conflicts line udev's PPKGBUILD?) is much different from "foo conflicts with bar"... However, in most cases that would be redundant information, so I am unsure. (In fact we print redundant information in case of unresolvable dependencies, too)
I can see adding this information would be a good idea. I will see if I can do that too (it has been a long time since I touched actual pacman code).
Nagy and I already discussed this a bit yesterday, and he said he would write a patch :) But having new eyes on the code can not be a bad thing!
participants (3)
-
Allan McRae
-
Nagy Gabor
-
Xavier