1) sets arch properly for v1 packages
authorewt <devnull@localhost>
Wed, 17 Jul 1996 20:01:45 +0000 (20:01 +0000)
committerewt <devnull@localhost>
Wed, 17 Jul 1996 20:01:45 +0000 (20:01 +0000)
2) assumes all v1 packages were built for OS #1 (Linux)

CVS patchset: 878
CVS date: 1996/07/17 20:01:45

lib/package.c

index c505376..039b7f6 100644 (file)
@@ -65,8 +65,10 @@ int pkgReadHeader(int fd, Header * hdr, int * isSource) {
     } else {
        if (lead.major == 1) {
            readOldHeader(fd, hdr, isSource);
-           arch = getArchNum();
+           arch = lead.archnum;
            addEntry(*hdr, RPMTAG_ARCH, INT8_TYPE, &arch, 1);
+           arch = 1;             /* old versions of RPM only supported Linux */
+           addEntry(*hdr, RPMTAG_OS, INT8_TYPE, &arch, 1);
        } else if (lead.major == 2 || lead.major == 3) {
            if (lead.minor) {
                error(RPMERR_NEWPACKAGE, "only packages with minor numbers = 0"