Package: localepurge
Version: 0.6.1
Severity: normal
Tags: patch

Hello,

The problem merely is declaring variables in arithmetic mode here, just
try it yourself with a little script like that

---
#!/bin/bash
 
set -e
echo 123
((3 > 2)) && echo "3 > 2"

((false = 0))
((true = 1))
echo "not going to appear"
((3 > 2)) && echo "3 > 2"                                                       
                    
---

The output will stop after having asigned false and true and thats
exactly what is beeing done in /usr/sbin/localepurge.

Variables should be declared the regular why using something like
foo=bar and things will work again.

Attaching a patch to fix this problem.



-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.32.2-xy (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages localepurge depends on:
ii  debconf [debconf-2.0]         1.5.28     Debian configuration management sy
ii  locales                       2.10.2-2   GNU C Library: National Language (
ii  procps                        1:3.2.8-2  /proc file system utilities
ii  ucf                           3.0025     Update Configuration File: preserv

localepurge recommends no packages.

Versions of packages localepurge suggests:
pn  bleachbit                     <none>     (no description available)
pn  debfoster                     <none>     (no description available)
pn  deborphan                     <none>     (no description available)

-- debconf information:
  localepurge/remove_no:
  localepurge/none_selected: false
* localepurge/nopurge: de_DE.UTF-8, en_US.UTF-8
* localepurge/mandelete: true
* localepurge/dontbothernew: false
* localepurge/showfreedspace: true
* localepurge/verbose: true
* localepurge/quickndirtycalc: true
--- a/localepurge       2010-01-03 00:00:47.000000000 +0100
+++ b/localepurge       2010-01-03 00:02:28.000000000 +0100
@@ -52,30 +52,28 @@ if [ "$1" = "--help" ] || [ "$1" = "-h" 
 fi
 
 # Initialise local variables
-((true = 1))
-((false = 0))
-((VERBOSE = false))
-((DONTBOTHERNEWLOCALE = false))
-((SHOWFREEDSPACE = false))
-((MANDELETE = false))
-((globaltot = 0))
+VERBOSE=0
+DONTBOTHERNEWLOCALE=0
+SHOWFREEDSPACE=0
+MANDELETE=0
+globaltot=0
 
 if fgrep --quiet --line-regexp DONTBOTHERNEWLOCALE $NOPURGECONF; then
-    ((DONTBOTHERNEWLOCALE = true))
+    DONTBOTHERNEWLOCALE=1
 fi
 
 if fgrep --quiet --line-regexp SHOWFREEDSPACE $NOPURGECONF; then
-    ((SHOWFREEDSPACE = true))
+    SHOWFREEDSPACE=1
 fi
 
 if fgrep --quiet --line-regexp MANDELETE $NOPURGECONF; then
-    ((MANDELETE = true))
+    MANDELETE=1
 fi
 
 if fgrep --quiet --line-regexp VERBOSE $NOPURGECONF \
     || [ "$1" = "-verbose" ] || [ "$1" = "-v" ] \
     || [ "$2" = "-verbose" ] || [ "$2" = "-v" ]; then
-    ((VERBOSE = true))
+    VERBOSE=1
 fi
 
 

Reply via email to