busybox: enable mkfs.vfat
[openembedded.git] / recipes / packagekit / files / modify_summary_and_adding_reposi_info.patch
1 diff --git a/backends/opkg/pk-backend-opkg.c b/backends/opkg/pk-backend-opkg.c
2 index 9e71b90..92da8b0 100644
3 --- a/backends/opkg/pk-backend-opkg.c
4 +++ b/backends/opkg/pk-backend-opkg.c
5 @@ -281,6 +281,7 @@ pk_opkg_package_list_cb (opkg_t *opkg, opkg_package_t *pkg, void *data)
6  {
7         SearchParams *params;
8         gchar *uid;
9 +        gchar *summary;
10         gchar *haystack;
11         gint status, match;
12         PkFilterEnum filters;
13 @@ -327,8 +328,14 @@ pk_opkg_package_list_cb (opkg_t *opkg, opkg_package_t *pkg, void *data)
14                         break;
15         }
16  
17 -       uid = g_strdup_printf ("%s;%s;%s;",
18 -               pkg->name, pkg->version, pkg->architecture);
19 +       uid = g_strdup_printf ("%s;%s;%s;%s",
20 +               pkg->name, pkg->version, pkg->architecture, pkg->repository);
21 +
22 +        if (!pkg->tags) 
23 +                summary = g_strdup_printf("%s", pkg->description);
24 +        else 
25 +                summary = g_strdup_printf("%s ;; %s", pkg->tags, pkg->description);
26 +                
27  
28         if (pkg->installed)
29                 status = PK_INFO_ENUM_INSTALLED;
30 @@ -350,10 +357,11 @@ pk_opkg_package_list_cb (opkg_t *opkg, opkg_package_t *pkg, void *data)
31         if ((filters & PK_FILTER_ENUM_NOT_INSTALLED) && (pkg->installed))
32                 goto end_handle;
33  
34 -       pk_backend_package (params->backend, status, uid, pkg->description);
35 +       pk_backend_package (params->backend, status, uid, summary);
36  
37  end_handle:
38         g_free(uid);
39 +        g_free(summary);
40  }
41  
42  static gboolean
43 @@ -713,6 +721,7 @@ backend_get_details_thread (PkBackend *backend)
44         int group_index;
45         PkGroupEnum group = 0;
46         opkg_package_t *pkg;
47 +        gchar *summary;
48         gchar *newid;
49  
50         package_id = pk_backend_get_string (backend, "package_id");
51 @@ -746,13 +755,17 @@ backend_get_details_thread (PkBackend *backend)
52                         if (opkg_check_tag(pkg, (gchar *)pk_group_enum_to_text(group))) 
53                                 break;
54                 }
55 +                summary = g_strdup_printf("%s ;; %s", pkg->tags, pkg->description);
56         }
57 +        else 
58 +                summary = g_strdup_printf("%s", pkg->description);
59  
60 -       pk_backend_details (backend, newid, NULL, group, pkg->description, pkg->url, pkg->size);
61 +       pk_backend_details (backend, newid, NULL, group, summary, pkg->url, pkg->size);
62         pk_backend_finished (backend);
63         opkg_thread_unlock();
64  
65         g_free (newid);
66 +        g_free (summary);
67         opkg_package_free(pkg);
68         return TRUE;
69  }