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