fix last ':' checking patch - source and patch lines cna have #'s!
authorroot <devnull@localhost>
Thu, 22 Feb 1996 20:28:19 +0000 (20:28 +0000)
committerroot <devnull@localhost>
Thu, 22 Feb 1996 20:28:19 +0000 (20:28 +0000)
CVS patchset: 403
CVS date: 1996/02/22 20:28:19

build/spec.c

index 9c378ef..7982f98 100644 (file)
@@ -470,10 +470,15 @@ static int find_preamble_line(char *line, char **s)
     }
     if (!p->token) return 0;
     *s = line + p->len;
-    *s += strspn(*s, " \t");
-    if (**s != ':') {
-       return 0;
+
+    /* Unless this is a source or a patch, a ':' better be next */
+    if (p->tag != RPMTAG_SOURCE && p->tag != RPMTAG_PATCH) {
+       *s += strspn(*s, " \t");
+       if (**s != ':') {
+           return 0;
+       }
     }
+    
     *s += strspn(*s, ": \t");
     return p->tag;
 }