summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorMichael Schroeder <mls@suse.de>2013-04-24 12:20:50 +0200
committerMichael Schroeder <mls@suse.de>2013-04-24 12:20:50 +0200
commitceef7a0a62b5efd3fcf0c6e8e07a1d048bc03139 (patch)
tree566d6dd07893adb83c623687c47b43b310ebdcbc /examples
parentfd680e014c9ec7617378d5dce6cd96ae8833a96c (diff)
downloadlibsolv-ceef7a0a62b5efd3fcf0c6e8e07a1d048bc03139.tar.gz
libsolv-ceef7a0a62b5efd3fcf0c6e8e07a1d048bc03139.tar.bz2
libsolv-ceef7a0a62b5efd3fcf0c6e8e07a1d048bc03139.zip
use add_rpmdb_reffp in examples
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/p5solv3
-rwxr-xr-xexamples/pysolv3
-rwxr-xr-xexamples/rbsolv4
3 files changed, 7 insertions, 3 deletions
diff --git a/examples/p5solv b/examples/p5solv
index 7d964ce..77b26c7 100755
--- a/examples/p5solv
+++ b/examples/p5solv
@@ -478,7 +478,8 @@ sub load {
if (defined(&solv::Repo::add_products)) {
$self->{'handle'}->add_products("/etc/products.d", $solv::Repo::REPO_NO_INTERNALIZE);
}
- $self->{'handle'}->add_rpmdb($solv::Repo::REPO_REUSE_REPODATA);
+ my $f = solv::xfopen($self->cachepath());
+ $self->{'handle'}->add_rpmdb_reffp($f, $solv::Repo::REPO_REUSE_REPODATA);
$self->writecachedrepo();
return 1;
}
diff --git a/examples/pysolv b/examples/pysolv
index b47b859..060e6d5 100755
--- a/examples/pysolv
+++ b/examples/pysolv
@@ -550,7 +550,8 @@ class repo_system(repo_generic):
print "reading"
if hasattr(self.handle.__class__, 'add_products'):
self.handle.add_products("/etc/products.d", Repo.REPO_NO_INTERNALIZE)
- self.handle.add_rpmdb(Repo.REPO_REUSE_REPODATA)
+ f = solv.xfopen(self.cachepath())
+ self.handle.add_rpmdb_reffp(f, Repo.REPO_REUSE_REPODATA)
self.writecachedrepo(None)
return True
diff --git a/examples/rbsolv b/examples/rbsolv
index e1ca45a..ad57e4d 100755
--- a/examples/rbsolv
+++ b/examples/rbsolv
@@ -492,7 +492,9 @@ class Repo_system < Repo_generic
if @handle.respond_to? :add_products
@handle.add_products("/etc/products.d", Solv::Repo::REPO_NO_INTERNALIZE)
end
- @handle.add_rpmdb(Solv::Repo::REPO_REUSE_REPODATA)
+ f = Solv::xfopen(cachepath())
+ @handle.add_rpmdb_reffp(f, Solv::Repo::REPO_REUSE_REPODATA)
+ f.close
writecachedrepo(nil)
return true
end