Remember the /etc/products.d enties filename in .solv (bnc #432932)
authorMichael Andres <ma@suse.de>
Fri, 24 Oct 2008 14:06:20 +0000 (14:06 +0000)
committerMichael Andres <ma@suse.de>
Fri, 24 Oct 2008 14:06:20 +0000 (14:06 +0000)
VERSION.cmake
package/libsatsolver.changes
src/knownid.h
tools/repo_products.c

index 02c527a..0134f1e 100644 (file)
@@ -46,6 +46,6 @@
 
 SET(LIBSATSOLVER_MAJOR "0")
 SET(LIBSATSOLVER_MINOR "12")
-SET(LIBSATSOLVER_PATCH "0")
+SET(LIBSATSOLVER_PATCH "1")
 
-# last released 0.12.0
+# last released 0.12.1
index 9c225c9..16a8227 100644 (file)
@@ -1,4 +1,11 @@
 -------------------------------------------------------------------
+Fri Oct 24 16:03:13 CEST 2008 - ma@suse.de
+
+- Remember the /etc/products.d enties filename in .solv 
+  (bnc #432932)
+- 0.12.1
+
+-------------------------------------------------------------------
 Thu Oct 23 10:49:40 CEST 2008 - mrueckert@suse.de
 
 - add zlib-devel as buildrequires, cmake is looking for it
index 8032387..548bda4 100644 (file)
@@ -157,6 +157,7 @@ KNOWNID(UPDATE_REFERENCE_ID,                "update:reference:id"),         /*  id, e.g. bug number *
 KNOWNID(UPDATE_REFERENCE_TITLE,                "update:reference:title"),      /*  title, e.g. "the bla forz scribs on fuggle" */
 
 /* name */
+KNOWNID(PRODUCT_REFERENCEFILE,         "product:referencefile"),
 KNOWNID(PRODUCT_SHORTLABEL,            "product:shortlabel"),
 KNOWNID(PRODUCT_DISTPRODUCT,           "product:distproduct"),
 KNOWNID(PRODUCT_DISTVERSION,           "product:distversion"),
index 6083a02..f7cbaf1 100644 (file)
@@ -92,6 +92,7 @@ static struct stateswitch stateswitches[] = {
 
 struct parsedata {
   const char *filename;
+  const char *basename;
   int depth;
   enum state state;
   int statedepth;
@@ -270,6 +271,9 @@ endElement(void *userData, const char *name)
       if (pd->ctime)
         repodata_set_num(pd->data, pd->handle, SOLVABLE_INSTALLTIME, pd->ctime);
 
+      if ( pd->basename )
+        repodata_set_str(pd->data, pd->handle, PRODUCT_REFERENCEFILE, pd->basename);
+
       /* this is where <productsdir>/baseproduct points to */
       if (pd->currentproduct == pd->baseproduct)
        repodata_set_str(pd->data, pd->handle, PRODUCT_TYPE, "base");
@@ -570,6 +574,7 @@ parse_dir(DIR *dir, const char *path, struct parsedata *pd, int code11)
              break;
            }
          pd->filename = fullpath;
+         pd->basename = entry->d_name;
          repo_add_product(pd, fp, code11);
          fclose(fp);
        }
@@ -600,7 +605,7 @@ repo_add_products(Repo *repo, const char *proddir, const char *root, const char
 
   if (!(flags & REPO_REUSE_REPODATA))
     data = repo_add_repodata(repo, 0);
-  else 
+  else
     data = repo_last_repodata(repo);
 
   memset(&pd, 0, sizeof(pd));