On Sunday 01 April 2012 17:47:23 Saurabh Sood wrote:
Hi, I am trying to implement an application in C++ to add a repository (as part of GSoC for Beautiful 1 Click install). I wanted to know which all classes I should look at in the documentation. I was initially trying to implement the same using PackageKit, but it doesnt support adding repositories.
Checkout the libzypp sorces. Look at tools/ToolScanRepos.cc and tests/lib/TestSetup.h. Follow ToolScanRepos.cc calling test.loadRepo(..) in TestSetup.h. This will show you the basic way of taking a URL or path to a local directory with .rpms, creating a zypp::RepoInfo from it and finally passing this to the zypp::RepoManager in order to add the repo, download the matadata, build the local cache and finally loading the data into then zypp::ResPool , so you can query or or install the packages provided by your repo. -- cu, Michael Andres +------------------------------------------------------------------+ Key fingerprint = 2DFA 5D73 18B1 E7EF A862 27AC 3FB8 9E3A 27C6 B0E4 +------------------------------------------------------------------+ Michael Andres SUSE LINUX Products GmbH, Development, ma@suse.de GF:Jeff Hawn,Jennifer Guild,Felix Imendörffer, HRB16746(AG Nürnberg) Maxfeldstrasse 5, D-90409 Nuernberg, Germany, ++49 (0)911 - 740 53-0 +------------------------------------------------------------------+ -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org To contact the owner, e-mail: zypp-devel+owner@opensuse.org