From: Michael Schroeder Date: Thu, 2 Jul 2009 13:09:42 +0000 (+0200) Subject: - initialize flags, change stripkind code X-Git-Tag: BASE-SuSE-Code-12_1-Branch~189 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a0842d2da68fe64f0a55babab033f3c9d65d619d;p=thirdparty%2Flibsolv.git - initialize flags, change stripkind code --- diff --git a/src/repodata.c b/src/repodata.c index 8672bbaa..89cd1c21 100644 --- a/src/repodata.c +++ b/src/repodata.c @@ -636,8 +636,10 @@ repodata_stringify(Pool *pool, Repodata *data, Repokey *key, KeyValue *kv, int f kv->str = id2str(pool, kv->id); if ((flags & SEARCH_SKIP_KIND) != 0 && key->storage == KEY_STORAGE_SOLVABLE) { - const char *s = strchr(kv->str, ':'); - if (s) + const char *s; + for (s = kv->str; *s >= 'a' && *s <= 'z'; s++) + ; + if (*s == ':' && s > kv->str) kv->str = s + 1; } return 1; @@ -968,6 +970,7 @@ dataiterator_init(Dataiterator *di, Pool *pool, Repo *repo, Id p, Id keyname, co { memset(di, 0, sizeof(*di)); di->pool = pool; + di->flags = flags & ~SEARCH_THISSOLVID; if (!pool || (repo && repo->pool != pool)) { di->state = di_bye;