Hi Dmitry,

Dmitry Smirnov <only...@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.

Attachment: signature.asc
Description: Digital signature

_______________________________________________
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers

Reply via email to