| Newsgroups |
gmane.comp.log.logwatch.devel |
| Message-ID |
<[email protected]> |
Revision: 129
http://logwatch.svn.sourceforge.net/logwatch/?rev=129&view=rev
Author: stefjakobs
Date: 2013-01-10 10:38:11 +0000 (Thu, 10 Jan 2013)
Log Message:
-----------
added service script for zypp/zypper
Added Paths:
-----------
conf/logfiles/zypp.conf
conf/services/zypp.conf
scripts/services/zypp
Added: conf/logfiles/zypp.conf
===================================================================
--- conf/logfiles/zypp.conf (rev 0)
+++ conf/logfiles/zypp.conf 2013-01-10 10:38:11 UTC (rev 129)
@@ -0,0 +1,15 @@
+##########################################################################
+# $Id$
+##########################################################################
+#
+# What actual file? Defaults to LogPath if not absolute path....
+LogFile = zypp/history
+
+# If the archives are searched, here is one or more line
+# (optionally containing wildcards) that tell where they are...
+# Note: if these are gzipped, you need to end with a .gz even if
+# you use wildcards...
+Archive = zypp/history.*.gz
+
+*ApplyEuroDate
+# vi: shiftwidth=3 tabstop=3 et
Added: conf/services/zypp.conf
===================================================================
--- conf/services/zypp.conf (rev 0)
+++ conf/services/zypp.conf 2013-01-10 10:38:11 UTC (rev 129)
@@ -0,0 +1,21 @@
+###########################################################################
+# $Id$
+###########################################################################
+
+# You can put comments anywhere you want to. They are effective for the
+# rest of the line.
+
+# this is in the format of <name> = <value>. Whitespace at the beginning
+# and end of the lines is removed. Whitespace before and after the = sign
+# is removed. Everything is case *insensitive*.
+
+# Yes = True = On = 1
+# No = False = Off = 0
+
+Title = zypp status changes
+
+# Which logfile group...
+LogFile = zypp
+
+
+# vi: shiftwidth=3 tabstop=3 et
Added: scripts/services/zypp
===================================================================
--- scripts/services/zypp (rev 0)
+++ scripts/services/zypp 2013-01-10 10:38:11 UTC (rev 129)
@@ -0,0 +1,72 @@
+#!/usr/bin/perl
+###########################################################################
+# $Id$
+###########################################################################
+
+########################################################
+## Copyright (c) 2013 Stefan Jakobs <[email protected]>
+## Covered under the included MIT/X-Consortium License:
+## http://www.opensource.org/licenses/mit-license.php
+## All modifications and contributions by other persons to
+## this script are assumed to have been donated to the
+## Logwatch project and thus assume the above copyright
+## and licensing terms. If you want to make contributions
+## under your own copyright or a different license this
+## must be explicitly stated in the contribution an the
+## Logwatch project reserves the right to not accept such
+## contributions. If you have made significant
+## contributions to this script and want to claim
+## copyright please contact [email protected]
+#########################################################
+
+use strict;
+
+my @install;
+my @remove;
+my @rremove;
+my @radd;
+
+my @unknown;
+
+while(my $line=<STDIN>) {
+ chomp $line;
+ if ( my ( $do, $pkg, $ver, $arch, $user, $repo, $hash) =
+ ( $line =~ /^\S+ \S+\|(?:(install|remove) ?)\|([^\|\s]+)\|([^\|\s]+)\|([^\|\s]+)\|([^\|\s]+)?(?:\|([^\|\s]+)\|([^\|\s]+))?/ )) {
+ if ($do eq "remove") {
+ push @remove, "$pkg $ver";
+ } elsif ($do eq "install") {
+ push @install, "$pkg $ver";
+ }
+ } elsif ( my ( $do, $repo, $url) = ( $line =~ /^\S+ \S+\|(?:(rremove|radd) {0,3})\|([^\|\s]+)(?:\|([^\|]+))?/) ) {
+ if ($repo eq "_tmpRPMcache_") {
+ # ignore
+ } elsif ($do eq "radd") {
+ push @radd, "$repo: $url";
+ } elsif ($do eq "rremove") {
+ push @rremove, "$repo";
+ }
+ } else {
+ push @unknown, $line;
+ }
+}
+
+my @k = ( "Installed" , \@install,
+ "Removed", \@remove,
+ "Repository added", \@radd,
+ "Repository removed", \@rremove,
+ "Unknown lines", \@unknown);
+
+while (@k > 0) {
+ my $text = shift @k;
+ my $array = shift @k;
+ if(@$array) {
+ print "\n$text:\n";
+ foreach my $line (sort @$array) {
+ print " $line\n";
+ }
+
+ }
+}
+
+# vi: shiftwidth=3 tabstop=3 syntax=perl et
+
Property changes on: scripts/services/zypp
___________________________________________________________________
Added: svn:executable
+ *
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712