Package: jspwiki
Version: 2.0.52-10
Severity: normal

Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: Michael Blakeley <[EMAIL PROTECTED]>
To: Debian Bug Tracking System <[EMAIL PROTECTED]>
Subject: jspwiki: post-install script returns error exit status 1
X-Mailer: reportbug 3.8
Date: Sat, 07 May 2005 09:44:13 -0700
X-Debbugs-Cc: [EMAIL PROTECTED]

Package: jspwiki
Version: 2.0.52-10
Severity: normal

During normal upgrade of jspwiki (wajig daily-upgrade, calling dpkg
--configure jspwiki):

Setting up jspwiki (2.0.52-10) ...
dpkg: error processing jspwiki (--configure):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 jspwiki
E: Sub-process /usr/bin/dpkg returned an error code (1)

I'm not sure how to debug this further. Here's what I've tried:

$ sudo dpkg --debug=2 --configure jspwiki
Setting up jspwiki (2.0.52-10) ...
D000002: fork/exec /var/lib/dpkg/info/jspwiki.postinst ( )
dpkg: error processing jspwiki (--configure):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 jspwiki
$ sudo bash -x /var/lib/dpkg/info/jspwiki.postinst
+ set -e
+ cd /var/lib/jspwiki
+ [[ ! -f default/Main.txt ]]
+ head -1 /etc/jspwiki/jspwiki.properties
+ grep -q 'This file is managed by Debconf'

So I think my jspwiki.properties fails that grep test... which ought not
to be a fatal error, right?

Looking at that code:
head -1 /etc/jspwiki/jspwiki.properties | grep -q "This file is managed by Debco
nf"
if [[ $? != 0 ]];
then
   exit 0
fi

It seems to be fine: it's testing the return code and doing the right thing.
BUT... the whole script executes with -e, so the grep failure will exit the
whole script with a non-zero code.

Quick hack:
==========================================================
$ diff -wu /var/lib/dpkg/info/jspwiki.postinst.orig 
/var/lib/dpkg/info/jspwiki.postinst
--- /var/lib/dpkg/info/jspwiki.postinst.orig    2005-05-07 09:41:28.766075184 
-0700
+++ /var/lib/dpkg/info/jspwiki.postinst 2005-05-07 09:42:35.646907752 -0700
@@ -9,11 +9,9 @@
     chown -R tomcat4 default
 fi

-head -1 /etc/jspwiki/jspwiki.properties | grep -q "This file is managed by 
Debconf"
-if [[ $? != 0 ]];
-then
-   exit 0
-fi
+set +e
+head -1 /etc/jspwiki/jspwiki.properties | grep -q "This file is managed by 
Debconf" || exit 0
+set -e

 . /usr/share/debconf/confmodule
==========================================================

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.11-1-686
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)

Versions of packages jspwiki depends on:
ii  debconf                       1.4.30.13  Debian configuration management sy
ii  tomcat4                       4.1.31-3   Java Servlet 2.3 engine with JSP 1

-- debconf information:
  jspwiki/rss/channellanguage: en-us
  jspwiki/baseurl:
  jspwiki/applicationname: JSPWiki
  jspwiki/matchenglishplurals: false
  jspwiki/breaktitlewithspaces: false
  jspwiki/rss/refresh: 3600
  jspwiki/purgewikifiles: false
  jspwiki/usepagecache: false
  jspwiki/rss/generate: false
  jspwiki/camelcaselinks: false
  jspwiki/encoding: UTF-8
  jspwiki/attachments/provider: BasicAttachmentProvider
  jspwiki/rss/channeldescription:
  jspwiki/pageprovider: FileSystemProvider

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.11-1-686
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)

Versions of packages jspwiki depends on:
ii  debconf                       1.4.30.13  Debian configuration management sy
ii  tomcat4                       4.1.31-3   Java Servlet 2.3 engine with JSP 1

-- debconf information excluded


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to