]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
- repo_content.c: fix broken dependency parsing.
authorMichael Andres <ma@suse.de>
Tue, 30 Sep 2008 11:05:26 +0000 (11:05 +0000)
committerMichael Andres <ma@suse.de>
Tue, 30 Sep 2008 11:05:26 +0000 (11:05 +0000)
package/libsatsolver.changes
tools/repo_content.c

index 4ba3b5b065f5ac67be3a4d09f9f85f74934a6e7a..41147ce5531edac9e40a5474835489ad58174cbe 100644 (file)
@@ -1,3 +1,9 @@
+-------------------------------------------------------------------
+Tue Sep 30 13:03:10 CEST 2008 - ma@suse.de
+
+- repo_content.c: fix broken dependency parsing.
+- revision 11214
+
 -------------------------------------------------------------------
 Mon Sep 29 14:53:09 CEST 2008 - ma@suse.de
 
index ae71b9ad08d8135229a06578a47e6b1fdf4a89df..1921d52c39bb7ee7f02196f7ed7d98f9808c7cea 100644 (file)
@@ -118,6 +118,7 @@ join(struct parsedata *pd, const char *s1, const char *s2, const char *s3)
 
 /*
  * add dependency to pool
+ * OBSOLETES product:SUSE_LINUX product:openSUSE < 11.0 package:openSUSE < 11.0
  */
 
 static unsigned int
@@ -125,7 +126,7 @@ adddep(Pool *pool, struct parsedata *pd, unsigned int olddeps, char *line, Id ma
 {
   char *name;
   Id id;
-  
+
   while ((name = splitword(&line)) != 0)
     {
       /* Hack, as the content file adds 'package:' for package
@@ -133,7 +134,7 @@ adddep(Pool *pool, struct parsedata *pd, unsigned int olddeps, char *line, Id ma
       if (!strncmp (name, "package:", 8))
         name += 8;
       id = str2id(pool, name, 1);
-      if (strpbrk(line, "<>="))
+      if (strpbrk(line, "<>=") == line) /* next(!) word is rel */
        {
          char *rel = splitword(&line);
           char *evr = splitword(&line);
@@ -214,11 +215,11 @@ repo_add_content(Repo *repo, FILE *fp)
      we use the first architecture in BASEARCHS or noarch
      for the product. At the end we create (clone) the product
      for each one of the remaining architectures
-     we allow max 4 archs 
+     we allow max 4 archs
   */
   unsigned int numotherarchs = 0;
   Id *otherarchs = 0;
-  
+
   memset(&pd, 0, sizeof(pd));
   line = sat_malloc(1024);
   aline = 1024;
@@ -256,7 +257,7 @@ repo_add_content(Repo *repo, FILE *fp)
       /* expect "key value" lines */
       value = line;
       key = splitword(&value);
-      
+
       if (key)
         {
 #if 0
@@ -419,7 +420,7 @@ repo_add_content(Repo *repo, FILE *fp)
       if (code10)
        s->supplements = repo_fix_supplements(repo, s->provides, s->supplements, 0);
     }
-  
+
   /* now for every other arch, clone the product except the architecture */
   for (i = 0; i < numotherarchs; ++i)
     {
@@ -438,7 +439,7 @@ repo_add_content(Repo *repo, FILE *fp)
       /* now merge the attributes */
       repodata_merge_attrs(data, p - pool->solvables - repo->start, s - pool->solvables- repo->start);
     }
-  
+
   if (data)
     repodata_internalize(data);