supports version 3 packages
authorewt <devnull@localhost>
Thu, 27 Jun 1996 18:18:15 +0000 (18:18 +0000)
committerewt <devnull@localhost>
Thu, 27 Jun 1996 18:18:15 +0000 (18:18 +0000)
CVS patchset: 683
CVS date: 1996/06/27 18:18:15

lib/package.c

index f2264c0..03163e5 100644 (file)
@@ -64,7 +64,12 @@ int pkgReadHeader(int fd, Header * hdr, int * isSource) {
            readOldHeader(fd, hdr, isSource);
            arch = getArchNum();
            addEntry(*hdr, RPMTAG_ARCH, INT8_TYPE, &arch, 1);
-       } else if (lead.major == 2) {
+       } else if (lead.major == 2 || lead.major == 3) {
+           if (lead.minor) {
+               error(RPMERR_NEWPACKAGE, "only packages with minor numbers = 0"
+                       " are supported by this version of RPM");
+               return 2;
+           }
            if (!readSignature(fd, lead.signature_type, NULL)) {
               return 2;
            }