diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2008-05-26 15:25:11 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2008-05-26 15:25:11 +0300 |
commit | 1814782eef6bc94300cb351111e08872442f1b49 (patch) | |
tree | 616e33d588f6b718b358c2c7eeba08e61f0c5771 /build/pack.c | |
parent | 1315d9f498a38916a128ef95d3bbd7557fc1ebc3 (diff) | |
download | librpm-tizen-1814782eef6bc94300cb351111e08872442f1b49.tar.gz librpm-tizen-1814782eef6bc94300cb351111e08872442f1b49.tar.bz2 librpm-tizen-1814782eef6bc94300cb351111e08872442f1b49.zip |
Convert writeRPM() to use new headerGet()
Diffstat (limited to 'build/pack.c')
-rw-r--r-- | build/pack.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/build/pack.c b/build/pack.c index f8300686b..2be43ac1e 100644 --- a/build/pack.c +++ b/build/pack.c @@ -570,13 +570,13 @@ exit: /* XXX Fish the pkgid out of the signature header. */ if (sig != NULL && pkgidp != NULL) { - rpmTagType tagType; - unsigned char * MD5 = NULL; - rpm_count_t c; - int xx; - xx = headerGetEntry(sig, RPMSIGTAG_MD5, &tagType, (rpm_data_t *)&MD5, &c); - if (tagType == RPM_BIN_TYPE && MD5 != NULL && c == 16) - *pkgidp = MD5; + struct rpmtd_s md5tag; + headerGet(sig, RPMSIGTAG_MD5, &md5tag, HEADERGET_DEFAULT); + if (rpmtdType(&md5tag) == RPM_BIN_TYPE && + md5tag.count == 16 && md5tag.data != NULL) { + *pkgidp = md5tag.data; + } + rpmtdFreeData(&md5tag); } sig = rpmFreeSignature(sig); |