Adds RPMTAG_ARCH to header for old packages

CVS patchset: 426
CVS date: 1996/02/26 22:45:10
This commit is contained in:
ewt 1996-02-26 22:45:10 +00:00
parent bbaba89807
commit 88b48eddb1
1 changed files with 4 additions and 0 deletions

View File

@ -5,6 +5,7 @@
#include "errno.h"
#include "header.h"
#include "misc.h"
#include "oldheader.h"
#include "package.h"
#include "rpmerr.h"
@ -22,6 +23,7 @@ static int readOldHeader(int fd, Header * hdr, int * isSource);
int pkgReadHeader(int fd, Header * hdr, int * isSource) {
struct rpmlead lead;
struct oldrpmlead * oldLead = (struct oldrpmlead *) &lead;
int_8 arch;
if (readLead(fd, &lead)) {
return 2;
@ -50,6 +52,8 @@ int pkgReadHeader(int fd, Header * hdr, int * isSource) {
} else {
if (lead.major == 1) {
readOldHeader(fd, hdr, isSource);
arch = getArchNum();
addEntry(hdr, RPMTAG_ARCH, INT8_TYPE, &arch, 1);
} else if (lead.major == 2) {
if (!readSignature(fd, lead.signature_type, NULL)) {
return 2;