diff --git a/build/spec.c b/build/spec.c index 9c378ef96..7982f98e3 100644 --- a/build/spec.c +++ b/build/spec.c @@ -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; }