diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2008-06-10 13:35:20 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2008-06-10 13:35:20 +0300 |
commit | 54f40c0faf2fc203447dc1533a2e3a3456551567 (patch) | |
tree | def3316007341533bbb382c9b52d0f2886acbeb1 /lib/psm.c | |
parent | 779c05972673122d5a34f76e42932af3ab9f2a84 (diff) | |
download | rpm-54f40c0faf2fc203447dc1533a2e3a3456551567.tar.gz rpm-54f40c0faf2fc203447dc1533a2e3a3456551567.tar.bz2 rpm-54f40c0faf2fc203447dc1533a2e3a3456551567.zip |
Convert psm rpmInstallSourcePackage() to new headerGet()
Diffstat (limited to 'lib/psm.c')
-rw-r--r-- | lib/psm.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -234,7 +234,6 @@ rpmRC rpmInstallSourcePackage(rpmts ts, FD_t fd, char * _sourcedir = NULL; char * _specdir = NULL; char * specFile = NULL; - HGE_t hge; HFD_t hfd; Header h = NULL; struct rpmpsm_s psmbuf; @@ -290,7 +289,6 @@ rpmRC rpmInstallSourcePackage(rpmts ts, FD_t fd, rpmteSetHeader(fi->te, fi->h); fi->te->fd = fdLink(fd, RPMDBG_M("installSourcePackage")); - hge = fi->hge; hfd = fi->hfd; (void) rpmInstallLoadMacros(fi, fi->h); @@ -299,9 +297,12 @@ rpmRC rpmInstallSourcePackage(rpmts ts, FD_t fd, psm->te = fi->te; if (cookie) { + struct rpmtd_s ctd; *cookie = NULL; - if (hge(fi->h, RPMTAG_COOKIE, NULL, (rpm_data_t *) cookie, NULL)) - *cookie = xstrdup(*cookie); + if (headerGet(fi->h, RPMTAG_COOKIE, &ctd, HEADERGET_MINMEM)) { + *cookie = xstrdup(rpmtdGetString(&ctd)); + rpmtdFreeData(&ctd); + } } /* XXX FIXME: don't do per-file mapping, force global flags. */ |