Package: bastille
Version: 1:3.0.9-13
Severity: serious
Tags: patch
The script "/usr/sbin/bastille" is not able to compute
PERL_VERSION correctly, leaving the variable empty
on system with mixed testing-unstable. The implemented
commmand pipe chain is broken and amateurish!
A functional patch is herewith contibuted.
Regards,
Mats Erik Andersson, DM
--- /usr/sbin/bastille.orig 2010-09-19 16:17:26.000000000 +0200
+++ /usr/sbin/bastille 2013-03-16 15:02:33.989657752 +0100
@@ -150,10 +150,8 @@
# We check that the version is at least the minimum
PERL_VERSION=`${CURRENT_PERL_PATH}/perl -version |
- head -2 | # the second line contains the version
- tr " " "\n" | # split words into separate lines
- sed -e "s/^v//" | # to get rid of the v in v5.6.0
- grep "^[1-9]\." | # find a "word" that starts with number dot
+ # Extract version string only, on the second line!
+ sed -n -e '2 s/.*(v\([1-9]\.[0-9]\{1,4\}\.[0-9]\{1,4\}\)).*/\1/p' |
sed -e "s/_/./"` # substitute _patchlevel with .patchlevel
# (used in 5.005_03 and prior)