fix installation of header files
[platform/upstream/libsolv.git] / ext / repo_mdk.c
index 7fa0abd..bdd7f40 100644 (file)
@@ -287,7 +287,7 @@ struct parsedata {
   enum state sbtab[NUMSTATES];
   Solvable *solvable;
   Hashtable joinhash;
-  Hashmask joinhashmask;
+  Hashval joinhashmask;
 };
 
 static inline const char *
@@ -302,9 +302,9 @@ find_attr(const char *txt, const char **atts)
 }
 
 static Hashtable
-joinhash_init(Repo *repo, Hashmask *hmp)
+joinhash_init(Repo *repo, Hashval *hmp)
 {
-  Hashmask hm = mkmask(repo->nsolvables);
+  Hashval hm = mkmask(repo->nsolvables);
   Hashtable ht = solv_calloc(hm + 1, sizeof(*ht));
   Hashval h, hh;
   Solvable *s;
@@ -323,7 +323,7 @@ joinhash_init(Repo *repo, Hashmask *hmp)
 }
 
 static Solvable *
-joinhash_lookup(Repo *repo, Hashtable ht, Hashmask hm, const char *fn, const char *distepoch)
+joinhash_lookup(Repo *repo, Hashtable ht, Hashval hm, const char *fn, const char *distepoch)
 {
   Hashval h, hh;
   const char *p, *vrstart, *vrend;
@@ -391,51 +391,6 @@ joinhash_lookup(Repo *repo, Hashtable ht, Hashmask hm, const char *fn, const cha
   return 0;
 }
 
-static void
-set_sourcerpm(Repodata *data, Solvable *s, Id handle, const char *sourcerpm)
-{
-  const char *p, *sevr, *sarch, *name, *evr;
-  Pool *pool;
-
-  p = strrchr(sourcerpm, '.');
-  if (!p || strcmp(p, ".rpm") != 0)
-    return;
-  p--;
-  while (p > sourcerpm && *p != '.')
-    p--;
-  if (*p != '.' || p == sourcerpm)
-    return;
-  sarch = p-- + 1;
-  while (p > sourcerpm && *p != '-')
-    p--;
-  if (*p != '-' || p == sourcerpm)
-    return;
-  p--;
-  while (p > sourcerpm && *p != '-')
-    p--;
-  if (*p != '-' || p == sourcerpm)
-    return;
-  sevr = p + 1;
-  pool = s->repo->pool;
-  if (!strcmp(sarch, "src.rpm"))
-    repodata_set_constantid(data, handle, SOLVABLE_SOURCEARCH, ARCH_SRC);
-  else if (!strcmp(sarch, "nosrc.rpm"))
-    repodata_set_constantid(data, handle, SOLVABLE_SOURCEARCH, ARCH_NOSRC);
-  else
-    repodata_set_constantid(data, handle, SOLVABLE_SOURCEARCH, pool_strn2id(pool, sarch, strlen(sarch) - 4, 1));
-  evr = pool_id2str(pool, s->evr);
-  if (evr && !strncmp(sevr, evr, sarch - sevr - 1) && evr[sarch - sevr - 1] == 0)
-    repodata_set_void(data, handle, SOLVABLE_SOURCEEVR);
-  else
-    repodata_set_id(data, handle, SOLVABLE_SOURCEEVR, pool_strn2id(pool, sevr, sarch - sevr - 1, 1));
-  name = pool_id2str(pool, s->name);
-  if (name && !strncmp(sourcerpm, name, sevr - sourcerpm - 1) && name[sevr - sourcerpm - 1] == 0)
-    repodata_set_void(data, handle, SOLVABLE_SOURCENAME);
-  else
-    repodata_set_id(data, handle, SOLVABLE_SOURCENAME, pool_strn2id(pool, sourcerpm, sevr - sourcerpm - 1, 1));
-}
-
-
 static void XMLCALL
 startElement(void *userData, const char *name, const char **atts)
 {
@@ -479,7 +434,7 @@ startElement(void *userData, const char *name, const char **atts)
          repodata_set_poolstr(pd->data, pd->solvable - pool->solvables, SOLVABLE_LICENSE, str);
        str = find_attr("sourcerpm", atts);
        if (str && *str)
-         set_sourcerpm(pd->data, pd->solvable, pd->solvable - pool->solvables, str);
+         repodata_set_sourcepkg(pd->data, pd->solvable - pool->solvables, str);
         break;
       }
     case STATE_FILES: