X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=ext%2Frepo_rpmdb.c;h=fb88e241f385c2bfbd17792f5806d02c744a4896;hb=521f1f585ee83a81cb67c02b4ffd9fc65b958c2f;hp=3c012396c28e9ea0489255bbda2366d5859a5c76;hpb=b35a25c192ef3e7c4cd4308714f6347197c2f688;p=platform%2Fupstream%2Flibsolv.git diff --git a/ext/repo_rpmdb.c b/ext/repo_rpmdb.c index 3c01239..fb88e24 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)