packagekit: Add patch to packagekit.
authorJulian_chu <julian_chu@openmoko.com>
Wed, 4 Jun 2008 10:08:45 +0000 (18:08 +0800)
committerHolger Hans Peter Freyther <zecke@selfish.org>
Tue, 28 Oct 2008 21:48:51 +0000 (22:48 +0100)
 it fix a bug that packagekit does not reply group message after new get-details implementation.

packages/packagekit/files/03_group_infomation.patch [new file with mode: 0644]
packages/packagekit/packagekit_git.bb

diff --git a/packages/packagekit/files/03_group_infomation.patch b/packages/packagekit/files/03_group_infomation.patch
new file mode 100644 (file)
index 0000000..55872cd
--- /dev/null
@@ -0,0 +1,31 @@
+diff --git a/backends/opkg/pk-backend-opkg.c b/backends/opkg/pk-backend-opkg.c
+index 2d70108..02966c9 100644
+--- a/backends/opkg/pk-backend-opkg.c
++++ b/backends/opkg/pk-backend-opkg.c
+@@ -656,6 +656,8 @@ backend_get_details_thread (PkBackend *backend)
+ {
+       PkPackageId *pi;
+       const gchar *package_id;
++      int group_index;
++      PkGroupEnum group = 0;
+       opkg_package_t *pkg;
+       gchar *newid;
+@@ -681,8 +683,16 @@ backend_get_details_thread (PkBackend *backend)
+       newid = g_strdup_printf ("%s;%s;%s;%s", pkg->name, pkg->version, pkg->architecture, pkg->repository);
+-      pk_backend_details (backend, newid, NULL, 0, pkg->description, pkg->url, pkg->size);
++      if (pkg->tags) {
++              for (group_index = 0; group < PK_GROUP_ENUM_UNKNOWN; group_index++) {
++                      group = 1 << group_index;
++                      if (!(group & backend_get_groups(backend))) continue;
++                      if (opkg_check_tag(pkg, (gchar *)pk_group_enum_to_text(group))) 
++                              break;
++              }
++      }
++      pk_backend_details (backend, newid, NULL, group, pkg->description, pkg->url, pkg->size);
+       g_free (newid);
+       pk_backend_finished (backend);
+       return TRUE;
index 2b38ffe..7a0a11f 100644 (file)
@@ -5,12 +5,13 @@ LICENSE = "GPL"
 DEPENDS = "dbus (>= 1.1.1) dbus-glib glib-2.0 sqlite3 opkg intltool intltool-native (>= 0.37.1)"
 RDEPENDS_${PN} = "opkg"
 PV = "0.2.3+gitr${SRCREV}"
-PR = "r11"
+PR = "r12"
 
 SRC_URI = "git://anongit.freedesktop.org/git/packagekit;protocol=git \
            file://disable-docbook2man.patch;patch=1 \
            file://01_d1e096c3267c1c9492041382b954e9327bc8bbec.patch;patch=1 \
-          file://02_9ced8313fb12f0f89ad6ced7c0fdc7241ff00d77.patch;patch=1"
+           file://02_9ced8313fb12f0f89ad6ced7c0fdc7241ff00d77.patch;patch=1 \
+           file://03_group_infomation.patch;patch=1"