From: Michael Schroeder Date: Fri, 25 Apr 2008 12:42:04 +0000 (+0000) Subject: - fix anchoring of filelist data X-Git-Tag: BASE-SuSE-Code-12_1-Branch~694 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bc883c58dd10868cdb4aa64dd269c74ae11b8cb6;p=platform%2Fupstream%2Flibsolv.git - fix anchoring of filelist data - susetags move files added to provides back into filelist - ignore packages.FL for now --- diff --git a/tools/repo_rpmdb.c b/tools/repo_rpmdb.c index e65ba6e..fa9dad8 100644 --- a/tools/repo_rpmdb.c +++ b/tools/repo_rpmdb.c @@ -646,6 +646,8 @@ addfileprovides(Pool *pool, Repo *repo, Repodata *repodata, Solvable *s, RpmHead handle = (s - pool->solvables) - repodata->start; handle = repodata_get_handle(repodata, handle); did = repodata_str2dir(repodata, dn[di[i]], 1); + if (!did) + did = repodata_str2dir(repodata, "/", 1); repodata_add_dirstr(repodata, handle, SOLVABLE_FILELIST, did, bn[i]); } } diff --git a/tools/repo_rpmmd.c b/tools/repo_rpmmd.c index 419a6f9..3a843a2 100644 --- a/tools/repo_rpmmd.c +++ b/tools/repo_rpmmd.c @@ -791,8 +791,10 @@ endElement(void *userData, const char *name) else { p = pd->content; - id = repodata_str2dir(pd->data, "/", 1); + id = 0; } + if (!id) + id = repodata_str2dir(pd->data, "/", 1); repodata_add_dirstr(pd->data, handle, SOLVABLE_FILELIST, id, p); break; // xml store capabilities diff --git a/tools/repo_susetags.c b/tools/repo_susetags.c index 58f203c..42f59aa 100644 --- a/tools/repo_susetags.c +++ b/tools/repo_susetags.c @@ -388,7 +388,7 @@ finish_solvable(struct parsedata *pd, Solvable *s, int handle) { Pool *pool = pd->repo->pool; -#if 0 +#if 1 /* move file provides to filelist */ /* relies on the fact that rpm inserts self-provides at the end */ if (s->provides) @@ -425,6 +425,8 @@ finish_solvable(struct parsedata *pd, Solvable *s, int handle) sdup[sp - str] = 0; did = repodata_str2dir(pd->data, sdup, 1); } + if (!did) + did = repodata_str2dir(pd->data, "/", 1); repodata_add_dirstr(pd->data, handle, SOLVABLE_FILELIST, did, sp + 1); *p = 0; } @@ -877,8 +879,6 @@ repo_add_susetags(Repo *repo, FILE *fp, Id vendor, const char *language, int fla case CTAG('=', 'F', 'l', 's'): { - if (line[6] != '/') - continue; /* no relative files, please */ char *p = strrchr(line + 6, '/'); Id did; if (p && p != line + 6 && !p[1]) @@ -894,8 +894,10 @@ repo_add_susetags(Repo *repo, FILE *fp, Id vendor, const char *language, int fla else { p = line + 6; - did = repodata_str2dir(data, "/", 1); + did = 0; } + if (!did) + did = repodata_str2dir(data, "/", 1); repodata_add_dirstr(data, handle, SOLVABLE_FILELIST, did, p); continue; } diff --git a/tools/susetags2solv.c b/tools/susetags2solv.c index a9a8901..3932e44 100644 --- a/tools/susetags2solv.c +++ b/tools/susetags2solv.c @@ -202,6 +202,7 @@ main(int argc, char **argv) } else if (!strcmp(fn, "packages.FL") || !strcmp(fn, "packages.FL.gz")) { +#if 0 sprintf(fnp, "%s/%s", descrdir, fn); FILE *fp = myfopen(fnp); if (!fp) @@ -211,6 +212,10 @@ main(int argc, char **argv) } repo_add_susetags(repo, fp, vendor, 0, flags | SUSETAGS_EXTEND); fclose(fp); +#else + /* ignore for now. reactivate when filters work */ + continue; +#endif } else if (!strncmp(fn, "packages.", 9)) {