Re: [Rpm-maint] [rpm-software-management/rpm] Collapse unexpanded macro definitions (#1198) (#1343)

2021-04-05 Thread Michal Domonkos
@dmnks pushed 1 commit. 92971cc4a66853b22582830564aba3a46acd2607 Collapse unexpanded macro definitions (#1198) -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/rpm-software-management/rpm/pull/1343/files/7f305cc58fa07f0061a2f8dd812b894

Re: [Rpm-maint] [rpm-software-management/rpm] Collapse unexpanded macro definitions (#1198) (#1343)

2020-08-25 Thread Michal Domonkos
Maybe the correct solution would be to actually collapse *any* macro found in a false branch, not just the conditionals, `%include`s, `%define`s and `%global`s. But I'll have to think that through. -- You are receiving this because you are subscribed to this thread. Reply to this email directly

Re: [Rpm-maint] [rpm-software-management/rpm] Collapse unexpanded macro definitions (#1198) (#1343)

2020-08-25 Thread Panu Matilainen
I'm probably getting tangled in my own thoughts here :sweat_smile: -- 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/1343#issuecomment-679940669_

Re: [Rpm-maint] [rpm-software-management/rpm] Collapse unexpanded macro definitions (#1198) (#1343)

2020-08-25 Thread Michal Domonkos
> Technically %define and %global can appear anywhere at all in the spec, not > just beginning of line OK, true. One example: `%{!?foo:%define foo ...}` For some reason, this didn't occur to me, sigh... In that case, I agree it doesn't make sense to specifically handle the "beginning of line"

Re: [Rpm-maint] [rpm-software-management/rpm] Collapse unexpanded macro definitions (#1198) (#1343)

2020-08-25 Thread Panu Matilainen
Actually... its not the spec that's missing, it's just not included in the tarball (from tests/Makefile.am) -- 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/1343#issuecomme

Re: [Rpm-maint] [rpm-software-management/rpm] Collapse unexpanded macro definitions (#1198) (#1343)

2020-08-25 Thread Panu Matilainen
> +error: failed to stat //data/SPECS/ifmultiline-macro.spec: No such file or > directory Seems you forgot to add the new test-case spec to git. Beyond that, I'm not sure. Technically %define and %global can appear anywhere at all in the spec, not just beginning of line, so this would create sp

[Rpm-maint] [rpm-software-management/rpm] Collapse unexpanded macro definitions (#1198) (#1343)

2020-08-24 Thread Michal Domonkos
Since the body of a newly defined macro may span multiple lines and contain %if expressions, we need to make sure the line parser does not try to interpret those when the corresponding %define or %global macro appears in a false %if branch and is therefore left unexpanded in the line buffer. This