pmatilai commented on this pull request.
> ARGMATCH(s, "%{_target_os}", match);
} else if (lineType->id == LINE_IFNOS) {
ARGMATCH(s, "%{_target_os}", match);
match = !match;
- } else if (lineType->id == LINE_IF) {
- s += 3;
- match = parseExpressionBoolean(s);
- if (match < 0) {
- rpmlog(RPMLOG_ERR,
- _("%s:%d: bad %%if condition\n"),
- ofi->fileName, ofi->lineNum);
- return PART_ERROR;
+ } else if (lineType->id & (LINE_IF | LINE_ELIF)) {
+ s += lineType->textLen;
+ if (((lineType->id == LINE_IF) && (spec->readStack->reading)) ||
+ ((lineType->id == LINE_ELIF) && (spec->readStack->readable))) {
+ match = parseExpressionBoolean(s);
match = .. is at the same indentation level as the continued condition, please
fix. Again, helper variable or two can be used to shorten the condition and
will likely make it nicer overall.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/710#pullrequestreview-239979706
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint