Package: etckeeper
Version: 0.24
Followup-For: Bug #509888

The fix for #509888 seems to let filter_unknown() stop working.
The attached patch should fix it.


Thanks,
Gian Piero.

-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'testing')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/dash
Kernel: Linux 2.6.24-king2
Locale: LANG=it_IT.UTF8, LC_CTYPE=it_IT.UTF8 (charmap=UTF-8)
--- etckeeper-0.24/pre-commit.d/30store-metadata        2008-12-27 
20:30:13.000000000 +0100
+++ /etc/etckeeper/pre-commit.d/30store-metadata        2008-12-31 
12:47:50.000000000 +0100
@@ -3,11 +3,11 @@
 
 # Filters out UNKNOWN users and groups, prints a warning on stderr.
 filter_unknown() {
-       CMD=$1
+       CMD="$1 $2"
        while read line; do
                # if the first n chars of $line equal "$CMD UNKNOWN "...
                if [ "$(printf %.$((9+${#CMD}))s "$line")" = "$CMD UNKNOWN " ]; 
then
-                       echo Bad "$2" for "$line" >&2
+                       echo Bad "$3" for "${line#$1 }" >&2
                else
                        echo "$line"
                fi

Reply via email to