- set repository:toolversion to 1.0 in common_write
authorMichael Schroeder <mls@suse.de>
Mon, 18 Jan 2010 14:04:14 +0000 (15:04 +0100)
committerMichael Schroeder <mls@suse.de>
Mon, 18 Jan 2010 14:04:14 +0000 (15:04 +0100)
VERSION.cmake
ext/repo_write.c
package/libsatsolver.changes
src/knownid.h
tools/common_write.c

index 8739994..5854b26 100644 (file)
@@ -46,6 +46,6 @@
 
 SET(LIBSATSOLVER_MAJOR "0")
 SET(LIBSATSOLVER_MINOR "14")
-SET(LIBSATSOLVER_PATCH "12")
+SET(LIBSATSOLVER_PATCH "13")
 
-# last released 0.14.12
+# last released 0.14.13
index 4fc4f49..68c022c 100644 (file)
@@ -644,7 +644,7 @@ repo_write_collect_needed(struct cbdata *cbdata, Repo *repo, Repodata *data, Rep
   if (key->name == REPOSITORY_SOLVABLES)
     return SEARCH_NEXT_KEY;    /* we do not want this one */
   if (data != data->repo->repodata + data->repo->nrepodata - 1)
-    if (key->name == REPOSITORY_ADDEDFILEPROVIDES || key->name == REPOSITORY_EXTERNAL || key->name == REPOSITORY_LOCATION || key->name == REPOSITORY_KEYS)
+    if (key->name == REPOSITORY_ADDEDFILEPROVIDES || key->name == REPOSITORY_EXTERNAL || key->name == REPOSITORY_LOCATION || key->name == REPOSITORY_KEYS || key->name == REPOSITORY_TOOLVERSION)
       return SEARCH_NEXT_KEY;
 
   rm = cbdata->keymap[cbdata->keymapstart[data - data->repo->repodata] + (key - data->keys)];
@@ -754,7 +754,7 @@ repo_write_adddata(struct cbdata *cbdata, Repodata *data, Repokey *key, KeyValue
   if (key->name == REPOSITORY_SOLVABLES)
     return SEARCH_NEXT_KEY;
   if (data != data->repo->repodata + data->repo->nrepodata - 1)
-    if (key->name == REPOSITORY_ADDEDFILEPROVIDES || key->name == REPOSITORY_EXTERNAL || key->name == REPOSITORY_LOCATION || key->name == REPOSITORY_KEYS)
+    if (key->name == REPOSITORY_ADDEDFILEPROVIDES || key->name == REPOSITORY_EXTERNAL || key->name == REPOSITORY_LOCATION || key->name == REPOSITORY_KEYS || key->name == REPOSITORY_TOOLVERSION)
       return SEARCH_NEXT_KEY;
 
   rm = cbdata->keymap[cbdata->keymapstart[data - data->repo->repodata] + (key - data->keys)];
index 86af4c4..7feb4d8 100644 (file)
@@ -1,4 +1,10 @@
 -------------------------------------------------------------------
+Mon Jan 18 14:42:27 CET 2010 - mls@suse.de
+
+- set repository:toolversion to 1.0 in common_write
+- 0.14.13
+
+-------------------------------------------------------------------
 Mon Dec 21 14:29:24 CET 2009 - mls@suse.de
 
 - disable update rule in noobsoletes case if installed package is to
index 0db9a91..a84c893 100644 (file)
@@ -233,6 +233,8 @@ KNOWNID(PUBKEY_FINGERPRINT,         "pubkey:fingerprint"),
 KNOWNID(PUBKEY_EXPIRES,                        "pubkey:expires"),
 KNOWNID(PUBKEY_SIGNATURES,             "pubkey:signatures"),
 
+KNOWNID(REPOSITORY_TOOLVERSION,                "repository:toolversion"),
+
 KNOWNID(ID_NUM_INTERNAL,               0)
 
 #ifdef KNOWNID_INITIALIZE
index 73067bd..00e1c11 100644 (file)
@@ -17,6 +17,8 @@
 #include "repo_write.h"
 #include "common_write.h"
 
+#define SATSOLVER_TOOLVERSION "1.0"
+
 static Id verticals[] = {
   SOLVABLE_AUTHORS,
   SOLVABLE_DESCRIPTION,
@@ -76,8 +78,8 @@ keyfilter_attr(Repo *data, Repokey *key, void *kfdata)
   const char *keyname;
   if (key->storage == KEY_STORAGE_SOLVABLE)
     return KEY_STORAGE_DROPPED;
-  /* those two must only be in the main solv file */
-  if (key->name == REPOSITORY_EXTERNAL || key->name == REPOSITORY_ADDEDFILEPROVIDES)
+  /* those must only be in the main solv file */
+  if (key->name == REPOSITORY_EXTERNAL || key->name == REPOSITORY_ADDEDFILEPROVIDES || key->name == REPOSITORY_TOOLVERSION)
     return KEY_STORAGE_DROPPED;
   for (i = 0; verticals[i]; i++)
     if (key->name == verticals[i])
@@ -203,6 +205,7 @@ tool_write(Repo *repo, const char *basename, const char *attrname)
 
   memset(&kd, 0, sizeof(kd));
   info = repo_add_repodata(repo, 0);
+  repodata_set_str(info, SOLVID_META, REPOSITORY_TOOLVERSION, SATSOLVER_TOOLVERSION);
   pool_addfileprovides_ids(repo->pool, 0, &addedfileprovides);
   if (addedfileprovides && *addedfileprovides)
     {