This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
Re: Concern about new g-b-s logging change - loss of error detection
- From: Max Bowsher <maxb1 at ukf dot net>
- To: cygwin-apps at cygwin dot com
- Date: Sun, 20 Nov 2005 17:21:36 +0000
- Subject: Re: Concern about new g-b-s logging change - loss of error detection
- Openpgp: id=C0F2C580
- References: <05f001c5dca1$a2d1c8f0$5304a8c0@chimaera> <Pine.GSO.4.63.0510301239180.10487@slinky.cs.nyu.edu> <0aa201c5dd98$f3adfa80$5304a8c0@chimaera> <437F6FCA.6040708@ukf.net> <Pine.GSO.4.63.0511201011290.4473@slinky.cs.nyu.edu>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Igor Pechtchanski wrote:
> On Sat, 19 Nov 2005, Max Bowsher wrote:
>
>>Summary: The addition of the 'logging' g-b-s feature introduced a bug:
>>Errors during phases of package building do not halt the build, so that
>>an error during 'make' or 'make install' would not prevent the 'pkg'
>>operation running, and producing flawed package files.
>>
>>If no one has time to fix the logging feature properly right now, could
>>we just revert the logging feature from g-b-s CVS HEAD until someone does?
>
> Let's try to come up with a solution (see below), but if we can't very
> soon, I'll disable the logging.
Good.
...
>>>>or use $PIPESTATUS (which is a bashism, and is fragile, unless we use
>>>>${PIPESTATUS[$((${#PIPESTATUS[@]}-1))]}).
>>>
>>>I think using a bashism is OK. Even people who don't actually use bash
>>>interactively will have it installed - it's in 'Base', after all.
>
>
> So, we make g-b-s a /usr/bin/bash script instead of /bin/sh script? Are
> there any objections to this? Is this script ever used in any (e.g.,
> cross-compilation) environments where /bin/sh is *not* bash?
Bash usually lives in /bin, not /usr/bin.
I would think that any Linux system featureful enough to have a
compiler, would have a /bin/bash.
>>>Why would ${PIPESTATUS[1]} not be OK?
>
>
> Because that would only work for cases where the only pipe is added by
> logging (i.e., fragile). If someone ever wanted to pipe something to
> configure in that step, whoever made the change would need to know to
> change ${PIPESTATUS[1]} to ${PIPESTATUS[2]}, which is too easy to miss
> (i.e., fragile). I'm willing to be convinced that I'm being paranoid
> here, though.
Hang on: It is the *first* item in the pipe (the real command) that we
care about, anyway, not any filters placed after it. So,
${PIPESTATUS[0]}, and we don't need to worry about people adding to the
end of the pipe.
Max.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Cygwin)
iD8DBQFDgLCgfFNSmcDyxYARAsbmAKCQi6Zk4Ey6zp4j5qe2Ravp6Tl9qACfcfIj
B8RJBVTLT5z9//YcvnXPBwI=
=NTyg
-----END PGP SIGNATURE-----