- fix anchoring of filelist data
authorMichael Schroeder <mls@suse.de>
Fri, 25 Apr 2008 12:42:04 +0000 (12:42 +0000)
committerMichael Schroeder <mls@suse.de>
Fri, 25 Apr 2008 12:42:04 +0000 (12:42 +0000)
- susetags move files added to provides back into filelist
- ignore packages.FL for now

tools/repo_rpmdb.c
tools/repo_rpmmd.c
tools/repo_susetags.c
tools/susetags2solv.c

index e65ba6e..fa9dad8 100644 (file)
@@ -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]);
        }
     }
index 419a6f9..3a843a2 100644 (file)
@@ -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
index 58f203c..42f59aa 100644 (file)
@@ -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;
            }
index a9a8901..3932e44 100644 (file)
@@ -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))
            {