Skip to content
Snippets Groups Projects
Unverified Commit 6c2e5a12 authored by Santiago Torres Arias's avatar Santiago Torres Arias
Browse files

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: default avatarSantiago Torres Arias <santiago@archlinux.org>
parent 03aa0fe8
No related branches found
No related tags found
No related merge requests found
Pipeline #277921 passed
......@@ -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 == 1 or p.returncode == 2)
and b"because you're not superuser" in stderr
and b"\n\ncreated " in output
):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment