[zypp-devel] zypp_ptr
Hi, I am trying to use libzypp to install packages for my 1-Click install project. I have managed to add a repository, but am facing problems in installation of packages. On using zypp_ptr(), I get an error saying that 'zypp_ptr() was not declared in the scope'. Where might I have gone wrong here? Regards,. Saurabh -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org To contact the owner, e-mail: zypp-devel+owner@opensuse.org
Dne 29.5.2012 09:35, Saurabh Sood napsal(a):
Hi, I am trying to use libzypp to install packages for my 1-Click install project. I have managed to add a repository, but am facing problems in installation of packages. On using zypp_ptr(), I get an error saying that 'zypp_ptr() was not declared in the scope'. Where might I have gone wrong here?
Ooop, this is probably related to my previous mail where I posted:
Then you can actually start the installation by
result = zypp_ptr()->commit(zypp::ZYppCommitPolicy policy);
zypp_ptr() is actually a wrapper around zypp::getZYpp() in pkg-bindings to handle libzypp lock - it retries 5 times (with 3 seconds timeout) then gives up. Sorry, I overlooked this. See https://github.com/yast/yast-pkg-bindings/blob/master/src/PkgFunctions.cc#L8... for more details. If you do not need such lock handling you can simply use zypp::getZYpp() directly, but this allows adding some initialization code at one place (pkg-bindings initialize some solver flags there) so you are sure that it's not missing somewhere. -- Ladislav Slezák Appliance department / YaST Developer Lihovarská 1060/12 190 00 Prague 9 / Czech Republic tel: +420 284 028 960 lslezak@suse.com SUSE -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org To contact the owner, e-mail: zypp-devel+owner@opensuse.org
participants (2)
-
Ladislav Slezak
-
Saurabh Sood