Package: tiger
Version: 1:3.2.2-6
Severity: normal
Tags: patch

i finally tired of the "[: 121: Illegal number: " emails from cron and did
something about it...

check_patches claims to be a sh script, not a bash script.

UID is a bash built-in variable, but not for sh (dash).

therefor, check_patches and UID is mutually exclusive.

you can't just blindly assign the output of "id -u" to UID because under
bash the variable is read-only and generates an error.  so the attached
patch first checks to see if UID is set, and if not then assigned "id -u"
output to it.  unfortunately using id creates a direct dependency on
coreutils (though there might arleady be an indirect dependency on
coreutils; i haven't checked).

corey
-- 
[EMAIL PROTECTED]

--- System information. ---
Architecture: i386
Kernel:       Linux 2.6.25-2-686

Debian Release: lenny/sid
  990 testing         localhost 
   99 undefined       localhost 

--- Package information. ---
Depends           (Version) | Installed
===========================-+-===========
diff               (>= 2.0) | 2.8.1-12
net-tools                   | 1.60-20
binutils                    | 2.18.1~cvs20080103-7
bsdmainutils                | 6.1.10
debconf                     | 1.5.22
 OR debconf-2.0             | 
ucf                         | 3.0010
libc6            (>= 2.7-1) | 2.7-14
--- /usr/lib/tiger/systems/Linux/2/check_patches.orig	2008-09-08 21:09:19.000000000 -0500
+++ /usr/lib/tiger/systems/Linux/2/check_patches	2008-10-18 19:05:11.000000000 -0500
@@ -103,6 +103,7 @@ then
 elif [ -n "$APT" -a -x "$APT" ]
 then
 	tmplog="$WORKDIR/apt-get.out.tmp.$$"
+	[ -z $UID ] && UID="$(id -u)"
 	[ "$UID" -gt 0  ] && message ERROR ptch05e "" "This script is not running as super-user, it will probably be unable to update the package database from it's sources."
 
        	$APT update 1> /dev/null

Reply via email to