[Pkg-sympa-commits] [sympa] 26/30: Add a patch to fix log severity in some command line tools used in postinst

Emmanuel Bouthenot kolter at moszumanska.debian.org
Mon Sep 19 20:08:49 UTC 2016


This is an automated email from the git hooks/post-receive script.

kolter pushed a commit to branch master
in repository sympa.

commit 771b73b6d1f754a9efcdcd83dcf785a53a2b19d5
Author: Emmanuel Bouthenot <kolter at openics.org>
Date:   Mon Sep 19 21:44:57 2016 +0200

    Add a patch to fix log severity in some command line tools used in postinst
---
 debian/patches/1003_fix_various_syslog_severity | 49 +++++++++++++++++++++++++
 debian/patches/series                           |  1 +
 2 files changed, 50 insertions(+)

diff --git a/debian/patches/1003_fix_various_syslog_severity b/debian/patches/1003_fix_various_syslog_severity
new file mode 100644
index 0000000..a628841
--- /dev/null
+++ b/debian/patches/1003_fix_various_syslog_severity
@@ -0,0 +1,49 @@
+Description: Fix log severity in some command line tools used in postinst
+Author: Emmanuel Bouthenot <kolter at debian.org>
+Forwarded: no
+Last-Update: 2016-09-17
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/src/sbin/sympa.pl.in
++++ b/src/sbin/sympa.pl.in
+@@ -787,7 +787,7 @@
+     $main::options{'to'}   ||= Sympa::Constants::VERSION;
+ 
+     if ($main::options{'from'} eq $main::options{'to'}) {
+-        $log->syslog('err', 'Current version: %s; no upgrade is required',
++        $log->syslog('notice', 'Current version: %s; no upgrade is required',
+             $main::options{'to'});
+         exit 0;
+     } else {
+--- a/src/bin/upgrade_bulk_spool.pl.in
++++ b/src/bin/upgrade_bulk_spool.pl.in
+@@ -84,6 +84,29 @@
+     my $sdm = Sympa::DatabaseManager->instance
+         or die 'Can\'t connect to database';
+ 
++    # Checking if bulkmailer_table exits
++    my @tables;
++    my $list_of_tables;
++    if ($list_of_tables = $sdm->get_tables()) {
++        @tables = @{$list_of_tables};
++    } else {
++        @tables = ();
++    }
++    my $found = 0;
++    foreach my $t (@tables) {
++        if ($t eq "bulkmailer_table") {
++            $found = 1;
++            last;
++        }
++    }
++    if ($found == 0) {
++        $log->syslog(
++            'notice',
++            'bulkmailer table not found in database, bulk spool of your Sympa is probably up-to-date'
++        );
++        exit 0;
++    }
++
+     my $sth = $sdm->do_prepared_query(
+         q{SELECT *
+           FROM bulkmailer_table
diff --git a/debian/patches/series b/debian/patches/series
index 7308424..75a8a66 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 1001_fix_unexisiting_template
 1002_fix_various_typos
+1003_fix_various_syslog_severity
 2001_ca_bundle_check_as_warning.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/sympa.git



More information about the Pkg-sympa-commits mailing list