summaryrefslogtreecommitdiff
path: root/lib/psm.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2008-05-26 17:23:36 +0300
committerPanu Matilainen <pmatilai@redhat.com>2008-05-26 17:23:36 +0300
commitf3703cbaf0e58c0c6eb567465284efbf1df6fe9a (patch)
tree6c64dc994e944898f8610cf0da9e1c2e9b1833f2 /lib/psm.c
parentd7b6c49df211eb775265c79922d608fb285c088f (diff)
downloadrpm-f3703cbaf0e58c0c6eb567465284efbf1df6fe9a.tar.gz
rpm-f3703cbaf0e58c0c6eb567465284efbf1df6fe9a.tar.bz2
rpm-f3703cbaf0e58c0c6eb567465284efbf1df6fe9a.zip
Similar payload compressor headerGet() conversion for rpmpsmStage()
Diffstat (limited to 'lib/psm.c')
-rw-r--r--lib/psm.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/psm.c b/lib/psm.c
index de6dd102c..937e85fbc 100644
--- a/lib/psm.c
+++ b/lib/psm.c
@@ -1680,9 +1680,11 @@ assert(psm->mi == NULL);
case PSM_RPMIO_FLAGS:
{ const char * payload_compressor = NULL;
+ struct rpmtd_s pc;
- if (!hge(fi->h, RPMTAG_PAYLOADCOMPRESSOR, NULL,
- (rpm_data_t *) &payload_compressor, NULL))
+ headerGet(fi->h, RPMTAG_PAYLOADCOMPRESSOR, &pc, HEADERGET_DEFAULT);
+ payload_compressor = rpmtdGetString(&pc);
+ if (!payload_compressor)
payload_compressor = "gzip";
if (!strcmp(payload_compressor, "gzip"))
psm->rpmio_flags = "r.gzdio";
@@ -1690,6 +1692,7 @@ assert(psm->mi == NULL);
psm->rpmio_flags = "r.bzdio";
if (!strcmp(payload_compressor, "lzma"))
psm->rpmio_flags = "r.lzdio";
+ rpmtdFreeData(&pc);
rc = RPMRC_OK;
} break;