After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 516585 - bashisms in f-spot-sqlite-upgrade
bashisms in f-spot-sqlite-upgrade
Status: RESOLVED FIXED
Product: f-spot
Classification: Other
Component: General
SVN
Other Linux
: Normal normal
: ---
Assigned To: F-spot maintainers
F-spot maintainers
Depends on:
Blocks:
 
 
Reported: 2008-02-15 00:25 UTC by Tim Retout
Modified: 2008-02-20 13:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Trivial patch to replace >& /dev/null with >/dev/null 2>& in three places. (1003 bytes, patch)
2008-02-15 00:29 UTC, Tim Retout
none Details | Review

Description Tim Retout 2008-02-15 00:25:58 UTC
Certain shell constructs are used in f-spot-sqlite-upgrade which are specific to bash; if any other shell is used as /bin/sh (such as 'dash' in Ubuntu and hopefully in Debian lenny), then the script will not work as expected.

Here is the output of checkbashisms:

$ checkbashisms tools/f-spot-sqlite-upgrade 
possible bashism in tools/f-spot-sqlite-upgrade line 11 (should be >word 2>&1):
if ! which sqlite >& /dev/null ; then
possible bashism in tools/f-spot-sqlite-upgrade line 14 (should be >word 2>&1):
elif ! which sqlite3 >& /dev/null ; then
possible bashism in tools/f-spot-sqlite-upgrade line 29 (should be >word 2>&1):
if grep "^...This file contains an SQLite 2.1 database" $DB_LOCATION &> /dev/null; then

(Reported as http://bugs.debian.org/464652 in Debian.)
Comment 1 Tim Retout 2008-02-15 00:29:00 UTC
Created attachment 105295 [details] [review]
Trivial patch to replace >& /dev/null with >/dev/null 2>& in three places.
Comment 2 Tim Retout 2008-02-15 00:31:56 UTC
Um, I got that description wrong just now, because it's half midnight here.

Obviously I meant 2>&1, and I just noticed one place used &> and not >&. Still, I think the patch is right. :)
Comment 3 Stephane Delcroix 2008-02-20 13:01:06 UTC
fixed in r3700