diff options
author | root <devnull@localhost> | 1996-07-07 22:18:14 +0000 |
---|---|---|
committer | root <devnull@localhost> | 1996-07-07 22:18:14 +0000 |
commit | 1f5921a0461fb10eb23e5ec35b349e2e13de81e2 (patch) | |
tree | 573cb6f092b276a73158648eb338d1e1b8d5c041 /lib/package.c | |
parent | 5f8fc3c18a0b5a4940cc96079253af63f74a0e74 (diff) | |
download | rpm-1f5921a0461fb10eb23e5ec35b349e2e13de81e2.tar.gz rpm-1f5921a0461fb10eb23e5ec35b349e2e13de81e2.tar.bz2 rpm-1f5921a0461fb10eb23e5ec35b349e2e13de81e2.zip |
new Header-style signatures, HEADER_MAGIC
CVS patchset: 735
CVS date: 1996/07/07 22:18:14
Diffstat (limited to 'lib/package.c')
-rw-r--r-- | lib/package.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/package.c b/lib/package.c index 03163e522..7cc724f0a 100644 --- a/lib/package.c +++ b/lib/package.c @@ -53,10 +53,11 @@ int pkgReadHeader(int fd, Header * hdr, int * isSource) { *hdr = NULL; } else { - if (!readSignature(fd, lead.signature_type, NULL)) { + if (readSignature(fd, NULL, lead.signature_type)) { return 2; } - *hdr = readHeader(fd); + *hdr = readHeader(fd, (lead.major >= 3) ? + HEADER_MAGIC : NO_HEADER_MAGIC); if (! *hdr) return 2; } } else { @@ -70,10 +71,11 @@ int pkgReadHeader(int fd, Header * hdr, int * isSource) { " are supported by this version of RPM"); return 2; } - if (!readSignature(fd, lead.signature_type, NULL)) { + if (readSignature(fd, NULL, lead.signature_type)) { return 2; } - *hdr = readHeader(fd); + *hdr = readHeader(fd, (lead.major >= 3) ? + HEADER_MAGIC : NO_HEADER_MAGIC); if (! *hdr) return 2; } else { error(RPMERR_NEWPACKAGE, "only packages with major numbers <= 2 are" |