]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
Store the susetags datadir as an attribute to the product solvable
authorMichael Matz <matz@suse.de>
Mon, 10 Mar 2008 15:01:05 +0000 (15:01 +0000)
committerMichael Matz <matz@suse.de>
Mon, 10 Mar 2008 15:01:05 +0000 (15:01 +0000)
(key "susetags:datadir").

tools/repo_content.c
tools/repo_susetags.c

index 7706750db0d2ef012f7338338ccbd61ef5997de1..3a47e207023e7900f17ef7a8bea2129956b19680 100644 (file)
@@ -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
index 2c7468cfc85e045f4207e7e6b5cd0a00f1cfe344..0f785c4554cf5cba3493263cb31d4409866932fc 100644 (file)
@@ -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));