summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2007-07-09 11:23:58 +0300
committerPanu Matilainen <pmatilai@redhat.com>2007-07-09 11:23:58 +0300
commita867e6786e66c623449f464b6c8c13900f0a7cdb (patch)
treeef3be5dde0fde488c89b8a2f15d8a453afadaad9 /lib
parent03d95de7a0138354698772d9c393bcb4a71a4279 (diff)
downloadlibrpm-tizen-a867e6786e66c623449f464b6c8c13900f0a7cdb.tar.gz
librpm-tizen-a867e6786e66c623449f464b6c8c13900f0a7cdb.tar.bz2
librpm-tizen-a867e6786e66c623449f464b6c8c13900f0a7cdb.zip
Permit packages with no payload format (rpm 3.x compat), ugh...
Diffstat (limited to 'lib')
-rw-r--r--lib/package.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/package.c b/lib/package.c
index 59841eb4c..09571b072 100644
--- a/lib/package.c
+++ b/lib/package.c
@@ -1079,6 +1079,13 @@ rpmRC headerCheckPayloadFormat(Header h) {
xx = headerGetEntry(h, RPMTAG_PAYLOADFORMAT, NULL,
(void **)&payloadfmt, NULL);
+ /*
+ * XXX Ugh, rpm 3.x packages don't have payload format tag. Instead
+ * of blinly allowing, should check somehow (HDRID existence or... ?)
+ */
+ if (!payloadfmt)
+ return RPMRC_OK;
+
if (payloadfmt && strncmp(payloadfmt, "cpio", strlen("cpio")) == 0) {
rc = RPMRC_OK;
} else {