Bug#214998: apache: error with 'expr' in 'modules-config'
Package: apache
Version: 1.3.28-1
Severity: normal
Hi,
I get errors installing various Apache packages from unstable, with
symptoms like this:
Setting up libapache-mod-perl (1.28-1) ...
expr: syntax error
dpkg: error processing libapache-mod-perl (--install):
subprocess post-installation script returned error exit status 2
The problem is that "modules-config" is reading the output of "wc -l"
but getting caught out because of the spaces at the start of the line
in the output. This leads to $LAST being empty, so when 'expr' is run
it gets a bad expression. The following patch fixes the problem.
It's against the "apache-1.3.28" packge.
--- debian/modules-config Thu Oct 9 21:39:23 2003
+++ debian/modules-config Thu Oct 9 21:40:19 2003
@@ -116,7 +116,7 @@
# splitting the conf to insert the Include
FIRST=`grep -n "# Please keep this LoadModule: line here" $TMP \
| cut -d ":" -f 1`
- LAST=`wc -l $TMP | cut -d " " -f 1`
+ LAST=`wc -l $TMP | sed -e 's/^ *//' | cut -d " " -f 1`
DIFF=`expr $LAST - $FIRST`
head -n $FIRST $TMP > /etc/$FLA/httpd.conf.new
-- System Information
Debian Release: 3.0
Kernel Version: Linux blacktooth 2.4.20-qef-blacktooth #1 Wed Apr 16 22:09:45 BST 2003 i686 GNU/Linux
Versions of the packages apache depends on:
ii apache-common 1.3.28-1 Support files for all Apache webservers
ii debconf 1.2.35 Debian configuration management system
ii dpkg 1.10.15 Package maintenance system for Debian
ii libc6 2.3.2-7 GNU C Library: Shared libraries and Timezone
ii libdb4.1 4.1.25-9 Berkeley v4.1 Database Libraries [runtime]
ii libexpat1 1.95.6-4 XML parsing C library - runtime library
ii libmagic1 4.02-4 File type determination library using "magic
ii logrotate 3.5.9-8 Log rotation utility
ii mime-support 3.23-1 MIME files 'mime.types' & 'mailcap', and sup
ii perl 5.8.1-2 Larry Wall's Practical Extraction and Report
ii perl 5.8.1-2 Larry Wall's Practical Extraction and Report
^^^ (Provides virtual package perl5)
Reply to: