summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorMichael Schroeder <mls@suse.de>2007-11-13 15:59:35 +0000
committerMichael Schroeder <mls@suse.de>2007-11-13 15:59:35 +0000
commitee1687061c9236f3ce992b677862f548469b93d8 (patch)
treea8b4c6ca03a766751a8623272d3d24e8f77902d3 /examples
parentc127faf40ed6e3c1081cdd969ff57290f9db9288 (diff)
downloadlibsolv-ee1687061c9236f3ce992b677862f548469b93d8.tar.gz
libsolv-ee1687061c9236f3ce992b677862f548469b93d8.tar.bz2
libsolv-ee1687061c9236f3ce992b677862f548469b93d8.zip
- cleanup repo handlin API
Diffstat (limited to 'examples')
-rw-r--r--examples/ruby/basic.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/examples/ruby/basic.rb b/examples/ruby/basic.rb
index c72558c..49b08cc 100644
--- a/examples/ruby/basic.rb
+++ b/examples/ruby/basic.rb
@@ -8,10 +8,12 @@ pool = Pool.new
#s = pool.add_empty_repo
f = File.open('../../testsuite/data.libzypp/basic-exercises/exercise-20-packages.solv', 'r')
-s = pool.add_repo_solv(f, 'foo')
+s = pool.create_repo('foo');
+s.add_solv(f);
f = File.open('../../testsuite/data.libzypp/basic-exercises/exercise-20-system.solv', 'r')
-installed = pool.add_repo_solv(f, 'system')
+installed = pool.create_repo('system');
+installed.add_solv(f);
pool.each_repo do |repo|
puts repo.name
@@ -54,4 +56,4 @@ end
solv.each_to_remove do |i|
puts "to remove #{i}"
-end \ No newline at end of file
+end