Mailinglist Archive: zypp-devel (102 mails)
| < Previous | Next > |
Re: [zypp-devel] Python Bindings and RepoInfo.baseUrls()
- From: Jan Blunck <jblunck@xxxxxxx>
- Date: Wed, 11 Mar 2009 15:55:53 +0100
- Message-id: <20090311145553.GQ23737@xxxxxxxxxxxxxxx>
On Tue, Mar 10, Jan Blunck wrote:
This is not related to the python part of the bindings. The same example in
ruby is also broken. Basically the std::set stuff for the Url class seems to
be odd. I'm neither able to append nor to insert new Url objects.
Thankful for any hint,
Jan
import zypp
def main():
urls = zypp.UrlSet()
url =
zypp.Url("file:///mounts/mirror/SuSE/ftp.opensuse.org/srv/ftp/pub/opensuse/debug/update/11.1/")
print url.__class__.__name__
urls.append(zypp.Url("http://download.opensuse.org/debug/update/11.1/"))
for url in urls:
print url
if __name__ == "__main__":
main()
#!/usr/bin/ruby
require 'zypp'
include Zypp
repo_info = RepoInfo.new()
repo_info.set_alias("factorytest")
repo_info.set_name("Test Repo for Factory.")
repo_info.set_enabled(true)
repo_info.set_autorefresh(false)
repo_info.add_base_url(Url.new("ftp://dist.suse.de/install/stable-x86/"))
repo_info.add_base_url(Url.new("http://software.opensuse.org/download/home:/Arvin42/openSUSE_Factory/"))
repo_info.add_base_url(Url.new("file:///suse/aschnell/tmp"))
urls = repo_info.base_urls()
urls.each do | url |
puts url
end
I have the following example:
This is not related to the python part of the bindings. The same example in
ruby is also broken. Basically the std::set stuff for the Url class seems to
be odd. I'm neither able to append nor to insert new Url objects.
Thankful for any hint,
Jan
import zypp
def main():
urls = zypp.UrlSet()
url =
zypp.Url("file:///mounts/mirror/SuSE/ftp.opensuse.org/srv/ftp/pub/opensuse/debug/update/11.1/")
print url.__class__.__name__
urls.append(zypp.Url("http://download.opensuse.org/debug/update/11.1/"))
for url in urls:
print url
if __name__ == "__main__":
main()
#!/usr/bin/ruby
require 'zypp'
include Zypp
repo_info = RepoInfo.new()
repo_info.set_alias("factorytest")
repo_info.set_name("Test Repo for Factory.")
repo_info.set_enabled(true)
repo_info.set_autorefresh(false)
repo_info.add_base_url(Url.new("ftp://dist.suse.de/install/stable-x86/"))
repo_info.add_base_url(Url.new("http://software.opensuse.org/download/home:/Arvin42/openSUSE_Factory/"))
repo_info.add_base_url(Url.new("file:///suse/aschnell/tmp"))
urls = repo_info.base_urls()
urls.each do | url |
puts url
end
| < Previous | Next > |