summaryrefslogtreecommitdiff
path: root/examples/p5solv
diff options
context:
space:
mode:
authorMichael Schroeder <mls@suse.de>2012-10-08 16:35:13 +0200
committerMichael Schroeder <mls@suse.de>2012-10-08 16:35:13 +0200
commita9bc7b08e9fb6dd1dd18d922d90fb773ca6ecdf8 (patch)
treed91e6e906c3927e479ac19fbed8f4c5e1ad41b5d /examples/p5solv
parentee4fa1bef4127b860cf1c8d142da7e70e08f2a1f (diff)
downloadlibsolv-a9bc7b08e9fb6dd1dd18d922d90fb773ca6ecdf8.tar.gz
libsolv-a9bc7b08e9fb6dd1dd18d922d90fb773ca6ecdf8.tar.bz2
libsolv-a9bc7b08e9fb6dd1dd18d922d90fb773ca6ecdf8.zip
only call add_products if the method exists
Diffstat (limited to 'examples/p5solv')
-rwxr-xr-xexamples/p5solv4
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/p5solv b/examples/p5solv
index 015002e..58cdc9a 100755
--- a/examples/p5solv
+++ b/examples/p5solv
@@ -476,7 +476,9 @@ sub load {
return 1;
}
print "reading\n";
- $self->{'handle'}->add_products("/etc/products.d", $solv::Repo::REPO_NO_INTERNALIZE);
+ if (defined(&solv::Repo::add_products)) {
+ $self->{'handle'}->add_products("/etc/products.d", $solv::Repo::REPO_NO_INTERNALIZE);
+ }
$self->{'handle'}->add_rpmdb(undef, $solv::Repo::REPO_REUSE_REPODATA);
$self->writecachedrepo();
return 1;