[PackageKit] PackageKit many broadcasts messages (#781807)

Rex Dieter rdieter at fedoraproject.org
Sat Dec 7 19:05:09 UTC 2013


commit 0be265f93e23a46b40f010cec39cb578992cfcf3
Author: Rex Dieter <rdieter at math.unl.edu>
Date:   Sat Dec 7 13:05:09 2013 -0600

    PackageKit many broadcasts messages (#781807)

 0022-Use-syslog-correctly.patch |  105 +++++++++++++++++++++++++++++++++++++++
 PackageKit.spec                 |    7 ++-
 2 files changed, 111 insertions(+), 1 deletions(-)
---
diff --git a/0022-Use-syslog-correctly.patch b/0022-Use-syslog-correctly.patch
new file mode 100644
index 0000000..19444ca
--- /dev/null
+++ b/0022-Use-syslog-correctly.patch
@@ -0,0 +1,105 @@
+From 2295b08d4f19b650abc7a14436a486715a913d1c Mon Sep 17 00:00:00 2001
+From: Richard Hughes <richard at hughsie.com>
+Date: Wed, 4 Dec 2013 13:57:59 +0000
+Subject: [PATCH 22/50] Use syslog() correctly
+
+Resolves: https://bugs.freedesktop.org/show_bug.cgi?id=72275
+---
+ src/pk-main.c        |  4 ++--
+ src/pk-transaction.c | 16 +++++++++-------
+ 2 files changed, 11 insertions(+), 9 deletions(-)
+
+diff --git a/src/pk-main.c b/src/pk-main.c
+index 3ce5694..457a511 100644
+--- a/src/pk-main.c
++++ b/src/pk-main.c
+@@ -241,7 +241,7 @@ main (int argc, char *argv[])
+ 	pk_conf_set_bool (conf, "KeepEnvironment", keep_environment);
+ 
+ 	/* log the startup */
+-	syslog (LOG_DAEMON, "daemon start");
++	syslog (LOG_DAEMON | LOG_DEBUG, "daemon start");
+ 
+ 	/* after how long do we timeout? */
+ 	exit_idle_time = pk_conf_get_int (conf, "ShutdownTimeout");
+@@ -309,7 +309,7 @@ main (int argc, char *argv[])
+ 	g_main_loop_run (loop);
+ out:
+ 	/* log the shutdown */
+-	syslog (LOG_DAEMON, "daemon quit");
++	syslog (LOG_DAEMON | LOG_DEBUG, "daemon quit");
+ 	closelog ();
+ 
+ 	if (timer_id > 0)
+diff --git a/src/pk-transaction.c b/src/pk-transaction.c
+index 9e741f7..6471d1b 100644
+--- a/src/pk-transaction.c
++++ b/src/pk-transaction.c
+@@ -1246,7 +1246,7 @@ pk_transaction_finished_cb (PkBackendJob *job, PkExitEnum exit_enum, PkTransacti
+ 			if (info == PK_INFO_ENUM_REMOVING ||
+ 			    info == PK_INFO_ENUM_INSTALLING ||
+ 			    info == PK_INFO_ENUM_UPDATING) {
+-				syslog (LOG_DAEMON,
++				syslog (LOG_DAEMON | LOG_DEBUG,
+ 					"in %s for %s package %s was %s for uid %i",
+ 					transaction->priv->tid,
+ 					pk_role_enum_to_string (transaction->priv->role),
+@@ -1281,7 +1281,7 @@ pk_transaction_finished_cb (PkBackendJob *job, PkExitEnum exit_enum, PkTransacti
+ 
+ 	/* report to syslog */
+ 	if (transaction->priv->uid != PK_TRANSACTION_UID_INVALID) {
+-		syslog (LOG_DAEMON,
++		syslog (LOG_DAEMON | LOG_INFO,
+ 			"%s transaction %s from uid %i finished with %s after %ims",
+ 			pk_role_enum_to_string (transaction->priv->role),
+ 			transaction->priv->tid,
+@@ -1289,7 +1289,7 @@ pk_transaction_finished_cb (PkBackendJob *job, PkExitEnum exit_enum, PkTransacti
+ 			pk_exit_enum_to_string (exit_enum),
+ 			time_ms);
+ 	} else {
+-		syslog (LOG_DAEMON,
++		syslog (LOG_DAEMON | LOG_INFO,
+ 			"%s transaction %s finished with %s after %ims",
+ 			pk_role_enum_to_string (transaction->priv->role),
+ 			transaction->priv->tid,
+@@ -2473,7 +2473,7 @@ pk_transaction_commit (PkTransaction *transaction)
+ 			pk_transaction_db_set_cmdline (priv->transaction_db, priv->tid, priv->cmdline);
+ 
+ 		/* report to syslog */
+-		syslog (LOG_DAEMON,
++		syslog (LOG_DAEMON | LOG_DEBUG,
+ 			"new %s transaction %s scheduled from uid %i",
+ 			pk_role_enum_to_string (priv->role),
+ 			priv->tid,
+@@ -2664,7 +2664,9 @@ pk_transaction_action_obtain_authorization_finished_cb (GObject *source_object,
+ 						"Failed to obtain authentication.");
+ 		pk_transaction_finished_emit (transaction, PK_EXIT_ENUM_FAILED, 0);
+ 
+-		syslog (LOG_AUTHPRIV, "uid %i failed to obtain auth", priv->uid);
++		syslog (LOG_AUTH | LOG_NOTICE,
++			"uid %i failed to obtain auth",
++			priv->uid);
+ 		goto out;
+ 	}
+ 
+@@ -2677,7 +2679,7 @@ pk_transaction_action_obtain_authorization_finished_cb (GObject *source_object,
+ 	}
+ 
+ 	/* log success too */
+-	syslog (LOG_AUTHPRIV, "uid %i obtained auth", priv->uid);
++	syslog (LOG_AUTH | LOG_INFO, "uid %i obtained auth", priv->uid);
+ out:
+ 	if (result != NULL)
+ 		g_object_unref (result);
+@@ -2876,7 +2878,7 @@ pk_transaction_obtain_authorization (PkTransaction *transaction,
+ 	}
+ 
+ 	/* log */
+-	syslog (LOG_AUTHPRIV,
++	syslog (LOG_AUTH | LOG_INFO,
+ 		"uid %i is trying to obtain %s auth (only_trusted:%i)",
+ 		priv->uid,
+ 		action_id,
+-- 
+1.8.4.2
+
diff --git a/PackageKit.spec b/PackageKit.spec
index cbf8715..9870db9 100644
--- a/PackageKit.spec
+++ b/PackageKit.spec
@@ -6,7 +6,7 @@
 Summary:   Package management service
 Name:      PackageKit
 Version:   0.8.14
-Release:   2%{?dist}
+Release:   3%{?dist}
 License:   GPLv2+ and LGPLv2+
 URL:       http://www.packagekit.org
 Source0:   http://www.packagekit.org/releases/%{name}-%{version}.tar.xz
@@ -19,6 +19,7 @@ Patch4: PackageKit-0.7.4-xulrunner2.patch
 
 # Upstream already
 Patch5: 0001-Do-not-assert-when-re-using-a-PkPackage-instance.patch
+Patch6: 0022-Use-syslog-correctly.patch
 
 Requires: %{name}-glib%{?_isa} = %{version}-%{release}
 Requires: PackageKit-backend
@@ -232,6 +233,7 @@ using PackageKit.
 %patch0 -p1 -b .fedora
 %patch4 -p1 -b .xulrunner2
 %patch5 -p1 -b .no-history-crash
+%patch6 -p1 -b .use_syslog_correctly
 
 NOCONFIGURE=1 ./autogen.sh
 
@@ -413,6 +415,9 @@ systemctl enable packagekit-offline-update.service &> /dev/null || :
 %{_libdir}/pkgconfig/packagekit-plugin.pc
 
 %changelog
+* Sat Dec 07 2013 Rex Dieter <rdieter at fedoraproject.org> 0.8.14-3
+- PackageKit many broadcasts messages (#781807)
+
 * Tue Dec 03 2013 Richard Hughes <rhughes at redhat.com> - 0.8.14-2
 - Backport a patch from master to fix a crash when getting package history
 - Resolves: #1036837


More information about the scm-commits mailing list