[PATCH] Detect location of `ldconfig' before use

Robert Helling helling at atdotde.de
Sun Feb 5 07:16:31 PST 2017


Hi,

> On 05 Feb 2017, at 15:21, Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn at axis.com> wrote:
> 
> I have an idea ;)
> 
> Why not error handle those the code that produces those "warnings" (as
> you call them) on that particular architecture, instead of
> ignoring/hiding the errors (exit status failure) for everyone?  That
> kind of thing can bite you later in various ways, leading to bug
> reports saying "I tried that but it doesn't work :/  The build script
> exits with success, but...  Could you fix it for me?  I can't tell you
> where to start looking :(".
> 
> 'errexit' was not invented to punish people, but to help coding robust
> scripts.  In my experience, error handling is one of the most
> neglected areas.

ok, took up the challenge. My memory was wrong. It wasn’t Qt. It was the construct

                echo $NAME | grep / > /dev/null 2>&1
                if [ $? -eq 1 ] ; then
                        install_name_tool -id "$INSTALL_ROOT/lib/$NAME" "$INSTALL_ROOT/lib/$NAME"
                fi

(this appears twice, you find it by searching for $?). Problem is, when I run it, grep returns non-zero and this is then where the script silently stops.

Fixing this is beyond my bash abilities. If you want -e, please rewrite these two occurrences so that the script does not silently fail.

Thanks
Robert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20170205/0cfbe00c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 496 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20170205/0cfbe00c/attachment.sig>


More information about the subsurface mailing list