This is an automated email from the git hooks/post-receive script.

guillem pushed a commit to branch main
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=3ea0300cc1949cb8a32d9a364198cd66f8e5dbfc

commit 3ea0300cc1949cb8a32d9a364198cd66f8e5dbfc
Author: Guillem Jover <[email protected]>
AuthorDate: Mon Jan 2 23:23:11 2023 +0100

    libdpkg: Make xz not emit warnings nor exit non-zero on warnings
    
    When xz does not have enough memory given the requested threads, it
    might end up adjusting the memory usage and number of threads, while
    emitting a warning, and then exiting with non-zero. Both of which we
    do not want from the library.
---
 lib/dpkg/compress.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/dpkg/compress.c b/lib/dpkg/compress.c
index 2bf84558e..3822a5520 100644
--- a/lib/dpkg/compress.c
+++ b/lib/dpkg/compress.c
@@ -793,6 +793,11 @@ compress_xz(struct compress_params *params, int fd_in, int 
fd_out,
                command_add_arg(&cmd, "-e");
 
        if (params->threads_max > 0) {
+               /* Do not generate warnings when adjusting memory usage, nor
+                * exit with non-zero due to those not emitted warnings. */
+               command_add_arg(&cmd, "--quiet");
+               command_add_arg(&cmd, "--no-warn");
+
                /* Do not let xz fallback to single-threaded mode, to avoid
                 * non-reproducible output. */
                command_add_arg(&cmd, "--no-adjust");

-- 
Dpkg.Org's dpkg

Reply via email to