X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=ext%2Frepo_appdata.c;h=2b9844eb980d5c36f2ed66858520fab9d1d645de;hb=f458102388250c8a1cbbfa8f18d27baa204c696c;hp=cbc42e42a612d447f87e4c9b42849542b2efac83;hpb=8fcc0d8e03716077d1f2c2ca79fc622880a32196;p=platform%2Fupstream%2Flibsolv.git diff --git a/ext/repo_appdata.c b/ext/repo_appdata.c index cbc42e4..2b9844e 100644 --- a/ext/repo_appdata.c +++ b/ext/repo_appdata.c @@ -178,12 +178,18 @@ startElement(void *userData, const char *name, const char **atts) switch(pd->state) { case STATE_APPLICATION: - s = pd->solvable = pool_id2solvable(pool, repo_add_solvable(pd->repo)); - pd->handle = s - pool->solvables; - pd->havesummary = 0; type = find_attr("type", atts); if (!type || !*type) type = "desktop"; + if (strcmp(type, "desktop") != 0) + { + /* ignore for now */ + pd->solvable = 0; + break; + } + s = pd->solvable = pool_id2solvable(pool, repo_add_solvable(pd->repo)); + pd->handle = s - pool->solvables; + pd->havesummary = 0; repodata_set_poolstr(pd->data, pd->handle, SOLVABLE_CATEGORY, type); break; case STATE_DESCRIPTION: @@ -373,6 +379,13 @@ endElement(void *userData, const char *name) } pd->skip_depth = 0; + if (!s) + { + pd->state = pd->sbtab[pd->state]; + pd->docontent = 0; + return; + } + switch (pd->state) { case STATE_APPLICATION: