[zypp-devel] zypp backend for PackageKit
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. But comes the issue. Zypper can work fine like "zypper list-updates" in my system but it always complain it can't download repomd.xml as I run with "pkcon get-updates". Any idea? Thanks, Peter
On 01/21/2010 05:47 PM, Zhu, Peter J wrote:
But comes the issue. Zypper can work fine like “zypper list-updates” in my system but it always complain it can’t download repomd.xml as I run with “pkcon get-updates”. Any idea?
Any clues in /var/log/pk_backend_zypp? -- cheers, jano Ján Kupec YaST team ---------------------------------------------------------(PGP)--- Key ID: 637EE901 Fingerprint: 93B9 C79B 2D20 51C3 800B E09B 8048 46A6 637E E901 ---------------------------------------------------------(IRC)--- Server: irc.freenode.net Nick: jniq Channels: #zypp #yast #suse #susecz ---------------------------------------------------------(EOF)---
I just rerun it to show you log. pkcon refresh can work fine but pkcon get-updates said "Thre are no updates available at this time" Neither commands provide new entries in /var/log/pk_backend_zypp Peter
-----Original Message----- From: Jano Kupec [mailto:jkupec@suse.cz] Sent: Friday, January 22, 2010 1:04 AM To: zypp-devel@opensuse.org Subject: Re: [zypp-devel] zypp backend for PackageKit
On 01/21/2010 05:47 PM, Zhu, Peter J wrote:
But comes the issue. Zypper can work fine like "zypper list-updates" in my system but it always complain it can't download repomd.xml as I run with "pkcon get-updates". Any idea?
Any clues in /var/log/pk_backend_zypp?
-- cheers, jano
Ján Kupec YaST team ---------------------------------------------------------(PGP)--- Key ID: 637EE901 Fingerprint: 93B9 C79B 2D20 51C3 800B E09B 8048 46A6 637E E901 ---------------------------------------------------------(IRC)--- Server: irc.freenode.net Nick: jniq Channels: #zypp #yast #suse #susecz ---------------------------------------------------------(EOF)---
-- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
Ok, I got the log attached, please take a look. Thanks, Peter
-----Original Message----- From: Zhu, Peter J [mailto:peter.j.zhu@intel.com] Sent: Friday, January 22, 2010 10:04 AM To: Jano Kupec; zypp-devel@opensuse.org Subject: RE: [zypp-devel] zypp backend for PackageKit
I just rerun it to show you log. pkcon refresh can work fine but pkcon get-updates said "Thre are no updates available at this time"
Neither commands provide new entries in /var/log/pk_backend_zypp
Peter
-----Original Message----- From: Jano Kupec [mailto:jkupec@suse.cz] Sent: Friday, January 22, 2010 1:04 AM To: zypp-devel@opensuse.org Subject: Re: [zypp-devel] zypp backend for PackageKit
On 01/21/2010 05:47 PM, Zhu, Peter J wrote:
But comes the issue. Zypper can work fine like "zypper list-updates" in my system but it always complain it can't download repomd.xml as I run with "pkcon get-updates". Any idea?
Any clues in /var/log/pk_backend_zypp?
-- cheers, jano
Ján Kupec YaST team ---------------------------------------------------------(PGP)--- Key ID: 637EE901 Fingerprint: 93B9 C79B 2D20 51C3 800B E09B 8048 46A6 637E E901 ---------------------------------------------------------(IRC)--- Server: irc.freenode.net Nick: jniq Channels: #zypp #yast #suse #susecz ---------------------------------------------------------(EOF)---
-- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
On Friday 22 January 2010 04:14:35 Zhu, Peter J wrote:
Ok, I got the log attached, please take a look.
Before looking for updates "pkcon get-updates" triggers a refresh of the repos metadata. But the attached log does not show any error. RepoManager checks your 'trunk' repository (last refresh = 75.7167 minutes ago; at 2010-01-22 06:13:30 ff.). It successfully downloads repomd.xml, and states 'trunk cache is up to date with metadata'. Are you this is the right log snippet? -- cu, Michael Andres +------------------------------------------------------------------+ Key fingerprint = 2DFA 5D73 18B1 E7EF A862 27AC 3FB8 9E3A 27C6 B0E4 +------------------------------------------------------------------+ Michael Andres YaST Development ma@novell.com SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg) Maxfeldstrasse 5, D-90409 Nuernberg, Germany, ++49 (0)911 - 740 53-0 +------------------------------------------------------------------+ -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
I'm sure it's right because I deleted the log totally and then got this again Peter
-----Original Message----- From: Michael Andres [mailto:ma@suse.de] Sent: Friday, January 22, 2010 9:13 PM To: zypp-devel@opensuse.org Subject: Re: [zypp-devel] zypp backend for PackageKit
On Friday 22 January 2010 04:14:35 Zhu, Peter J wrote:
Ok, I got the log attached, please take a look.
Before looking for updates "pkcon get-updates" triggers a refresh of the repos metadata. But the attached log does not show any error.
RepoManager checks your 'trunk' repository (last refresh = 75.7167 minutes ago; at 2010-01-22 06:13:30 ff.). It successfully downloads repomd.xml, and states 'trunk cache is up to date with metadata'.
Are you this is the right log snippet?
--
cu, Michael Andres
+------------------------------------------------------------------+ Key fingerprint = 2DFA 5D73 18B1 E7EF A862 27AC 3FB8 9E3A 27C6 B0E4 +------------------------------------------------------------------+ Michael Andres YaST Development ma@novell.com SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg) Maxfeldstrasse 5, D-90409 Nuernberg, Germany, ++49 (0)911 - 740 53-0 +------------------------------------------------------------------+
-- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
On Friday 22 January 2010 17:29:48 Zhu, Peter J wrote:
I'm sure it's right because I deleted the log totally and then got this again
But did "pkcon get-updates" still show an error message? Or do I missunderstand, and it's zypper who shows the "can't download repomd.xml " error? In that case /var/log/zypper.log should give a hint. -- cu, Michael Andres +------------------------------------------------------------------+ Key fingerprint = 2DFA 5D73 18B1 E7EF A862 27AC 3FB8 9E3A 27C6 B0E4 +------------------------------------------------------------------+ Michael Andres YaST Development ma@novell.com SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg) Maxfeldstrasse 5, D-90409 Nuernberg, Germany, ++49 (0)911 - 740 53-0 +------------------------------------------------------------------+ -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
Oh, sorry, I sent wrong info in my first mail. The error info is NOT "can't download repomd.xml", it's another case I already figured out. The incorrect thing is that '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" Sorry for the confusion Peter
-----Original Message----- From: Michael Andres [mailto:ma@suse.de] Sent: Saturday, January 23, 2010 12:44 AM To: zypp-devel@opensuse.org Subject: Re: [zypp-devel] zypp backend for PackageKit
On Friday 22 January 2010 17:29:48 Zhu, Peter J wrote:
I'm sure it's right because I deleted the log totally and then got this again
But did "pkcon get-updates" still show an error message?
Or do I missunderstand, and it's zypper who shows the "can't download repomd.xml " error? In that case /var/log/zypper.log should give a hint.
--
cu, Michael Andres
+------------------------------------------------------------------+ Key fingerprint = 2DFA 5D73 18B1 E7EF A862 27AC 3FB8 9E3A 27C6 B0E4 +------------------------------------------------------------------+ Michael Andres YaST Development ma@novell.com SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg) Maxfeldstrasse 5, D-90409 Nuernberg, Germany, ++49 (0)911 - 740 53-0 +------------------------------------------------------------------+
-- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
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. -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
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.
On Tuesday 26 January 2010 13:27:25 Zhu, Peter J wrote:
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?
We implement get-updates as zypper lp which list official patches released as updates. -- Duncan Mac-Vicar P. - Novell® Making IT Work As One™ SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg) -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
I'm not sure I follow what you said. So you mean it's normal and by design? With such design, as I launch gpk-update-viewer(GUI in gnome-packagekit), I can't see any updates because both "pkcon get-updates" and gpk-update-viewer uses pk_client_get_updates_async which finally call backend_get_updates_thread() in pk-backend-zypp.cpp to get updates with libzypp. I noticed below snippets from that function // get all Packages and Patches for Update std::setzypp::PoolItem *candidates = zypp_get_patches (); //std::setzypp::PoolItem *candidates2 = new std::setzypp::PoolItem (); if (!_updating_self) { // exclude the patch-repository std::string patchRepo; if (!candidates->empty ()) { patchRepo = candidates->begin ()->resolvable ()->repoInfo ().alias (); } //candidates2 = zypp_get_updates (patchRepo); //candidates->insert (candidates2->begin (), candidates2->end ()); } So you use zypp_get_patches rather than zypp_get_updates to get updates? Why such design Peter
-----Original Message----- From: Duncan Mac-Vicar Prett [mailto:dmacvicar@suse.de] Sent: Tuesday, January 26, 2010 9:34 PM To: zypp-devel@opensuse.org Subject: Re: [zypp-devel] zypp backend for PackageKit
On Tuesday 26 January 2010 13:27:25 Zhu, Peter J wrote:
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?
We implement get-updates as zypper lp which list official patches released as updates.
-- Duncan Mac-Vicar P. - Novell® Making IT Work As One™ SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg)
-- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
On 1/26/2010 at 07:31 AM, "Zhu, Peter J"
wrote: I'm not sure I follow what you said. So you mean it's normal and by design? With such design, as I launch gpk-update-viewer(GUI in gnome-packagekit), I can't see any updates because both "pkcon get-updates" and gpk-update-viewer uses pk_client_get_updates_async which finally call backend_get_updates_thread() in pk-backend-zypp.cpp to get updates with libzypp. I noticed below snippets from that function // get all Packages and Patches for Update std::setzypp::PoolItem *candidates = zypp_get_patches (); //std::setzypp::PoolItem *candidates2 = new std::setzypp::PoolItem (); if (!_updating_self) { // exclude the patch-repository std::string patchRepo; if (!candidates->empty ()) { patchRepo = candidates->begin ()->resolvable ()->repoInfo ().alias (); }
//candidates2 = zypp_get_updates (patchRepo);
//candidates->insert (candidates2->begin (), candidates2->end ()); }
So you use zypp_get_patches rather than zypp_get_updates to get updates? Why such design
The goals of the updaters are not the same as the goals of manual interactive package management. The updaters are designed to maintain the stability of your system - generally it should be safe to throw on any updates listed. Only approved, vetted and tested updates show up - ie as Ducan said only official patches from the update repo. Manual interactive package management is completely separate. If you have installed package foo from repo foome and a new release is made then you can if you wish install that new bleeding edge version (or pick an intermediate version, or uninstall it or ...) with zypper. But you don't want that just automatically showing up in the updaters.. -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
participants (5)
-
Duncan Mac-Vicar Prett
-
Jano Kupec
-
Michael Andres
-
Scott Reeves
-
Zhu, Peter J