Do not allow version specification in PreReq:
authormarc <devnull@localhost>
Fri, 29 Aug 1997 14:04:58 +0000 (14:04 +0000)
committermarc <devnull@localhost>
Fri, 29 Aug 1997 14:04:58 +0000 (14:04 +0000)
CVS patchset: 1812
CVS date: 1997/08/29 14:04:58

build/spec.c

index 401500a..3427cf6 100644 (file)
@@ -330,6 +330,11 @@ static int parseRequiresConflicts(struct PackageRec *p, char *line,
                             "No versions on file names in Requires: %s", req);
                    return RPMERR_BADSPEC;
                }
+               if (flag == RPMTAG_PREREQ) {
+                   rpmError(RPMERR_BADSPEC,
+                            "No versions in PreReq: %s", req);
+                   return RPMERR_BADSPEC;
+               }
                /* read a version */
                flags |= rc->flags;
                version = strtok(NULL, " ,\t\n");