]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
- Parse RELEASE tag from contentfile (bnc #444978)
authorMichael Andres <ma@suse.de>
Mon, 17 Nov 2008 13:52:45 +0000 (13:52 +0000)
committerMichael Andres <ma@suse.de>
Mon, 17 Nov 2008 13:52:45 +0000 (13:52 +0000)
VERSION.cmake
package/libsatsolver.changes
tools/repo_content.c

index 23dee8ac0e73caab8d3769b2568602f4f674266e..39d1ae6323714c8c262d5a341bddf116c80593d8 100644 (file)
@@ -46,6 +46,6 @@
 
 SET(LIBSATSOLVER_MAJOR "0")
 SET(LIBSATSOLVER_MINOR "12")
-SET(LIBSATSOLVER_PATCH "2")
+SET(LIBSATSOLVER_PATCH "3")
 
 # last released 0.12.2
index 12d1848f95ead2e24d5eca30f5e92a8ca443ba9e..35698185fd10836da0f86a82ee7c045ad64b9cbb 100644 (file)
@@ -1,3 +1,9 @@
+-------------------------------------------------------------------
+Mon Nov 17 14:30:08 CET 2008 - ma@suse.de
+
+- Parse RELEASE tag from contentfile (bnc #444978)
+- 0.12.3
+
 -------------------------------------------------------------------
 Fri Nov 14 18:00:19 CET 2008 - mls@suse.de
 
index bc016e558d89945ba1d27ce4ea73f800507d1258..be0b5bbf1a34aa8444ace740dbea863aed9d2f38 100644 (file)
@@ -24,7 +24,8 @@
 #include "repo.h"
 #include "util.h"
 #include "repo_content.h"
-
+#define DISABLE_SPLIT
+#include "tools_util.h"
 
 /* split off a word, return null terminated pointer to it.
  * return NULL if there is no word left. */
@@ -50,16 +51,10 @@ struct parsedata {
   Repo *repo;
   char *tmp;
   int tmpl;
-};
-
 
-static Id
-makeevr(Pool *pool, char *s)
-{
-  if (!strncmp(s, "0:", 2) && s[2])
-    s += 2;
-  return str2id(pool, s, 1);
-}
+  const char *tmpvers;
+  const char *tmprel;
+};
 
 /*
  * dependency relations
@@ -322,7 +317,9 @@ repo_add_content(Repo *repo, FILE *fp, int flags)
            }
 
          if (istag ("VERSION"))
-           s->evr = makeevr(pool, value);
+            pd.tmpvers = strdup(value);
+          else if (istag ("RELEASE"))
+            pd.tmprel = strdup(value);
          else if (code11 && istag ("DISTRIBUTION"))
            repo_set_str(repo, s - pool->solvables, SOLVABLE_DISTRIBUTION, value);
          else if (istag ("DATADIR"))
@@ -416,6 +413,20 @@ repo_add_content(Repo *repo, FILE *fp, int flags)
       exit(1);
     }
 
+  if (pd.tmpvers)
+    {
+      if (pd.tmprel)
+        s->evr = makeevr(pool, join2(pd.tmpvers, "-", pd.tmprel));
+      else
+        s->evr = makeevr(pool, pd.tmpvers);
+    }
+  else if (pd.tmprel)
+    {
+      s->evr = makeevr(pool, join2("", "-", pd.tmprel));
+    }
+  pd.tmpvers = sat_free((void *)pd.tmpvers);
+  pd.tmprel = sat_free((void *)pd.tmprel);
+
   if (!s->arch)
     s->arch = ARCH_NOARCH;
   if (s->arch != ARCH_SRC && s->arch != ARCH_NOSRC)