Package: preload
Severity: minor
Tags: patch

I get the following error message when installing preload for the first
time:

Reading package lists... Done
Building dependency tree... Done
The following NEW packages will be installed:
  preload
  0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded. Need to
  get 0B/31.6kB of archives.
  After unpacking 176kB of additional disk space will be used.
  Selecting previously deselected package preload.
  (Reading database ... 136104 files and directories currently
  installed.) Unpacking preload (from .../preload_0.2-4_i386.deb) ...
  Setting up preload (0.2-4) ...
  /var/lib/dpkg/info/preload.postinst: line 25: [: =: unary operator
  expected Starting preload: preload.

This is caused by missing quotes around a variable:

 case "$1" in
     configure)

         # This was supposed to go to /var/lib/preload/
         # (rm this after etch=stable?)
         if [ $2 = '0.2-1' ] ; then
             rm /var/cache/preload.state || true
         fi
         ;;

 variable $2 is empty when the package is installed for the first time,
 hence the error message.

Tiny little patch:

diff -ur preload-0.2/debian/postinst preload-0.2.new/debian/postinst
--- preload-0.2/debian/postinst 2006-01-03 00:14:02.000000000 +0100
+++ preload-0.2.new/debian/postinst     2006-01-03 00:17:46.000000000
+0100
@@ -22,7 +22,7 @@
 
      # This was supposed to go to /var/lib/preload/
      # (rm this after etch=stable?)
-    if [ $2 = '0.2-1' ] ; then
+    if [ "$2" = '0.2-1' ] ; then
        rm /var/cache/preload.state || true
     fi
     ;;


-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (650, 'testing'), (600, 'unstable'), (550, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.4.27-2-686
Locale: LANG=fr_FR.utf8, LC_CTYPE=fr_FR.utf8 (charmap=UTF-8)


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

Reply via email to