rpms/PackageKit/devel pk-dont-show-brackets-null.patch, NONE, 1.1 PackageKit.spec, 1.51, 1.52

Richard Hughes rhughes at fedoraproject.org
Wed Sep 10 14:33:21 UTC 2008


Author: rhughes

Update of /cvs/pkgs/rpms/PackageKit/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv14179

Modified Files:
	PackageKit.spec 
Added Files:
	pk-dont-show-brackets-null.patch 
Log Message:
* Wed Sep 10 2008 Richard Hughes  <rhughes at redhat.com> - 0.3.2-2
- Fix a library error so we don't print (null) in the UI.


pk-dont-show-brackets-null.patch:

--- NEW FILE pk-dont-show-brackets-null.patch ---
commit 0bc4ba936db39ccf0466987d964a016363bceeee
Author: Richard Hughes <richard at hughsie.com>
Date:   Wed Sep 10 15:17:01 2008 +0100

    bugfix: don't convert null sections of a package_id to '(NULL)' instead use an empty string.

diff --git a/libpackagekit/pk-package-id.c b/libpackagekit/pk-package-id.c
index f328225..9d911fb 100644
--- a/libpackagekit/pk-package-id.c
+++ b/libpackagekit/pk-package-id.c
@@ -218,9 +214,12 @@ pk_package_id_copy (const PkPackageId *id)
 gchar *
 pk_package_id_to_string (const PkPackageId *id)
 {
-	return g_strdup_printf ("%s;%s;%s;%s",
-				id->name, id->version,
-				id->arch, id->data);
+	g_return_val_if_fail (id != NULL, NULL);
+	g_return_val_if_fail (id->name != NULL, NULL);
+	return g_strdup_printf ("%s;%s;%s;%s", id->name,
+				id->version != NULL ? id->version : "",
+				id->arch != NULL ? id->arch : "",
+				id->data != NULL ? id->data : "");
 }
 
 /**
@@ -237,11 +236,10 @@ pk_package_id_build (const gchar *name, const gchar *version,
 		     const gchar *arch, const gchar *data)
 {
 	g_return_val_if_fail (name != NULL, NULL);
-	g_return_val_if_fail (version != NULL, NULL);
-	g_return_val_if_fail (arch != NULL, NULL);
-	g_return_val_if_fail (data != NULL, NULL);
-
-	return g_strdup_printf ("%s;%s;%s;%s", name, version, arch, data);
+	return g_strdup_printf ("%s;%s;%s;%s", name,
+				version != NULL ? version : "",
+				arch != NULL ? arch : "",
+				data != NULL ? data : "");
 }
 
 /**



Index: PackageKit.spec
===================================================================
RCS file: /cvs/pkgs/rpms/PackageKit/devel/PackageKit.spec,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -r1.51 -r1.52
--- PackageKit.spec	8 Sep 2008 15:34:34 -0000	1.51
+++ PackageKit.spec	10 Sep 2008 14:32:50 -0000	1.52
@@ -8,13 +8,16 @@
 Summary:   System daemon that is a DBUS abstraction layer for package management
 Name:      PackageKit
 Version:   0.3.2
-Release:   1%{?dist}
+Release:   2%{?dist}
 License:   GPLv2+
 Group:     System Environment/Libraries
 URL:       http://packagekit.freedesktop.org
 Source0:   http://www.packagekit.org/releases/%{name}-%{version}.tar.gz
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
+# Upstream: 0bc4ba936db39ccf0466987d964a016363bceeee
+Patch0:    pk-dont-show-brackets-null.patch
+
 Requires: dbus >= %{dbus_version}
 Requires: dbus-glib >= %{dbus_glib_version}
 Requires: PackageKit-libs = %{version}-%{release}
@@ -138,6 +141,7 @@
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 %configure --enable-yum --enable-smart --with-default-backend=yum --disable-local
@@ -266,6 +270,9 @@
 %{_includedir}/*
 
 %changelog
+* Wed Sep 10 2008 Richard Hughes  <rhughes at redhat.com> - 0.3.2-2
+- Fix a library error so we don't print (null) in the UI.
+
 * Mon Sep 08 2008 Richard Hughes  <rhughes at redhat.com> - 0.3.2-1
 - New upstream version
 - This is the first release with the dispatcher functionality that allows




More information about the fedora-extras-commits mailing list