Bug 328294

Summary: bootstrap.local invokes wrong shell [patch]
Product: [Applications] digikam Reporter: Sven Coenye <scoenye>
Component: Bundle-TarballAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: caulier.gilles
Priority: NOR    
Version: 3.5.0   
Target Milestone: ---   
Platform: Debian stable   
OS: Linux   
Latest Commit: Version Fixed In: 4.0.0
Sentry Crash Report:
Attachments: Patch to make CLEANROOT test POSIX safe

Description Sven Coenye 2013-12-01 17:31:17 UTC
In Debian Wheezy and derivatives, the default shell was changed from Bash to Dash. Dash offers better performance during boot but does not support all Bash's extensions to POSIX. 
bootstrap.local invokes /bin/sh but the CLEANROOT test uses Bash specific syntax. As a result, it now fails to run properly.

This script should either invoke /bin/bash, or the CLEANROOT test should be changed to use POSIX syntax (i.e. use = instead of ==).

(There are dozens more scripts in the source tree doing the same thing. At the moment, I can't say which ones would break as I'm just starting to get 3.5.0 to compile.)
Comment 1 caulier.gilles 2013-12-01 18:15:07 UTC
Sven,

If you have a patch, i can apply it to git/master...

Gilles Caulier
Comment 2 Sven Coenye 2013-12-03 00:22:44 UTC
Created attachment 83889 [details]
Patch to make CLEANROOT test POSIX safe

This makes bootstrap.local run properly under Dash without having to invoke Bash.

(Note: I'm an SVN operator. This was my first attempt at a Git patch. Beware... ;-)
Comment 3 caulier.gilles 2013-12-03 07:07:16 UTC
Git commit 9079970a9239b2bed5d12c39e50282957470e5eb by Gilles Caulier.
Committed on 03/12/2013 at 07:01.
Pushed by cgilles into branch 'master'.

Apply patch #83889 to be compatible with POSIX
FIXED-IN: 4.0.0

M  +1    -1    bootstrap.local

http://commits.kde.org/scratch/mwiesweg/digikam-sc/9079970a9239b2bed5d12c39e50282957470e5eb