Bug#824078: libdvd-pkg: fails to report "apt-get check" errors (and others) correctly

Cyril Brulebois kibi at debian.org
Sun May 15 12:03:28 UTC 2016


Hi Dmitry,

Dmitry Smirnov <onlyjob at debian.org> (2016-05-15):
> On Thursday, 12 May 2016 12:44:30 AM AEST Cyril Brulebois wrote:
> > Severity: important
> 
> I don't understand how not returning exit code qualifies for "important"
> severity... IMHO it is "minor" unless I'm missing what kind of breakage it
> may cause...

Failing to return success or failure properly really is Bad Programming
101. This means your uers have no programmatic way of knowing whether
what they called worked, and how to behave accordingly.

Of course, users could think about parsing stdout/stderr messages, but
this is fragile, those change over time, and the right way is to just
get the return code and check against 0 (or known, documented values
for specific errors).

> > But our wrapper specifically exited with '1' in that case, and it seemed
> > strange that debian/b-i_libdvdcss.sh didn't catch that.
> > [...]
> > I would suggest storing the return value
> > e.g. with "ret=$?", and using "exit $ret" so that this return value is
> > propagated. If propagating this return value isn't deemed interesting,
> > please at least "exit 1".
> 
> This is not just ugly code of mine but deliberate/intentional decision to 
> override exit code. Trouble is that libdvd-pkg hooks into APT post-invoke 
> handler and run commands that normally never run on that stage. Therefore 
> there is a risk and potential to break APT operations and cause system-wide 
> effect...

Silently pretending everything went fine when it didn't seems like a
reasonable behaviour? I strongly disagree.

> I feel uncomfortable about propagating exit status without good
> understanding of consequences and without serious testing (for which I
> have not time right now)...

I didn't realize it got hooked up into apt (the build script is called
directly in Tails). Actually, this makes this issue looks even worth
than I thought…


KiBi.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-multimedia-maintainers/attachments/20160515/65368f2a/attachment.sig>


More information about the pkg-multimedia-maintainers mailing list