Thanks Reeves. But I still have issue getting it running correctly. 'zypper list-updates' does get a list of updates(yes, I do have them) but 'pkcon get-updates' said "There are no updates available at this time". Any idea? Attach log again Peter
-----Original Message----- From: Scott Reeves [mailto:sreeves@novell.com] Sent: Tuesday, January 26, 2010 6:14 AM To: Zhu, Peter J; zypp-devel@opensuse.org Subject: Re: [zypp-devel] zypp backend for PackageKit
On 1/21/2010 at 09:47 AM, "Zhu, Peter J"
wrote: Hi, I'm trying latest PK 0.5.6. As a background info in case you didn't know, PK implemented a new glib wrapper API called package-glib2 or just glib2 and this glib2 implementation become default one since PK 0.5.3(released early Oct,2009). But zypp backend for PK is still based old glib API so I can't even build it if I didn't enable legacy glib API. So I implemented a patch attached to use glib2 API in zypp backend, which is actually not difficult, basically most of them involves using new PackageID(gchar*) rather than a structure. Please help review.
Patch looks pretty good except for I would use the #defined constants to access the various parts instead of hardcoding array indexes like "sections[1]". Also just re-adding the method that was dropped probably would not fly upstream. You can grab the commits I made in the 0.6 branch to work with the new API and they should backport easily to 0.5.