From: Michael Matz Date: Mon, 10 Mar 2008 15:01:05 +0000 (+0000) Subject: Store the susetags datadir as an attribute to the product solvable X-Git-Tag: BASE-SuSE-Code-12_1-Branch~827 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bc245f3d6ef1df256a701422acf33be7ea5b7acf;p=platform%2Fupstream%2Flibsolv.git Store the susetags datadir as an attribute to the product solvable (key "susetags:datadir"). --- diff --git a/tools/repo_content.c b/tools/repo_content.c index 7706750..3a47e20 100644 --- a/tools/repo_content.c +++ b/tools/repo_content.c @@ -249,6 +249,8 @@ repo_add_content(Repo *repo, FILE *fp) s->supplements = adddep(pool, &pd, s->supplements, value, 0); else if (istag ("ENHANCES")) s->enhances = adddep(pool, &pd, s->enhances, value, 0); + else if (istag ("DATADIR")) + repo_set_str(repo, s - pool->solvables, str2id(pool, "susetags:datadir", 1), value); /* FRESHENS doesn't seem to exist. */ /* XXX do something about LINGUAS and ARCH? */ #undef istag diff --git a/tools/repo_susetags.c b/tools/repo_susetags.c index 2c7468c..0f785c4 100644 --- a/tools/repo_susetags.c +++ b/tools/repo_susetags.c @@ -432,12 +432,11 @@ repo_add_susetags(Repo *repo, FILE *fp, Id vendor, const char *language, int fla Repodata *data = 0; if ((flags & SUSETAGS_EXTEND) && repo->nrepodata) - { - /* use last repodata */ - data = repo->repodata + repo->nrepodata - 1; - indesc = 1; - } - if (!data) + indesc = 1; + if (repo->nrepodata) + /* use last repodata */ + data = repo->repodata + repo->nrepodata - 1; + else data = repo_add_repodata(repo, 0); memset(&pd, 0, sizeof(pd));