Superceded by @mlschroe 's work to add ternary operator to expression parsing
and wiring all that into the macro engine, closing.
Thanks @pavlinamv for your initiative on this though, I do think it was vital
for getting the ball rolling on the whole thing!
--
You are receiving this because you
Closed #746.
--
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/746#event-2653949216___
Rpm-maint mailing list
Rpm-maint@lists.rpm.o
See PR #817 for expression support in macros - that's what I mean by "generic
conditionals".
--
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/746#issuecomment-521557002_
As mentioned in the ticket (#115), I want to see a plan for a syntax that
allows for generic condition instead of just existence test before proceeding.
Also mentioned in the ticket, the syntax has other issues too. Lets discuss
those in the ticket to keep it all in one place.
@pavlinamv , whil
Support for extra spaces is ripped out.
--
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/746#issuecomment-518617194___
Rpm-maint m
pmatilai requested changes on this pull request.
If I interpret that correctly, you just dismiss all the spaces that might be
there. So what if you WANT to emit spaces? Also, the triple syntax has to give
the same exact results as doing the same thing without the older conditional
operator for
> And how do you're supposed to know which spaces before and after the 0/1 are
> intentional or not? This must expand literally to either " 0 " or " 1".
According to the specification of triple operator - all spaces
- after '%{?!' or '%{?',
- before and after ':' that divides the operator and
- b
```
%global with_lua %{?{_without_lua} : 0 : 1}
```
And how do you're supposed to know which spaces before and after the 0/1 are
intentional or not? This *must* expand literally to either " 0 " or " 1".
Rip support for the "courtesy" spaces everywhere.
--
You are receiving this because you are
> The exact syntax is subject to endless bikeshedding of course, but one thing
> that strikes me as just wrong are the surrounding spaces everywhere. There
> are no "courtesy spaces" for readability anywhere in rpm macros, I dont think
> this should be any different.
Here are 2 relevant exampl
The exact syntax is subject to endless bikeshedding of course, but one thing
that strikes me as just wrong are the surrounding spaces everywhere. There are
no "courtesy spaces" for readability anywhere in rpm macros, I dont think this
should be any different. This also makes me wonder if it's *r
> It is a small functional change. But the change is unimportant,
because it includes only some of %load macros with more
than one '?'. Like:
%{!??load:file}
%{!???load:file}
or
%{!!!??load:file}
All this talk about a change, but it fails to explain what that change of
behavior actually *is*.
I'd
pmatilai commented on this pull request.
> str++;
}
return str;
}
+static void partsInit(macroPartition *parts)
+{
+parts->f = parts->fe = NULL;
+parts->g = parts->ge = NULL;
+parts->h = parts->he = NULL;
+parts->fn = parts->gn = parts->hn = 0;
+return;
In
pmatilai commented on this pull request.
> @@ -45,6 +45,12 @@ enum macroFlags_e {
ME_USED= (1 << 1),
};
+enum checkConditionType {
+CHK_NO = 0,
+CHK_BASIC = (1 << 0),
+CHK_TRIPLE = (1 << 1),
+};
CHK_NO sounds like something that wants to pair
pmatilai commented on this pull request.
> +return;
+}
+
+static void setPartsSize(macroPartition *parts)
+{
+parts->fn = parts->fe - parts->f;
+parts->gn = parts->ge - parts->g;
+parts->hn = parts->he - parts->h;
+return;
+}
+
+/**
+ * Skip spaces before the input string
+ *
pmatilai commented on this pull request.
> +SKIPBLANK(parts->g, c);
+
+/* after %{? {macroo} must be ':' */
+if (parts->g[0] == ':') {
+ parts->g++;
+ SKIPBLANK(parts->g,c);
+ parts->ge = parts->g;
+ while ((parts->ge[0] != 0) && (parts->ge[0] != ':')) {
+
pmatilai commented on this pull request.
> +if (parts->g[0] == ':') {
+ parts->g++;
+ SKIPBLANK(parts->g,c);
+ parts->ge = parts->g;
+ while ((parts->ge[0] != 0) && (parts->ge[0] != ':')) {
+ parts->ge++;
+ if (parts->ge[0] == '{') {
+
pmatilai commented on this pull request.
> + SKIPBLANK(parts->g,c);
+ parts->ge = parts->g;
+ while ((parts->ge[0] != 0) && (parts->ge[0] != ':')) {
+ parts->ge++;
+ if (parts->ge[0] == '{') {
+ if ((parts->ge = matchchar(parts->ge++, '{', '}'))
%{? { macro_name } : true : false }
%{? { macro_name } : true }
%{?! { macro_name } : false : true }
%{?! { macro_name } : false }
More detailed description of the notation:
* Between the first chars "%{?" resp. "%{!?" or "%{?! there can not be a spac
18 matches
Mail list logo