MSYS2-packages/pacman/0037-Revert-More-debugging-info.patch
مهدي شينون (Mehdi Chinoune) 2673230b92 Revert "pacman: Update to 6.1.0"
This reverts commit 7edf29e04a729623e4177d97e49a130cd681cd71.
2024-05-07 16:15:46 +01:00

59 lines
2.1 KiB
Diff

From 2ab815f2a9a57a7727e2947c78272a2a240e90d0 Mon Sep 17 00:00:00 2001
From: Christoph Reiter <reiter.christoph@gmail.com>
Date: Tue, 30 Apr 2024 07:47:20 +0200
Subject: [PATCH 37/N] Revert "More debugging info"
This reverts commit 235ea43e9a0d3d4a373a37970a62be8dfd32282b.
See #29
---
lib/libalpm/util.c | 21 ++-------------------
1 file changed, 2 insertions(+), 19 deletions(-)
diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c
index ce28fd8..bdfb5c0 100644
--- a/lib/libalpm/util.c
+++ b/lib/libalpm/util.c
@@ -306,23 +306,6 @@ int _alpm_unpack_single(alpm_handle_t *handle, const char *archive,
return ret;
}
-char *get_command_line(const char* cmd, char *const argv[])
-{
- size_t len = strlen(cmd) + 1;
- size_t nargs = 0;
- while (argv[nargs] != NULL) {
- len += strlen(argv[nargs++]) + 1;
- }
- char *result = malloc(len) + 1;
- strcpy(result, cmd);
- strcat(result, " ");
- for (size_t arg = 0; arg < nargs; ++arg) {
- strcat(result, argv[arg]);
- strcat(result, " ");
- }
- return result;
-}
-
/** Unpack a list of files in an archive.
* @param handle the context handle
* @param path the archive to unpack
@@ -706,7 +689,7 @@ int _alpm_run_chroot(alpm_handle_t *handle, const char *cmd, char *const argv[],
_alpm_reset_signals();
execv(cmd, argv);
/* execv only returns if there was an error */
- fprintf(stderr, _("call to execv (%s) failed (%s)\n"), get_command_line(cmd, argv), strerror(errno));
+ fprintf(stderr, _("call to execv failed (%s)\n"), strerror(errno));
exit(1);
} else {
/* this code runs for the parent only (wait on the child) */
@@ -795,7 +778,7 @@ int _alpm_run_chroot(alpm_handle_t *handle, const char *cmd, char *const argv[],
if(WIFEXITED(status)) {
_alpm_log(handle, ALPM_LOG_DEBUG, "call to waitpid succeeded\n");
if(WEXITSTATUS(status) != 0) {
- _alpm_log(handle, ALPM_LOG_ERROR, _("command (%s) failed to execute correctly\n"), get_command_line(cmd, argv));
+ _alpm_log(handle, ALPM_LOG_ERROR, _("command failed to execute correctly\n"));
retval = 1;
}
} else if(WIFSIGNALED(status) != 0) {