[packagekit] [PATCH] Zypp Backend Fixes; Segfault + Package Summaries

Richard Hughes hughsient at gmail.com
Fri Sep 19 08:03:43 PDT 2008


On Fri, 2008-09-19 at 16:43 +0200, Martin S. wrote:
> After playing around with the latest PK on openSUSE I created a few
> patches to fix some minor stuff.

Thanks!

> Not sure if this will affect the KDE frontend but afaik this is the
> right thing a backend should do.

Agree. Some specific points below:

>                         for (zypp::sat::SolvableSet::const_iterator it = content.begin (); it != content.end (); it++) {
> -                               obsoletes = g_strconcat (obsoletes, zypp_build_package_id_capabilities (it->obsoletes ()), "^", (gchar *)NULL);
> +                               if (strlen(obsoletes) == 0) {
> +                                       obsoletes = zypp_build_package_id_capabilities (it->obsoletes ());
> +                               }
> +                               else {
> +                                       obsoletes = g_strconcat (obsoletes, "^", zypp_build_package_id_capabilities (it->obsoletes ()), (gchar *)NULL);
> +                               }

If it's only one line you probably should have:

if (dave)
    mo ();
else
    foo ();

>                                 pk_backend_package (backend,
>                                                 PK_INFO_ENUM_INSTALLED,
>                                                 package_id_temp,
> -                                               item->description ().c_str());
> +                                               item->summary ().c_str());

Excellent, I saw some screenshots of gnome-packagekit on suse and it
just looked crap with those long descriptions in the summary.

Can one of the zypp guys please commit these with the minor changes.
Thanks.

Richard.





More information about the PackageKit mailing list