2017-12-05 11:46:24 +01:00
|
|
|
--- ./build/parseReqs.c.orig 2017-10-05 10:04:56.887602165 +0000
|
|
|
|
+++ ./build/parseReqs.c 2017-12-01 16:00:06.956343096 +0000
|
2017-01-19 16:41:55 +01:00
|
|
|
@@ -42,7 +42,7 @@ static rpmRC checkEpoch(const char *s, c
|
|
|
|
return RPMRC_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
-static rpmRC checkDep(rpmSpec spec, char *N, char *EVR, char **emsg)
|
|
|
|
+static rpmRC checkDep(rpmSpec spec, rpmsenseFlags tagflags, char *N, char *EVR, char **emsg)
|
|
|
|
{
|
|
|
|
/*
|
|
|
|
* Tokens must begin with alphanumeric, _, or /, but we don't know
|
|
|
|
@@ -65,6 +65,11 @@ static rpmRC checkDep(rpmSpec spec, char
|
|
|
|
|
|
|
|
if (rpmExpandNumeric("%{?_wrong_version_format_terminate_build}"))
|
|
|
|
return RPMRC_FAIL;
|
|
|
|
+ if (tagflags & (RPMSENSE_FIND_REQUIRES|RPMSENSE_FIND_PROVIDES))
|
|
|
|
+ rpmlog(RPMLOG_WARNING, "%s\n", *emsg);
|
|
|
|
+ else
|
|
|
|
+ rpmlog(RPMLOG_WARNING, _("line %d: %s: %s\n"), spec->lineNum, *emsg, spec->line);
|
|
|
|
+ *emsg = _free(*emsg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return RPMRC_OK;
|
|
|
|
@@ -72,6 +77,7 @@ static rpmRC checkDep(rpmSpec spec, char
|
|
|
|
|
|
|
|
struct parseRCPOTRichData {
|
|
|
|
rpmSpec spec;
|
|
|
|
+ rpmsenseFlags tagflags;
|
|
|
|
StringBuf sb;
|
|
|
|
};
|
|
|
|
|
|
|
|
@@ -109,7 +115,7 @@ static rpmRC parseRCPOTRichCB(void *cbda
|
|
|
|
appendStringBuf(sb, rel);
|
|
|
|
appendStringBuf(sb, EVR);
|
|
|
|
}
|
|
|
|
- rc = checkDep(data->spec, N, EVR, emsg);
|
|
|
|
+ rc = checkDep(data->spec, data->tagflags, N, EVR, emsg);
|
|
|
|
_free(N);
|
|
|
|
_free(EVR);
|
|
|
|
} else if (type == RPMRICH_PARSE_OP) {
|
2017-12-05 11:46:24 +01:00
|
|
|
@@ -223,6 +229,7 @@ rpmRC parseRCPOT(rpmSpec spec, Package p
|
2017-01-19 16:41:55 +01:00
|
|
|
goto exit;
|
|
|
|
}
|
|
|
|
data.spec = spec;
|
|
|
|
+ data.tagflags = tagflags;
|
|
|
|
data.sb = newStringBuf();
|
2017-12-05 11:46:24 +01:00
|
|
|
if (rpmrichParseForTag(&r, &emsg, parseRCPOTRichCB, &data, nametag) != RPMRC_OK) {
|
2017-01-19 16:41:55 +01:00
|
|
|
freeStringBuf(data.sb);
|
2017-12-05 11:46:24 +01:00
|
|
|
@@ -274,7 +281,7 @@ rpmRC parseRCPOT(rpmSpec spec, Package p
|
2017-01-19 16:41:55 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/* check that dependency is well-formed */
|
|
|
|
- if (checkDep(spec, N, EVR, &emsg))
|
|
|
|
+ if (checkDep(spec, tagflags, N, EVR, &emsg))
|
|
|
|
goto exit;
|
|
|
|
|
|
|
|
if (nametag == RPMTAG_FILETRIGGERNAME ||
|
2017-12-05 11:46:24 +01:00
|
|
|
--- ./macros.in.orig 2017-12-01 16:00:02.705355493 +0000
|
|
|
|
+++ ./macros.in 2017-12-01 16:00:06.957343106 +0000
|
|
|
|
@@ -456,7 +456,7 @@ package or when debugging this package.\
|
2017-01-19 16:41:55 +01:00
|
|
|
%_invalid_encoding_terminates_build 0
|
|
|
|
|
|
|
|
# Should invalid version format in requires, provides, ... terminate a build?
|
|
|
|
-%_wrong_version_format_terminate_build 1
|
|
|
|
+%_wrong_version_format_terminate_build 0
|
|
|
|
|
|
|
|
#
|
|
|
|
# Should rpm try to download missing sources at build-time?
|