Permalink
Browse files

Also copy the checksums in repo_add_rpmdb_reffp

Sorry. Also bumps the RPMDB_COOKIE_VERSION so old broken solv
files don't get reused.
  • Loading branch information...
1 parent 2e2e02a commit a8e47f15b81002c721fe164885d809562c5d3e7a @mlschroe mlschroe committed Dec 16, 2013
Showing with 7 additions and 1 deletion.
  1. +7 −1 ext/repo_rpmdb.c
View
@@ -50,7 +50,8 @@
/* 3: added triggers */
/* 4: fixed triggers */
-#define RPMDB_COOKIE_VERSION 4
+/* 5: fixed checksum copying */
+#define RPMDB_COOKIE_VERSION 5
#define TAG_NAME 1000
#define TAG_VERSION 1001
@@ -1468,6 +1469,11 @@ solvable_copy_cb(void *vcbdata, Solvable *r, Repodata *fromdata, Repokey *key, K
cbdata->handle = repodata_new_handle(data);
repodata_add_flexarray(data, cbdata->subhandle, keyname, cbdata->handle);
break;
+ case REPOKEY_TYPE_MD5:
+ case REPOKEY_TYPE_SHA1:
+ case REPOKEY_TYPE_SHA256:
+ repodata_set_bin_checksum(data, handle, keyname, key->type, (const unsigned char *)kv->str);
+ break;
default:
break;
}

0 comments on commit a8e47f1

Please sign in to comment.