[zypp-devel] Can someone do a quick code review for our zypp backend for PackageKit?
As some of you may have seen from my blog post [1], Scott Reeves and I were able to finally get a package to install with the zypp backend for PackageKit! Since we're not the experts with libzypp, we'd love it if some of you could take a look at our code. Are there better ways to do what we're doing (particularly in the backend_install_package_thread function)? Also, we'd like to add notification into the backend so we could notify PackageKit about the progress of installs and such (i.e,. when a package is being downloaded, installed, etc.). How exactly can we do that? Are there callbacks we need to register? Does anyone have any sample code? I've attached our latest file since it appears our changes haven't been pushed out to the anonymous git server yet. Thanks! Boyd [1] http://boyd.musipal.com/2007/11/packagekit-gets-zypp-backend.html
Hello Boyd, this is quite cool, I am glad to see movement here. I would like to take the occasion to point out: when this is somewhat complete, I would like to hear from you directly, and we can assess with engineering if this can/should be be used for OpenSUSE, and possibly SLE. But I would like to have this discussion when *you* feel that this is technically mature for it, not before. I also do not want to hear assumptions/rumors/grumblings _in_ or _against_ this direction until we have this discussion. We have an agreed on plan between PM and Engineering, and that is the official roadmap. Currently we have an agreement to look at PackageKit, and since the independent engineering review I privately asked for a few weeks ago came back negative, this work is welcome news in order to see how well integration w/h packagekit would actually work in practice. *But*, I do not want to foster corridor rumors, or have a left-field commentary from some that we are changing our plans. Currently, our plan is the 10.3 stack. When it changes, if it does, I will sign that change. End of the story. No speculation, I hate gossip. And on this subject, gossip tends to be inflammatory to boot. Yay. Best - F Boyd Timothy wrote:
As some of you may have seen from my blog post [1], Scott Reeves and I were able to finally get a package to install with the zypp backend for PackageKit!
Since we're not the experts with libzypp, we'd love it if some of you could take a look at our code. Are there better ways to do what we're doing (particularly in the backend_install_package_thread function)?
Also, we'd like to add notification into the backend so we could notify PackageKit about the progress of installs and such (i.e,. when a package is being downloaded, installed, etc.). How exactly can we do that? Are there callbacks we need to register? Does anyone have any sample code?
I've attached our latest file since it appears our changes haven't been pushed out to the anonymous git server yet.
Thanks!
Boyd
[1] http://boyd.musipal.com/2007/11/packagekit-gets-zypp-backend.html
-- _________________________________________ -- "'Problem' is a bleak word for challenge" - Richard Fish (Federico L. Lucifredi) - flucifredi@novell.com -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
On Wednesday 21 November 2007 16:55:34 Federico Lucifredi wrote:
*But*, I do not want to foster corridor rumors, or have a left-field commentary from some that we are changing our plans. Currently, our plan is the 10.3 stack. When it changes, if it does, I will sign that change. End of the story.
Uh? To be honest, this kinds of post doesn't belong to community mailing lists. what has packagekit to do at all with the 10.3 stack is another story... (crickets sound...) Cheers Duncan -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
Duncan Mac-Vicar Prett wrote:
On Wednesday 21 November 2007 16:55:34 Federico Lucifredi wrote:
*But*, I do not want to foster corridor rumors, or have a left-field commentary from some that we are changing our plans. Currently, our plan is the 10.3 stack. When it changes, if it does, I will sign that change. End of the story.
Uh?
To be honest, this kinds of post doesn't belong to community mailing lists.
You are right Duncan, I missed the headers - there is _stuff_ flying everywhere today, sorry, my bad. That should have been internal. Best -F -- _________________________________________ -- "'Problem' is a bleak word for challenge" - Richard Fish (Federico L. Lucifredi) - flucifredi@novell.com -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
On Wednesday 21 November 2007 18:46:01 you wrote:
You are right Duncan, I missed the headers - there is _stuff_ flying everywhere today, sorry, my bad. That should have been internal.
it happens ;-) Duncan -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
Hi Boyd, Scott, Jp! Some comments: static zypp::ZYpp::Ptr get_zypp () The zypp pointer automatically creates the library so you dont need to track it in another ptr, you can use getZYpp all the time. The target is excplitly initialized, so you can delay that till t is needed (because it reads gpg keys and basic rpm startup (not reading packages anyway)) I also see you use the sqlite database directly :-) if (sqlite3_open("/var/cache/zypp/zypp.db", &db) != 0) { That will not give you the installed packages, except if you do itand I did not reailze how? Also, I would name the backend openSUSE (ZYpp); Novell (ZYpp), or SUSE (ZYpp) because the ZYpp name alone is not that clear? (may be I am wrong?)
Also, we'd like to add notification into the backend so we could notify PackageKit about the progress of installs and such (i.e,. when a package is being downloaded, installed, etc.). How exactly can we do that? Are there callbacks we need to register? Does anyone have any sample code?
I've attached our latest file since it appears our changes haven't been pushed out to the anonymous git server yet.
Sure Look at: http://svn.opensuse.org/svn/zypp/trunk/zypper/src/zypper-repo-callbacks.h The most important there is struct RepoReportReceiver : public zypp::callback::ReceiveReportzypp::repo::RepoReport You define your class implementing reporting, and then instanciate it and use _repoReport.connect(); and dsconenct() to enable or disable them. There are also rpm callbacks: http://svn.opensuse.org/svn/zypp/trunk/zypper/src/zypper-rpm-callbacks.h signature and checksums callbacks: http://svn.opensuse.org/svn/zypp/trunk/zypper/src/zypper-keyring-callbacks.h and media access callbacks: http://svn.opensuse.org/svn/zypp/trunk/zypper/src/zypper-media-callbacks.h If there are more questions, just ask! :-) Thanks for such cool stuff Duncan -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
One question guys, is it possible to get the stack running on 10.3? If you have the package in the build service, you could link the dbus factory package to your home project too and build it for 10.3, but I am not sure if the dbus upgrade breaks other stuff? Duncan -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
On Nov 22, 2007 8:18 AM, Duncan Mac-Vicar Prett
One question guys,
is it possible to get the stack running on 10.3?
If you have the package in the build service, you could link the dbus factory package to your home project too and build it for 10.3, but I am not sure if the dbus upgrade breaks other stuff?
I'm not sure if that's possible. You'd have to replace dbus, get policy kit all working, etc. Perhaps JP has more understanding about the surrounding issues? Timo Hoenig may as well. Boyd -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
participants (3)
-
Boyd Timothy
-
Duncan Mac-Vicar Prett
-
Federico Lucifredi