On Mon, Dec 01, 2008 at 01:20:34PM -0500, Andres Mejia wrote: > On Monday 01 December 2008 09:42:42 am Ron wrote: > > The only sensible thing I can see to do with this script is remove > > it entirely. But since nobody has noticed it is useless, even when > > they tried to patch it, this doesn't seem terribly urgent. > > I was wondering why this script was needed. However, I thought there may have > been a reason why the maintainer kept it around so I simply patched without > giving it any further thought.
It's part of an ugly upstream kludge for working in the source tree, apparently it was better to litter subdirs of that with scripts that do `cd ..` than to just build their rpms from the top level. *shrug* This isn't the only copy in the source, but presumably the original reporter of this bug just scanned the binary .debs. It's clearly of no use to people using binary packages though, we only have it because we install wxPython/demo wholesale to the examples dir and no one ever complained about cruft in there to special case its removal. I'll leave this bug open as a reminder of that, but it's not worth an upload on its own to fix it. Just for future reference though, a much better patch would have been - #!/bin/sh + #!/bin/bash The script you are calling out to (had it existed here) is explicitly /bin/bash already, so doing anything else is really just penalising people who thought they were using a 'faster shell' by making them spawn both. 'Fixing' bashisms isn't about blindly removing the use of bash at all costs through the use of nasty workarounds. In 99% of cases I've seen so far, people wasted a lot of time doing fancy (and usually quite ugly) things, when they should have just fixed the wrong shebang. It's a bug for that to be wrong, but it's not a bug to use bash any more than it's a bug to declare #!/usr/bin/perl if that's the language used in the script. There are very good reasons we have and use more advanced languages than what is supported by dash. This script isn't one of them, but the 'easy fix' in this case still would have been the optimal one. I don't mean to sound unappreciative of your efforts, but pretty much every 'bashism fix' patch that I've received to date has made this same mistake. I don't know who put that idea in people's heads, but it seems to have spread like the clap. The antidote is cheap, and will get whatever of these remain fixed even faster, so please do share it around. If you are going to try to 'optimise' things, that really does require some thought, and probably a whole lot of profiling. In the absence of that, simple wins more often than you'd expect from pure chance. Thanks, Ron -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]