summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-moblin/packages/packagekit/gnome-packagekit_2.28.2.bb (renamed from meta-moblin/packages/packagekit/gnome-packagekit_0.4.5.bb)2
-rw-r--r--meta-moblin/packages/packagekit/packagekit-0.5.6/configurefix.patch13
-rw-r--r--meta-moblin/packages/packagekit/packagekit-0.5.6/opkgfixes.patch421
-rw-r--r--meta-moblin/packages/packagekit/packagekit_0.5.6.bb (renamed from meta-moblin/packages/packagekit/packagekit_0.6.0.bb)2
4 files changed, 436 insertions, 2 deletions
diff --git a/meta-moblin/packages/packagekit/gnome-packagekit_0.4.5.bb b/meta-moblin/packages/packagekit/gnome-packagekit_2.28.2.bb
index ee3bfe356e..9b31e98ba3 100644
--- a/meta-moblin/packages/packagekit/gnome-packagekit_0.4.5.bb
+++ b/meta-moblin/packages/packagekit/gnome-packagekit_2.28.2.bb
@@ -1,7 +1,7 @@
1DESCRIPTION = "GNOME frontend for packagekit" 1DESCRIPTION = "GNOME frontend for packagekit"
2LICENSE = "GPL" 2LICENSE = "GPL"
3 3
4DEPENDS = "packagekit libsexy gconf-dbus policykit policykit-gnome libunique gnome-menus" 4DEPENDS = "packagekit libsexy gconf-dbus polkit polkit-gnome libunique gnome-menus devicekit-power"
5 5
6inherit gnome 6inherit gnome
7 7
diff --git a/meta-moblin/packages/packagekit/packagekit-0.5.6/configurefix.patch b/meta-moblin/packages/packagekit/packagekit-0.5.6/configurefix.patch
new file mode 100644
index 0000000000..48f959186a
--- /dev/null
+++ b/meta-moblin/packages/packagekit/packagekit-0.5.6/configurefix.patch
@@ -0,0 +1,13 @@
1Index: PackageKit-0.6.0/configure.ac
2===================================================================
3--- PackageKit-0.6.0.orig/configure.ac 2010-01-04 16:32:18.000000000 +0000
4+++ PackageKit-0.6.0/configure.ac 2010-01-29 11:33:48.000000000 +0000
5@@ -90,7 +90,7 @@
6 enable_strict=$default_strict)
7 if test x$enable_strict != xno; then
8 if test "$GCC" = "yes"; then
9- WARNINGFLAGS_CPP="$WARNINGFLAGS_CPP -Werror"
10+ :
11 fi
12 fi
13
diff --git a/meta-moblin/packages/packagekit/packagekit-0.5.6/opkgfixes.patch b/meta-moblin/packages/packagekit/packagekit-0.5.6/opkgfixes.patch
new file mode 100644
index 0000000000..64da86a526
--- /dev/null
+++ b/meta-moblin/packages/packagekit/packagekit-0.5.6/opkgfixes.patch
@@ -0,0 +1,421 @@
1Index: PackageKit-0.6.0/backends/opkg/pk-backend-opkg.c
2===================================================================
3--- PackageKit-0.6.0.orig/backends/opkg/pk-backend-opkg.c 2010-01-29 09:39:33.000000000 +0000
4+++ PackageKit-0.6.0/backends/opkg/pk-backend-opkg.c 2010-01-29 11:30:51.000000000 +0000
5@@ -29,8 +29,6 @@
6
7 #include <libopkg/opkg.h>
8
9-static opkg_t *opkg;
10-
11 enum {
12 SEARCH_NAME,
13 SEARCH_DESCRIPTION,
14@@ -62,7 +60,7 @@
15 * check an opkg package for known GUI dependancies
16 */
17 static gboolean
18-opkg_is_gui_pkg (opkg_package_t *pkg)
19+opkg_is_gui_pkg (pkg_t *pkg)
20 {
21
22 /* TODO: check appropriate tag */
23@@ -84,7 +82,7 @@
24 * check an opkg package to determine if it is a development package
25 */
26 static gboolean
27-opkg_is_devel_pkg (opkg_package_t *pkg)
28+opkg_is_devel_pkg (pkg_t *pkg)
29 {
30 if (g_strrstr (pkg->name, "-dev"))
31 return TRUE;
32@@ -105,7 +103,7 @@
33 * returns true if the tag is present
34 */
35 static gboolean
36-opkg_check_tag (opkg_package_t *pkg, const gchar *tag)
37+opkg_check_tag (pkg_t *pkg, const gchar *tag)
38 {
39 if (pkg->tags && tag)
40 return (g_strrstr (pkg->tags, tag) != NULL);
41@@ -118,7 +116,7 @@
42 {
43 switch (err)
44 {
45- case OPKG_NO_ERROR:
46+/* case OPKG_NO_ERROR:
47 break;
48 case OPKG_PACKAGE_NOT_INSTALLED:
49 pk_backend_error_code (backend, PK_ERROR_ENUM_PACKAGE_NOT_INSTALLED, NULL);
50@@ -140,7 +138,7 @@
51 break;
52 case OPKG_PACKAGE_NOT_AVAILABLE:
53 pk_backend_error_code (backend, PK_ERROR_ENUM_PACKAGE_NOT_FOUND, NULL);
54- break;
55+ break;*/
56 default:
57 opkg_unknown_error (backend, err, "Update package");
58 }
59@@ -152,7 +150,7 @@
60 static void
61 backend_initialize (PkBackend *backend)
62 {
63- opkg = opkg_new ();
64+ int opkg = opkg_new ();
65
66 if (!opkg) {
67 pk_backend_error_code (backend,
68@@ -162,8 +160,8 @@
69 }
70
71 #ifdef OPKG_OFFLINE_ROOT
72- opkg_set_option (opkg, (char *) "offline_root", OPKG_OFFLINE_ROOT);
73- opkg_re_read_config_files (opkg);
74+ opkg_set_option ((char *) "offline_root", OPKG_OFFLINE_ROOT);
75+ opkg_re_read_config_files ();
76 #endif
77
78 }
79@@ -174,22 +172,22 @@
80 static void
81 backend_destroy (PkBackend *backend)
82 {
83- opkg_free (opkg);
84+ opkg_free ();
85 }
86
87
88 static void
89-pk_opkg_progress_cb (opkg_t *_opkg, const opkg_progress_data_t *pdata, void *data)
90+pk_opkg_progress_cb (const opkg_progress_data_t *pdata, void *data)
91 {
92- PkBackend *backend = PK_BACKEND (data);
93+ PkBackend *backend = (PkBackend*) data;
94 if (!backend)
95 return;
96
97 pk_backend_set_percentage (backend, pdata->percentage);
98- if (pdata->package)
99+ if (pdata->pkg)
100 {
101 gchar *uid;
102- opkg_package_t *pkg = pdata->package;
103+ pkg_t *pkg = pdata->pkg;
104 gint status = PK_INFO_ENUM_UNKNOWN;
105
106 uid = g_strdup_printf ("%s;%s;%s;",
107@@ -225,12 +223,12 @@
108 {
109 int ret;
110
111- ret = opkg_update_package_lists (opkg, pk_opkg_progress_cb, backend);
112+ ret = opkg_update_package_lists (pk_opkg_progress_cb, backend);
113
114 if (ret) {
115- if (ret == OPKG_DOWNLOAD_FAILED)
116- pk_backend_error_code (backend, PK_ERROR_ENUM_REPO_NOT_AVAILABLE, NULL);
117- else
118+// if (ret == OPKG_DOWNLOAD_FAILED)
119+// pk_backend_error_code (backend, PK_ERROR_ENUM_REPO_NOT_AVAILABLE, NULL);
120+// else
121 opkg_unknown_error (backend, ret, "Refreshing cache");
122 }
123 pk_backend_finished (backend);
124@@ -256,7 +254,7 @@
125 */
126
127 static void
128-pk_opkg_package_list_cb (opkg_t *_opkg, opkg_package_t *pkg, void *data)
129+pk_opkg_package_list_cb (pkg_t *pkg, void *data)
130 {
131 SearchParams *params = (SearchParams*) data;
132 gchar *uid;
133@@ -298,7 +296,7 @@
134 uid = g_strdup_printf ("%s;%s;%s;",
135 pkg->name, pkg->version, pkg->architecture);
136
137- if (pkg->installed)
138+ if (pkg->state_status == SS_INSTALLED)
139 status = PK_INFO_ENUM_INSTALLED;
140 else
141 status = PK_INFO_ENUM_AVAILABLE;
142@@ -318,10 +316,10 @@
143 opkg_is_gui_pkg (pkg))
144 goto end_handle;
145 if (pk_bitfield_contain(filters, PK_FILTER_ENUM_INSTALLED) &&
146- (!pkg->installed))
147+ (pkg->state_status != SS_INSTALLED))
148 goto end_handle;
149 if (pk_bitfield_contain(filters, PK_FILTER_ENUM_NOT_INSTALLED) &&
150- (pkg->installed))
151+ (pkg->state_status == SS_INSTALLED))
152 goto end_handle;
153
154 pk_backend_package (params->backend, status, uid, pkg->description);
155@@ -338,7 +336,7 @@
156
157 params = pk_backend_get_pointer (backend, "search-params");
158
159- opkg_list_packages (opkg, pk_opkg_package_list_cb, params);
160+ opkg_list_packages (pk_opkg_package_list_cb, params);
161
162 pk_backend_finished (params->backend);
163
164@@ -349,7 +347,7 @@
165 }
166
167 static void
168-backend_search_name (PkBackend *backend, PkBitfield filters, const gchar *search)
169+backend_search_name (PkBackend *backend, PkBitfield filters, gchar **search)
170 {
171 SearchParams *params;
172
173@@ -360,7 +358,7 @@
174 params = g_new0 (SearchParams, 1);
175 params->filters = filters;
176 params->search_type = SEARCH_NAME;
177- params->needle = g_utf8_strdown (search, -1);
178+ params->needle = g_utf8_strdown (search[0], -1);
179 params->backend = backend;
180
181 pk_backend_set_pointer (backend, "search-params", params);
182@@ -371,7 +369,7 @@
183 * backend_search_description:
184 */
185 static void
186-backend_search_description (PkBackend *backend, PkBitfield filters, const gchar *search)
187+backend_search_description (PkBackend *backend, PkBitfield filters, gchar **search)
188 {
189 SearchParams *params;
190
191@@ -382,7 +380,7 @@
192 params = g_new0 (SearchParams, 1);
193 params->filters = filters;
194 params->search_type = SEARCH_DESCRIPTION;
195- params->needle = g_utf8_strdown (search, -1);
196+ params->needle = g_utf8_strdown (search[0], -1);
197 params->backend = backend;
198
199 pk_backend_set_pointer (backend, "search-params", params);
200@@ -390,7 +388,7 @@
201 }
202
203 static void
204-backend_search_group (PkBackend *backend, PkBitfield filters, const gchar *search)
205+backend_search_group (PkBackend *backend, PkBitfield filters, gchar **search)
206 {
207 SearchParams *params;
208
209@@ -401,7 +399,7 @@
210 params = g_new0 (SearchParams, 1);
211 params->filters = filters;
212 params->search_type = SEARCH_TAG;
213- params->needle = g_strdup_printf ("group::%s", search);
214+ params->needle = g_strdup_printf ("group::%s", search[0]);
215 params->backend = backend;
216
217 pk_backend_set_pointer (backend, "search-params", params);
218@@ -412,9 +410,9 @@
219 static gboolean
220 backend_install_packages_thread (PkBackend *backend)
221 {
222- PkPackageId *pi;
223 gint err, i;
224 gchar **package_ids;
225+ gchar **parts;
226
227 package_ids = pk_backend_get_strv (backend, "pkids");
228
229@@ -424,13 +422,13 @@
230 {
231 pk_backend_package (backend, PK_INFO_ENUM_INSTALLING, package_ids[i], NULL);
232
233- pi = pk_package_id_new_from_string (package_ids[i]);
234+ parts = pk_package_id_split (package_ids[i]);
235
236- err = opkg_install_package (opkg, pi->name, pk_opkg_progress_cb, backend);
237+ err = opkg_install_package (parts[PK_PACKAGE_ID_NAME], pk_opkg_progress_cb, backend);
238 if (err)
239 handle_install_error (backend, err);
240
241- pk_package_id_free (pi);
242+ g_strfreev (parts);
243 if (err != 0)
244 break;
245 }
246@@ -453,9 +451,9 @@
247 static gboolean
248 backend_remove_packages_thread (PkBackend *backend)
249 {
250- PkPackageId *pi;
251 gint err, i;
252 gchar **package_ids;
253+ gchar **parts;
254 gboolean allow_deps;
255 gboolean autoremove;
256 gpointer *data;
257@@ -467,29 +465,30 @@
258 autoremove = GPOINTER_TO_INT (data[2]);
259 g_free (data);
260
261- opkg_set_option (opkg, (char *)"autoremove", &autoremove);
262- opkg_set_option (opkg, (char *)"force_removal_of_dependent_packages", &allow_deps);
263+ opkg_set_option ((char *)"autoremove", &autoremove);
264+ opkg_set_option ((char *)"force_removal_of_dependent_packages", &allow_deps);
265
266 err = 0;
267
268 for (i = 0; package_ids[i]; i++)
269 {
270- pi = pk_package_id_new_from_string (package_ids[i]);
271 pk_backend_package (backend, PK_INFO_ENUM_REMOVING, package_ids[i], NULL);
272
273- err = opkg_remove_package (opkg, pi->name, pk_opkg_progress_cb, backend);
274+ parts = pk_package_id_split (package_ids[i]);
275+
276+ err = opkg_remove_package (parts[PK_PACKAGE_ID_NAME], pk_opkg_progress_cb, backend);
277
278 switch (err)
279 {
280- case OPKG_NO_ERROR:
281- break;
282- case OPKG_PACKAGE_NOT_INSTALLED:
283- pk_backend_error_code (backend, PK_ERROR_ENUM_PACKAGE_NOT_INSTALLED, NULL);
284- break;
285+ //case OPKG_NO_ERROR:
286+ // break;
287+ //case OPKG_PACKAGE_NOT_INSTALLED:
288+ // pk_backend_error_code (backend, PK_ERROR_ENUM_PACKAGE_NOT_INSTALLED, NULL);
289+ // break;
290 default:
291 opkg_unknown_error (backend, err, "Remove");
292 }
293- pk_package_id_free (pi);
294+ g_strfreev (parts);
295
296 if (err != 0)
297 break;
298@@ -540,7 +539,7 @@
299 gint err;
300
301 /* FIXME: support only_trusted */
302- err = opkg_upgrade_all (opkg, pk_opkg_progress_cb, backend);
303+ err = opkg_upgrade_all (pk_opkg_progress_cb, backend);
304
305 if (err)
306 opkg_unknown_error (backend, err, "Upgrading system");
307@@ -564,29 +563,28 @@
308 static gboolean
309 backend_update_package_thread (PkBackend *backend)
310 {
311- PkPackageId *pi;
312+ gchar **parts;
313 gint err = 0;
314 const gchar *package_id;
315
316 /* FIXME: support only_trusted */
317 package_id = pk_backend_get_string (backend, "pkgid");
318- pi = pk_package_id_new_from_string (package_id);
319+ parts = pk_package_id_split (package_id);
320
321- if (!pi->name || !pi->version)
322+ if (!parts)
323 {
324 pk_backend_error_code (backend, PK_ERROR_ENUM_PACKAGE_NOT_FOUND,
325 "Package not found");
326- pk_package_id_free (pi);
327 pk_backend_finished (backend);
328 return FALSE;
329 }
330
331- err = opkg_upgrade_package (opkg, pi->name, pk_opkg_progress_cb, backend);
332+ err = opkg_upgrade_package (parts[PK_PACKAGE_ID_NAME], pk_opkg_progress_cb, backend);
333 if (err)
334 handle_install_error (backend, err);
335
336
337- pk_package_id_free (pi);
338+ g_strfreev (parts);
339 pk_backend_finished (backend);
340 return (err != 0);
341 }
342@@ -610,13 +608,13 @@
343 */
344
345 static void
346-pk_opkg_list_upgradable_cb (opkg_t *_opkg, opkg_package_t *pkg, void *data)
347+pk_opkg_list_upgradable_cb (pkg_t *pkg, void *data)
348 {
349- PkBackend *backend = PK_BACKEND (data);
350+ PkBackend *backend = (PkBackend*) data;
351 gchar *uid;
352 gint status;
353
354- if (pkg->installed)
355+ if (pkg->state_status == SS_INSTALLED)
356 status = PK_INFO_ENUM_INSTALLED;
357 else
358 status = PK_INFO_ENUM_AVAILABLE;
359@@ -631,7 +629,7 @@
360 static gboolean
361 backend_get_updates_thread (PkBackend *backend)
362 {
363- opkg_list_upgradable_packages (opkg, pk_opkg_list_upgradable_cb, backend);
364+ opkg_list_upgradable_packages (pk_opkg_list_upgradable_cb, backend);
365 pk_backend_finished (backend);
366 return TRUE;
367 }
368@@ -668,16 +666,18 @@
369 static gboolean
370 backend_get_details_thread (PkBackend *backend)
371 {
372- PkPackageId *pi;
373 gchar **package_ids;
374+ gchar **parts;
375 int group_index;
376 PkGroupEnum group = 0;
377- opkg_package_t *pkg;
378+ pkg_t *pkg;
379 gchar *newid;
380
381 package_ids = pk_backend_get_strv(backend, "package_ids");
382- pi = pk_package_id_new_from_string (package_ids[0]);
383- if (pi == NULL)
384+ parts = pk_package_id_split (package_ids[0]);
385+
386+
387+ if (!parts)
388 {
389 pk_backend_error_code (backend, PK_ERROR_ENUM_PACKAGE_ID_INVALID, "invalid package id");
390 pk_backend_finished (backend);
391@@ -685,8 +685,8 @@
392 }
393
394
395- pkg = opkg_find_package (opkg, pi->name, pi->version, pi->arch, pi->data);
396- pk_package_id_free (pi);
397+ pkg = opkg_find_package (parts[PK_PACKAGE_ID_NAME], parts[PK_PACKAGE_ID_VERSION], parts[PK_PACKAGE_ID_ARCH], parts[PK_PACKAGE_ID_DATA]);
398+ g_strfreev (parts);
399
400 if (!pkg)
401 {
402@@ -695,7 +695,7 @@
403 return FALSE;
404 }
405
406- newid = g_strdup_printf ("%s;%s;%s;%s", pkg->name, pkg->version, pkg->architecture, pkg->repository);
407+ newid = g_strdup_printf ("%s;%s;%s;%s", pkg->name, pkg->version, pkg->architecture, pkg->src->name);
408
409 if (pkg->tags) {
410 for (group_index = 0; group < PK_GROUP_ENUM_LAST; group_index++) {
411@@ -706,9 +706,8 @@
412 }
413 }
414
415- pk_backend_details (backend, newid, NULL, group, pkg->description, pkg->url, pkg->size);
416+ pk_backend_details (backend, newid, NULL, group, pkg->description, NULL, pkg->size);
417 g_free (newid);
418- opkg_package_free(pkg);
419 pk_backend_finished (backend);
420 return TRUE;
421 }
diff --git a/meta-moblin/packages/packagekit/packagekit_0.6.0.bb b/meta-moblin/packages/packagekit/packagekit_0.5.6.bb
index fbab7c9cac..6cd1101122 100644
--- a/meta-moblin/packages/packagekit/packagekit_0.6.0.bb
+++ b/meta-moblin/packages/packagekit/packagekit_0.5.6.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "PackageKit package management abstraction"
2SECTION = "libs" 2SECTION = "libs"
3PRIORITY = "optional" 3PRIORITY = "optional"
4LICENSE = "GPL" 4LICENSE = "GPL"
5DEPENDS = "gtk+ python policykit dbus (>= 1.1.1) dbus-glib glib-2.0 sqlite3 opkg intltool intltool-native (>= 0.37.1) connman" 5DEPENDS = "gtk+ python polkit dbus (>= 1.1.1) dbus-glib glib-2.0 sqlite3 opkg intltool intltool-native (>= 0.37.1) connman"
6RDEPENDS_${PN} = "opkg" 6RDEPENDS_${PN} = "opkg"
7 7
8inherit gnome autotools_stage 8inherit gnome autotools_stage