[zypp-devel] Repository Metadata
Hi, I created a RepoInfo object, and set its baseUrl, and alias. When I tried refreshing the metadata of the repository, I keep on getting 'Valid metadata not found at the specified URL'. The same URL is opening in a web browser. I have used this code zypp::RepoManager repos; zypp::RepoInfo repo; zypp::KeyRingCallbacks callb; repo.addBaseUrl( zypp::Url( "http://download.opensuse.org/distribution/12.1/repo/oss/") ); repo.setGpgCheck( true ); repo.setAlias( "openSUSE 12.1" ); repo.setEnabled( true ); repo.setAutorefresh( true ); repos.refreshMetadata( repo ); Is there something wrong in the code? Regards,. Saurabh -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org To contact the owner, e-mail: zypp-devel+owner@opensuse.org
On Tuesday 17 July 2012 14:19:25 Saurabh Sood wrote:
Hi, I created a RepoInfo object, and set its baseUrl, and alias. When I tried refreshing the metadata of the repository, I keep on getting 'Valid metadata not found at the specified URL'. The same URL is opening in a web browser. I have used this code
zypp::RepoManager repos; zypp::RepoInfo repo; zypp::KeyRingCallbacks callb; repo.addBaseUrl( zypp::Url( "http://download.opensuse.org/distribution/12.1/repo/oss/") ); repo.setGpgCheck( true );
The URL seems to be ok. Try with setGpgCheck( false ). If this works, your KeyRingCallbacks are not set up correctly. Most probably zypp is asking whether to accept the key, and the callback says 'no'. Check the logs for details. See also class KeyRing; you can use setDefaultAccept to setup the default callback answers, if you do not need to be interactive: (using zypp::KeyRing;) KeyRing::setDefaultAccept( KeyRing::TRUST_KEY_TEMPORARILY ); -- 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
participants (2)
-
Michael Andres
-
Saurabh Sood