[Git][reproducible-builds/diffoscope][master] comparators:squashfs: consider new retval for 4.5
Chris Lamb (@lamby)
gitlab at salsa.debian.org
Fri Aug 20 16:38:40 UTC 2021
Chris Lamb pushed to branch master at Reproducible Builds / diffoscope
Commits:
9e410d6f by Santiago Torres Arias at 2021-08-20T12:20:33-04:00
comparators:squashfs: consider new retval for 4.5
After version 4.5, squashfs distinguishes between fatal (retval==1) and
non-fatal (retval==2) errors. As such, we need to accomodate the
comparator to also consider this new retval. Update the behavior on the
comparator code to also take retval==2 into account.
See upstream commit for more information
https://github.com/plougher/squashfs-tools/commit/06fc061ef426672576075f2989f52acd873c0141
Signed-off-by: Santiago Torres Arias <santiago at archlinux.org>
- - - - -
1 changed file:
- diffoscope/comparators/squashfs.py
Changes:
=====================================
diffoscope/comparators/squashfs.py
=====================================
@@ -280,13 +280,16 @@ class SquashfsContainer(Archive):
output, stderr = p.communicate()
if p.returncode != 0:
- # unsquashfs(1) exits with 1 (with a suitable logging messages that
- # we can check for) if it could not extract, for example, character
- # devices that require superuser privileges. In this case, don't
- # treat this as a failure that requires reverting to xxd(1), but do
- # let the user know via a comment.
+ # unsquashfs(1) exits with 1 (with a suitable logging messages
+ # that we can check for) if it could not extract, for example,
+ # character devices that require superuser privileges. In this
+ # case, don't treat this as a failure that requires reverting to
+ # xxd(1), but do let the user know via a comment. After 4.5, this
+ # return code can also be 2, to distinguish between fatal and
+ # non-fatal errors (see upstream commit
+ # 06fc061ef426672576075f2989f52acd873c0141)
if (
- p.returncode == 1
+ p.returncode in {1, 2}
and b"because you're not superuser" in stderr
and b"\n\ncreated " in output
):
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/commit/9e410d6fd4def177c4b5f914e74f72a59fb1a316
--
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/commit/9e410d6fd4def177c4b5f914e74f72a59fb1a316
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-commits/attachments/20210820/d5836fcf/attachment.htm>
More information about the rb-commits
mailing list