2019-10-02 15:28:11 +02:00
|
|
|
--- ./build/parseReqs.c.orig 2019-06-26 14:17:31.396985719 +0000
|
|
|
|
+++ ./build/parseReqs.c 2019-10-02 12:10:51.879570016 +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;
|
|
|
|
|
2019-10-02 15:28:11 +02:00
|
|
|
if (nametag == RPMTAG_OBSOLETENAME) {
|
|
|
|
--- ./macros.in.orig 2019-10-02 12:10:45.431583601 +0000
|
|
|
|
+++ ./macros.in 2019-10-02 12:10:51.879570016 +0000
|
|
|
|
@@ -452,7 +452,7 @@ package or when debugging this package.\
|
|
|
|
%_invalid_encoding_terminates_build 1
|
2017-01-19 16:41:55 +01:00
|
|
|
|
|
|
|
# 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?
|