From: Michael Schroeder Date: Wed, 27 Jun 2012 10:39:25 +0000 (+0200) Subject: - store SOLVABLE_HDRID as checksum X-Git-Tag: BASE-SuSE-Code-12_2-Branch~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=521f1f585ee83a81cb67c02b4ffd9fc65b958c2f;p=thirdparty%2Flibsolv.git - store SOLVABLE_HDRID as checksum --- diff --git a/ext/repo_rpmdb.c b/ext/repo_rpmdb.c index 3c012396..fb88e241 100644 --- a/ext/repo_rpmdb.c +++ b/ext/repo_rpmdb.c @@ -988,8 +988,10 @@ rpm2solv(Pool *pool, Repo *repo, Repodata *data, Solvable *s, RpmHead *rpmhead, if ((flags & RPM_ADD_WITH_HDRID) != 0) { str = headstring(rpmhead, TAG_SHA1HEADER); - if (str) - repodata_set_poolstr(data, handle, SOLVABLE_HDRID, str); + if (str && strlen(str) == 40) + repodata_set_checksum(data, handle, SOLVABLE_HDRID, REPOKEY_TYPE_SHA1, str); + else if (str && strlen(str) == 64) + repodata_set_checksum(data, handle, SOLVABLE_HDRID, REPOKEY_TYPE_SHA256, str); } u32 = headint32(rpmhead, TAG_BUILDTIME); if (u32)