diff options
author | Michael Schroeder <mls@suse.de> | 2013-04-24 12:20:50 +0200 |
---|---|---|
committer | Michael Schroeder <mls@suse.de> | 2013-04-24 12:20:50 +0200 |
commit | ceef7a0a62b5efd3fcf0c6e8e07a1d048bc03139 (patch) | |
tree | 566d6dd07893adb83c623687c47b43b310ebdcbc /examples | |
parent | fd680e014c9ec7617378d5dce6cd96ae8833a96c (diff) | |
download | libsolv-ceef7a0a62b5efd3fcf0c6e8e07a1d048bc03139.tar.gz libsolv-ceef7a0a62b5efd3fcf0c6e8e07a1d048bc03139.tar.bz2 libsolv-ceef7a0a62b5efd3fcf0c6e8e07a1d048bc03139.zip |
use add_rpmdb_reffp in examples
Diffstat (limited to 'examples')
-rwxr-xr-x | examples/p5solv | 3 | ||||
-rwxr-xr-x | examples/pysolv | 3 | ||||
-rwxr-xr-x | examples/rbsolv | 4 |
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 |