From: Mark Wielaard <mark@klomp.org>
To: bzip2-devel@sourceware.org
Cc: "Anibal Monsalve Salazar" <anibal@debian.org>,
"Santiago Ruano Rincón" <santiago@debian.org>,
"Anthony Fok" <foka@debian.org>, "Mark Wielaard" <mark@klomp.org>
Subject: [PATCH] bzip2: Fix return value when combining --test,-t and -q.
Date: Tue, 01 Jan 2019 00:00:00 -0000 [thread overview]
Message-ID: <1561362056-4393-1-git-send-email-mark@klomp.org> (raw)
Hi,
bzip2 lost its domain and got a new home at https://sourceware.org/bzip2/
It also didn't see a release for a very long time. Causing various patches
used by distros to not have been integrated upstream. We are trying to
collect them all and do a new release.
The following patch comes from Debian.
Please let us know if we missed some others.
Thanks,
Mark
When passing -q to get quiet output --test would not display an error
message, but would also suppress the exit 2 code to indicate the file
was corrupt. Only suppress the error message with -q, not the exit value.
This patch comes from Debian.
"bunzip2 -qt returns 0 for corrupt archives"
https://bugs.debian.org/279025
---
bzip2.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/bzip2.c b/bzip2.c
index 854a2bb..63649f6 100644
--- a/bzip2.c
+++ b/bzip2.c
@@ -2003,12 +2003,14 @@ IntNative main ( IntNative argc, Char *argv[] )
testf ( aa->name );
}
}
- if (testFailsExist && noisy) {
- fprintf ( stderr,
- "\n"
- "You can use the `bzip2recover' program to attempt to recover\n"
- "data from undamaged sections of corrupted files.\n\n"
- );
+ if (testFailsExist) {
+ if (noisy) {
+ fprintf ( stderr,
+ "\n"
+ "You can use the `bzip2recover' program to attempt to recover\n"
+ "data from undamaged sections of corrupted files.\n\n"
+ );
+ }
setExit(2);
exit(exitValue);
}
--
1.8.3.1
next reply other threads:[~2019-06-24 7:41 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-01 0:00 Mark Wielaard [this message]
2019-01-01 0:00 ` Santiago Ruano Rincón
2019-01-01 0:00 ` Mark Wielaard
2019-01-01 0:00 ` Some cherry-picks (Was: [PATCH] bzip2: Fix return value when combining --test,-t and -q.) Mark Wielaard
2019-01-01 0:00 ` Federico Mena Quintero
2019-01-01 0:00 ` Releasing bzip2 1.0.7 and 1.1.0 ? Was: [PATCH] bzip2: Fix return value when combining --test,-t and -q Mark Wielaard
2019-01-01 0:00 ` Mark Wielaard
2019-01-01 0:00 ` Federico Mena Quintero
2019-01-01 0:00 ` Mark Wielaard
2019-01-01 0:00 ` Federico Mena Quintero
2019-01-01 0:00 ` Mark Wielaard
2019-01-01 0:00 ` Mark Wielaard
2019-01-01 0:00 ` Federico Mena Quintero
2019-01-01 0:00 ` Mark Wielaard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1561362056-4393-1-git-send-email-mark@klomp.org \
--to=mark@klomp.org \
--cc=anibal@debian.org \
--cc=bzip2-devel@sourceware.org \
--cc=foka@debian.org \
--cc=santiago@debian.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).