logwatch (7.4.0+svn20111221rev79-1) 0003-services-dpkg-Support-the-new-format-for-remove-line.patch

Summary

 scripts/services/dpkg |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

    
download this patch

Patch contents

From: Willi Mann <willi@wm1.at>
Date: Fri, 28 Oct 2011 18:32:34 +0200
Subject: services/dpkg: Support the new format for remove lines

dpkg used to print the version twice on remove lines. This has
changed, it now prints "<none>" as second version. Unfortunately,
this string is localized.
---
 scripts/services/dpkg |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/scripts/services/dpkg b/scripts/services/dpkg
index 5f1dffb..83ffeec 100755
--- a/scripts/services/dpkg
+++ b/scripts/services/dpkg
@@ -53,7 +53,7 @@ my @unknown;
 while(my $line=<STDIN>) {
 	chomp $line;
 	if ( my ( $do, $pkg, $ver1, $ver2) = ( $line =~ /^\S+ \S+ (install|upgrade|remove|purge) (\S+) (\S+)(?: (\S+))?/ )) {
-		if(($do eq "remove" or $do eq "purge") and ($ver1 ne $ver2)) {
+		if(($do eq "remove" or $do eq "purge") and ($ver1 ne $ver2) and ($ver2 !~ /^<\w+>$/ )) {
 			push @unknown, $line;
 		} elsif ($do eq "remove") {
 			push @remove, "$pkg $ver1";
--