MSYS2-packages/pacman/0016-Change-default-answer-of-all-queries-to-yes.patch
Christoph Reiter 1915a138c0 pacman: Update to 6.1.0 (v2)
Same as #4584 but with an additional backport:
https://github.com/msys2/msys2-pacman/pull/49

Old message:

See msys2/msys2-pacman#45

makepkg.conf synced with the upstream version:
https://gitlab.archlinux.org/pacman/pacman/-/blob/v6.1.0/etc/makepkg.conf.in

Skip patches only changing CI configs
2024-05-09 09:45:39 +02:00

73 lines
2.9 KiB
Diff

From bb871d9ce93da8eda3775432f597061dfcc1e99e Mon Sep 17 00:00:00 2001
From: Eduard Braun <eduard.braun2@gmx.de>
Date: Sat, 10 Feb 2018 22:39:35 +0100
Subject: [PATCH 16/N] Change default answer of all queries to yes
This allows to use pacman completely unattended using the
--noconfirm switch which automatically accepts the default answer.
See https://github.com/msys2/MSYS2-packages/issues/1141
---
src/pacman/callback.c | 6 +++---
src/pacman/remove.c | 2 +-
src/pacman/sync.c | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/pacman/callback.c b/src/pacman/callback.c
index 5d2de3f..b7b52bd 100644
--- a/src/pacman/callback.c
+++ b/src/pacman/callback.c
@@ -467,7 +467,7 @@ void cb_question(void *ctx, alpm_question_t *question)
/* print conflict only if it contains new information */
if(strcmp(alpm_pkg_get_name(q->conflict->package1), q->conflict->reason->name) == 0
|| strcmp(alpm_pkg_get_name(q->conflict->package2), q->conflict->reason->name) == 0) {
- q->remove = noyes(_("%s-%s%s%s and %s-%s%s%s are in conflict. Remove %s?"),
+ q->remove = yesno(_("%s-%s%s%s and %s-%s%s%s are in conflict. Remove %s?"),
alpm_pkg_get_name(q->conflict->package1),
colstr->faint,
alpm_pkg_get_version(q->conflict->package1),
@@ -478,7 +478,7 @@ void cb_question(void *ctx, alpm_question_t *question)
colstr->nocolor,
alpm_pkg_get_name(q->conflict->package2));
} else {
- q->remove = noyes(_("%s-%s%s%s and %s-%s%s%s are in conflict (%s). Remove %s?"),
+ q->remove = yesno(_("%s-%s%s%s and %s-%s%s%s are in conflict (%s). Remove %s?"),
alpm_pkg_get_name(q->conflict->package1),
colstr->faint,
alpm_pkg_get_version(q->conflict->package1),
@@ -508,7 +508,7 @@ void cb_question(void *ctx, alpm_question_t *question)
count));
list_display(" ", namelist, getcols());
printf("\n");
- q->skip = noyes(_n(
+ q->skip = yesno(_n(
"Do you want to skip the above package for this upgrade?",
"Do you want to skip the above packages for this upgrade?",
count));
diff --git a/src/pacman/remove.c b/src/pacman/remove.c
index 98f85de..645619b 100644
--- a/src/pacman/remove.c
+++ b/src/pacman/remove.c
@@ -140,7 +140,7 @@ int pacman_remove(alpm_list_t *targets)
holdpkg = 1;
}
}
- if(holdpkg && (noyes(_("HoldPkg was found in target list. Do you want to continue?")) == 0)) {
+ if(holdpkg && (yesno(_("HoldPkg was found in target list. Do you want to continue?")) == 0)) {
retval = 1;
goto cleanup;
}
diff --git a/src/pacman/sync.c b/src/pacman/sync.c
index 99712f4..03a307c 100644
--- a/src/pacman/sync.c
+++ b/src/pacman/sync.c
@@ -199,7 +199,7 @@ static int sync_cleancache(int level)
}
printf(_("removing old packages from cache...\n"));
} else {
- if(!noyes(_("Do you want to remove ALL files from cache?"))) {
+ if(!yesno(_("Do you want to remove ALL files from cache?"))) {
printf("\n");
continue;
}