Imported Upstream version 0.7.2
[platform/upstream/libsolv.git] / ext / repo_content.c
index e94ca9e..f361900 100644 (file)
@@ -15,8 +15,6 @@
  */
 
 #include <sys/types.h>
-#include <limits.h>
-#include <fcntl.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -142,7 +140,7 @@ adddep(Pool *pool, struct parsedata *pd, unsigned int olddeps, char *line, Id ma
 
          if (!rel || !evr)
            {
-             pool_debug(pool, SOLV_FATAL, "repo_content: bad relation '%s %s'\n", name, rel);
+             pool_debug(pool, SOLV_ERROR, "repo_content: bad relation '%s %s'\n", name, rel);
              continue;
            }
          for (flags = 0; flags < 6; flags++)
@@ -150,7 +148,7 @@ adddep(Pool *pool, struct parsedata *pd, unsigned int olddeps, char *line, Id ma
              break;
          if (flags == 6)
            {
-             pool_debug(pool, SOLV_FATAL, "repo_content: unknown relation '%s'\n", rel);
+             pool_debug(pool, SOLV_ERROR, "repo_content: unknown relation '%s'\n", rel);
              continue;
            }
          id = pool_rel2id(pool, id, pool_str2id(pool, evr, 1), flags + 1, 1);
@@ -404,7 +402,7 @@ repo_add_content(Repo *repo, FILE *fp, int flags)
                  if (s->name && s->arch != ARCH_SRC && s->arch != ARCH_NOSRC)
                    s->provides = repo_addid_dep(repo, s->provides, pool_rel2id(pool, s->name, s->evr, REL_EQ, 1), 0);
                  if (code10)
-                   s->supplements = repo_fix_supplements(repo, s->provides, s->supplements, 0);
+                   repo_rewrite_suse_deps(s, 0);
                }
              /* create new solvable */
              s = pool_id2solvable(pool, repo_add_solvable(repo));
@@ -518,9 +516,8 @@ repo_add_content(Repo *repo, FILE *fp, int flags)
 
   if (s && !s->name)
     {
-      pool_debug(pool, SOLV_FATAL, "repo_content: 'content' incomplete, no product solvable created!\n");
-      repo_free_solvable(repo, s - pool->solvables, 1);
-      s = 0;
+      pool_debug(pool, SOLV_ERROR, "repo_content: 'content' incomplete, no product solvable created!\n");
+      s = solvable_free(s, 1);
     }
   if (s)
     {
@@ -538,7 +535,7 @@ repo_add_content(Repo *repo, FILE *fp, int flags)
       if (s->name && s->arch != ARCH_SRC && s->arch != ARCH_NOSRC)
         s->provides = repo_addid_dep(repo, s->provides, pool_rel2id(pool, s->name, s->evr, REL_EQ, 1), 0);
       if (code10)
-       s->supplements = repo_fix_supplements(repo, s->provides, s->supplements, 0);
+       repo_rewrite_suse_deps(s, 0);
 
       /* now for every other arch, clone the product except the architecture */
       for (i = 0; i < numotherarchs; ++i)