malmond / rpms / rpm

Forked from rpms/rpm 4 years ago
Clone
Blob Blame History Raw
--- rpm-4.11.3/build/parseReqs.c.orig	2015-08-19 16:24:55.343033682 +0200
+++ rpm-4.11.3/build/parseReqs.c	2015-08-19 16:25:26.166111719 +0200
@@ -35,16 +35,6 @@
 #define	SKIPWHITE(_x)	{while(*(_x) && (risspace(*_x) || *(_x) == ',')) (_x)++;}
 #define	SKIPNONWHITE(_x){while(*(_x) &&!(risspace(*_x) || *(_x) == ',')) (_x)++;}
 
-static int checkSep(const char *s, char c, char **emsg)
-{
-    const char *sep = strchr(s, c);
-    if (sep && strchr(sep + 1, c)) {
-	rasprintf(emsg, "Invalid version (double separator '%c'): %s", c, s);
-	return 1;
-    }
-    return 0;
-}
-
 rpmRC parseRCPOT(rpmSpec spec, Package pkg, const char *field, rpmTagVal tagN,
 	       int index, rpmsenseFlags tagflags)
 {
@@ -165,10 +155,6 @@
 	    rstrlcpy(EVR, v, (ve-v) + 1);
 	    if (rpmCharCheck(spec, EVR, ve-v, ".-_+:%{}~")) goto exit;
 
-            /* While ':' and '-' are valid, only one of each is valid. */
-	    if (checkSep(EVR, '-', &emsg) || checkSep(EVR, ':', &emsg))
-		goto exit;
-
 	    re = ve;	/* ==> next token after EVR string starts here */
 	} else
 	    EVR = NULL;