Fwd: dpkg conffile and reinstall patch
"Kirk Bauer" <[email protected]>
| Newsgroups | gmane.comp.log.logwatch.devel |
|---|---|
| Message-ID | <[email protected]> |
Any Debianers out there interested in trying and adding this? ------------------------------------------------------ Kirk Bauer <[email protected]> http://linux.kaybee.org | www.logwatch.org Author, Automating UNIX & Linux Administration ---------- Forwarded message ---------- From: Nathan Crawford <[email protected]> Date: Fri, Dec 5, 2008 at 2:24 PM Subject: dpkg conffile and reinstall patch To: [email protected] I've attached a patch to capture dpkg conf file and package re-installation lines. Conf file lines are currently not captured, but output in the unknown lines section. Re-installation lines are currently captured as upgrades to and from the same version. This patch adds a separate section for them. - Nathan _______________________________________________ Logwatch-Devel mailing list [email protected] http://www2.list.logwatch.org:81/mailman/listinfo/logwatch-devel
reinstall-and-conffile.patch
(text/x-patch, 1.1 KB)
--- dpkg 2008-08-18 11:56:52.000000000 -0400
+++ dpkg.changes 2008-12-05 16:03:11.000000000 -0500
@@ -39,9 +39,11 @@
use strict;
my @install;
+my @reinstall;
my @upgrade;
my @remove;
my @purge;
+my @conffile;
my @unknown;
@@ -56,10 +58,15 @@
push @purge, "$pkg $ver1";
} elsif ($ver1 =~ /[<>]/) {
push @install, "$pkg $ver2";
+ } elsif ($ver1 eq $ver2) {
+ push @reinstall, "$pkg $ver1";
} else {
push @upgrade, "$pkg $ver1 => $ver2";
}
- } elsif ( $line =~ /^\S+ \S+ (status|configure|startup|trigproc) / ) {
+ } elsif ( $line =~ /^\S+ \S+ conffile / ) {
+ my ( $conffilename, $action ) = ( $line =~ /^\S+ \S+ conffile (\S+) (\S+)/ );
+ push @conffile, "$action $conffilename";
+ } elsif ( $line =~ /^\S+ \S+ (status|configure|startup|trigproc) / ) {
#ignore
} else {
push @unknown, $line;
@@ -67,9 +74,11 @@
}
my @k = ( "Installed" , \@install,
+ "Reinstalled" , \@reinstall,
"Upgraded" , \@upgrade,
"Removed", \@remove,
"Purged", \@purge,
+ "Configuration files", \@conffile,
"Unknown lines", \@unknown);
while (@k > 0) {