--- ./lib/rpminstall.c.dont-install-delta-rpms 2006-04-03 01:14:55.000000000 +0200 +++ ./lib/rpminstall.c 2006-05-25 13:08:26.027077578 +0200 @@ -482,6 +482,7 @@ eiu->fnp++, eiu->prevx++) { const char * fileName; + const char * payloadFormat; rpmMessage(RPMMESS_DEBUG, "============== %s\n", *eiu->fnp); (void) urlPath(*eiu->fnp, &fileName); @@ -522,6 +523,18 @@ /*@switchbreak@*/ break; } + payloadFormat = 0; + if (!headerGetEntry(eiu->h, RPMTAG_PAYLOADFORMAT, NULL, (void **)&payloadFormat, NULL)) + payloadFormat = 0; + if (payloadFormat && strcmp(payloadFormat, "cpio") != 0) { + if (!strcmp(payloadFormat, "drpm")) + rpmMessage(RPMMESS_ERROR, _("%s is a deltarpm, create a real rpm from it first!\n"), *eiu->fnp); + else + rpmMessage(RPMMESS_ERROR, _("%s contains no cpio payload\n"), *eiu->fnp); + eiu->numFailed++; *eiu->fnp = NULL; + continue; + } + eiu->isSource = (headerIsEntry(eiu->h, RPMTAG_SOURCERPM) == 0); if (eiu->isSource) {