Let headerLoad() failure message come through

- headerVerify() always returns with a message even for OK results,
  which was masking the error message from headerLoad(), sometimes
  giving not very helpful "headerRead failed: Header sanity check OK"
  style messages.
This commit is contained in:
Panu Matilainen 2011-10-11 10:31:40 +03:00
parent 90a6c2b944
commit f822ffcbd7
1 changed files with 2 additions and 1 deletions

View File

@ -451,13 +451,14 @@ static rpmRC rpmpkgReadHeader(rpmKeyring keyring, rpmVSFlags vsflags,
}
/* Sanity check header tags */
rc = headerVerify(keyring, vsflags, ei, uc, msg);
rc = headerVerify(keyring, vsflags, ei, uc, &buf);
if (rc != RPMRC_OK)
goto exit;
/* OK, blob looks sane, load the header. */
h = headerLoad(ei);
if (h == NULL) {
free(buf);
rasprintf(&buf, _("hdr load: BAD\n"));
rc = RPMRC_FAIL;
goto exit;