summaryrefslogtreecommitdiff
path: root/examples/p5solv
diff options
context:
space:
mode:
authorMichael Schroeder <mls@suse.de>2012-01-18 14:08:19 +0100
committerMichael Schroeder <mls@suse.de>2012-01-18 14:08:19 +0100
commitd528e9d1f4b1dae5a7924c9400e9126a36a34b7f (patch)
treeeb3f1dbcb3e597c8974427b4a2cc287ef36dea5a /examples/p5solv
parent5b0d7883a182851bee1f5d67164d747ba00e4d6d (diff)
downloadlibsolv-d528e9d1f4b1dae5a7924c9400e9126a36a34b7f.tar.gz
libsolv-d528e9d1f4b1dae5a7924c9400e9126a36a34b7f.tar.bz2
libsolv-d528e9d1f4b1dae5a7924c9400e9126a36a34b7f.zip
- add Datapos lookup functions, add lookup_idarray/deparray for XSolvables
Diffstat (limited to 'examples/p5solv')
-rwxr-xr-xexamples/p5solv10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/p5solv b/examples/p5solv
index 7a57f1c..fd9915a 100755
--- a/examples/p5solv
+++ b/examples/p5solv
@@ -201,10 +201,10 @@ sub find {
my $di = $self->{'handle'}->Dataiterator($solv::SOLVID_META, $solv::REPOSITORY_REPOMD_TYPE, $what, $solv::Dataiterator::SEARCH_STRING);
$di->prepend_keyname($solv::REPOSITORY_REPOMD);
for my $d (@$di) {
- $d->setpos_parent();
- my $filename = $d->{'pool'}->lookup_str($solv::SOLVID_POS, $solv::REPOSITORY_REPOMD_LOCATION);
+ my $dp = $d->parentpos();
+ my $filename = $dp->lookup_str($solv::REPOSITORY_REPOMD_LOCATION);
next unless $filename;
- my $chksum = $d->{'pool'}->lookup_checksum($solv::SOLVID_POS, $solv::REPOSITORY_REPOMD_CHECKSUM);
+ my $chksum = $dp->lookup_checksum($solv::REPOSITORY_REPOMD_CHECKSUM);
if (!$chksum) {
print "no $filename file checksum!\n";
return (undef, undef);
@@ -326,8 +326,8 @@ sub find {
my $di = $self->{'handle'}->Dataiterator($solv::SOLVID_META, $solv::SUSETAGS_FILE_NAME, $what, $solv::Dataiterator::SEARCH_STRING);
$di->prepend_keyname($solv::SUSETAGS_FILE);
for my $d (@$di) {
- $d->setpos_parent();
- my $chksum = $d->{'pool'}->lookup_checksum($solv::SOLVID_POS, $solv::SUSETAGS_FILE_CHECKSUM);
+ my $dp = $d->parentpos();
+ my $chksum = $dp->lookup_checksum($solv::SUSETAGS_FILE_CHECKSUM);
return ($what, $chksum);
}
return (undef, undef);