diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2008-05-26 17:23:36 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2008-05-26 17:23:36 +0300 |
commit | f3703cbaf0e58c0c6eb567465284efbf1df6fe9a (patch) | |
tree | 6c64dc994e944898f8610cf0da9e1c2e9b1833f2 /lib/psm.c | |
parent | d7b6c49df211eb775265c79922d608fb285c088f (diff) | |
download | rpm-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.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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; |