summaryrefslogtreecommitdiff
path: root/lib/psm.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2008-06-10 13:35:20 +0300
committerPanu Matilainen <pmatilai@redhat.com>2008-06-10 13:35:20 +0300
commit54f40c0faf2fc203447dc1533a2e3a3456551567 (patch)
treedef3316007341533bbb382c9b52d0f2886acbeb1 /lib/psm.c
parent779c05972673122d5a34f76e42932af3ab9f2a84 (diff)
downloadrpm-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.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/psm.c b/lib/psm.c
index c0fd602c9..705127baa 100644
--- a/lib/psm.c
+++ b/lib/psm.c
@@ -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. */