summaryrefslogtreecommitdiff
path: root/bindings/solv.i
diff options
context:
space:
mode:
authorMichael Schroeder <mls@suse.de>2014-03-03 15:01:48 +0100
committerMichael Schroeder <mls@suse.de>2014-03-03 15:01:48 +0100
commit88e1e4c8778561a0d2d9d75cb2b65191023298b3 (patch)
tree3503c6873fda8b699d08d6daf2a26bd0204a0816 /bindings/solv.i
parentab8b3ded9b6c910955a6d0e890714e2fbaec933d (diff)
downloadlibsolv-88e1e4c8778561a0d2d9d75cb2b65191023298b3.tar.gz
libsolv-88e1e4c8778561a0d2d9d75cb2b65191023298b3.tar.bz2
libsolv-88e1e4c8778561a0d2d9d75cb2b65191023298b3.zip
fix Datamatcher's idstr() method when calld for dirs
Diffstat (limited to 'bindings/solv.i')
-rw-r--r--bindings/solv.i6
1 files changed, 5 insertions, 1 deletions
diff --git a/bindings/solv.i b/bindings/solv.i
index 5c0cfb8..6bc34b1 100644
--- a/bindings/solv.i
+++ b/bindings/solv.i
@@ -1902,7 +1902,11 @@ rb_eval_string(
return $self->kv.id;
}
const char *idstr() {
- return pool_id2str($self->pool, $self->kv.id);
+ if ($self->data && ($self->key->type == REPOKEY_TYPE_DIR || $self->key->type == REPOKEY_TYPE_DIRSTRARRAY || $self->key->type == REPOKEY_TYPE_DIRNUMNUMARRAY))
+ return repodata_dir2str($self->data, $self->kv.id, 0);
+ if ($self->data && $self->data->localpool)
+ return stringpool_id2str(&self->data->spool, $self->kv.id);
+ return pool_id2str($self->pool, $self->kv.id);
}
const char *str() {
return $self->kv.str;