Skip navigation.

Raphael's Blog

A look into a programmer's life

June 2008

( Monthly archive )

checkbashisms as a perl module fun

Still a work in progress, but finally something functional:

$ checkbashisms.pl.4pm --debug --recursive --extra /etc/init.d/apache2
Variable "%bashisms" is not available at (eval 6) line 1.
[recursive mode]Delaying check of /lib/lsb/init-functions for bashisms from:
. /lib/lsb/init-functions
[srecursive mode]Path expanded to: /lib/lsb/init-functions
[recursive mode]Delaying check of /etc/default/rcS for bashisms from:
test -f /etc/default/rcS && . /etc/default/rcS
[srecursive mode]Path expanded to: /etc/default/rcS
[recursive mode]Delaying check of /etc/default/apache2 for bashisms from:
test -f /etc/default/apache2 && . /etc/default/apache2
[srecursive mode]Path expanded to: /etc/default/apache2
[recursive mode]Delaying check of /etc/apache2/envvars for bashisms from:
PFILE=`. /etc/apache2/envvars ; echo $APACHE_PID_FILE`
[srecursive mode]Path expanded to: /etc/apache2/envvars
status for /etc/init.d/apache2 is: 0
status for /etc/apache2/envvars is: 0
status for /lib/lsb/init-functions is: 1
possible bashism in /lib/lsb/init-functions line 31 (local x y):
local force nice pidfile exec i
possible bashism in /lib/lsb/init-functions line 62 (local x y):
local pidfile line i pids= status specified pid
possible bashism in /lib/lsb/init-functions line 81 (kill -[0-9] or -[A-Z]):
if $(kill -0 "${pid:-}" 2> /dev/null); then
status for /etc/default/rcS is: 1
status for /etc/default/apache2 is: 1



next step: fix remaining bugs, and integrate it in lintian (yes, finally lintian will be able to look for bashisms in all /bin/sh scripts :smile:

Those wondering what the "Path expanded to" lines are for:

$ checkbashisms.pl.4pm --debug --recursive --extra /etc/init.d/zope3
Variable "%bashisms" is not available at (eval 6) line 1.
[recursive mode]Delaying check of /lib/lsb/init-functions for bashisms from:
. /lib/lsb/init-functions
[srecursive mode]Path expanded to: /lib/lsb/init-functions
[recursive mode]Delaying check of /etc/default/zope$ZVER for bashisms from:
. /etc/default/zope$ZVER
[srecursive mode]Path expanded to: /etc/default/zope3
status for /etc/init.d/zope3 is: 0
status for /lib/lsb/init-functions is: 1
possible bashism in /lib/lsb/init-functions line 31 (local x y):
local force nice pidfile exec i
possible bashism in /lib/lsb/init-functions line 62 (local x y):
local pidfile line i pids= status specified pid
possible bashism in /lib/lsb/init-functions line 81 (kill -[0-9] or -[A-Z]):
if $(kill -0 "${pid:-}" 2> /dev/null); then
status for /etc/default/zope3 is: 1



Btw, srecursive isn't a typo, it stands for "smart recursive" (i.e. replace $vars with * and glob)

Re: Ubuntu divergence

, ,

Lucas Nussbaum recently posted some graphics showing the number of packages that are grabbed from Debian and kept untouched, modified, out of sync, etc, etc.

But, "statistics are tricky":

Read more...

Another advantage of using the vcs-$VCS field

I guess more than one person will be very happy once I finish to make DEHS $VCS-aware :smile:
Now you will be able to update the watch file on your $VCS and get DEHS to use that one; and even tell DEHS to always use the $VCS one, or even none (as to make some people happy).

+1? or -1?

Read more...