[zypp-devel] Adding of Repositories using libzypp
Hi, I am trying to add a repository using libzypp. I tried using zypp::RepoInfo, and calling addBaseUrl. I have used repoinfo.addBaseUrl(zypp::Url(repo->url().toStdString())); (repo is an object of a class that i have created, and stores QStrings for Repository Name and other details. url() returns the url in QString, which I converted to std::string) On executing, I get the following error terminate called after throwing an instance of 'zypp::url::UrlBadComponentException' what(): Url scheme is a required component Aborted What am I doing wrong here? Regards,. Saurabh -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org To contact the owner, e-mail: zypp-devel+owner@opensuse.org
On Monday 30 April 2012 23:24:30 Saurabh Sood wrote:
terminate called after throwing an instance of 'zypp::url::UrlBadComponentException' what(): Url scheme is a required component Aborted
What am I doing wrong here?
[zypp/Url.h] * The generic URI syntax consists of a hierarchical sequence of * components referred to as the scheme, authority, path, query, * and fragment. * * \code * URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ] * * hier-part = "//" authority path-abempty * / path-absolute * / path-rootless * / path-empty * \endcode The string you pass to the Url class is not valid the scheme (eg. http:, nfs:, cd:, dir:..) seems to be missing. -- 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