Re: [Rpm-maint] [rpm-software-management/rpm] Macro file comment loading "regression" (#1659)

2021-04-29 Thread Panu Matilainen
Oh and BTW, thanks @mlschroe for the quick fix! -- 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/issues/1659#issuecomment-829157370___

Re: [Rpm-maint] [rpm-software-management/rpm] Macro file comment loading "regression" (#1659)

2021-04-29 Thread Panu Matilainen
Closed #1659 via #1661. -- 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/issues/1659#event-4662101162___ Rpm-maint mailing list

Re: [Rpm-maint] [rpm-software-management/rpm] Macro file comment loading "regression" (#1659)

2021-04-28 Thread Panu Matilainen
@mlschroe , I went ahead and created a PR from this with a testcase, hope you don't mind. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Macro file comment loading "regression" (#1659)

2021-04-28 Thread Demi Marie Obenour
> No you wouldn't. Nobody expects contents of a #-commented line to affect > anything coming after it, it's just absurd. It's absurd in specs too as > indicated by the endless bugs and tickets filed on the behavior over the > years, but at least there we have an excuse or two, and other options

Re: [Rpm-maint] [rpm-software-management/rpm] Macro file comment loading "regression" (#1659)

2021-04-28 Thread Panu Matilainen
No you wouldn't. Nobody expects contents of a #-commented line to affect anything coming after it, it's just absurd. It's absurd in specs too as indicated by the endless bugs and tickets filed on the behavior over the years, but at least there we have an excuse or two, and other options (%dnl).

Re: [Rpm-maint] [rpm-software-management/rpm] Macro file comment loading "regression" (#1659)

2021-04-27 Thread Demi Marie Obenour
Personally, I would prefer to emit an error here. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Macro file comment loading "regression" (#1659)

2021-04-27 Thread Panu Matilainen
> That also happens without the patch. Oh, sorry. I thought I had a minimal reproducer but it was in a bit of a haste (https://bugzilla.redhat.com/show_bug.cgi?id=1953910 is the original case) so I missed the some further subtleties. It indeed relates to the empty newlines, the real reproducer

Re: [Rpm-maint] [rpm-software-management/rpm] Macro file comment loading "regression" (#1659)

2021-04-27 Thread Michael Schroeder
If you don't mind rdcl() reaching an even higher level of ugliness, an easy fix is to add ``` if (p == buf) { while (*p && isblank(*p)) p++; if (*p != '%') { *q = '\0'; /* trim trailing \r, \n */ break;

Re: [Rpm-maint] [rpm-software-management/rpm] Macro file comment loading "regression" (#1659)

2021-04-27 Thread Michael Schroeder
That also happens without the patch. I think you need ``` %xmacro1 foo # %{ %xmacro2 bar ``` I.e. an empty line that used to terminate the body. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

[Rpm-maint] [rpm-software-management/rpm] Macro file comment loading "regression" (#1659)

2021-04-27 Thread Panu Matilainen
PR #1606 (commit 75275a87cff04da65d3557f2c40ea2b526528c4c) changed macro file loading in a subtle way. Prior to that, the both macros in the following would be loaded. Now, anything coming after the comment gets silently discarded: ``` %xmacro1 foo # %{ %xmacro2 bar ``` > [pmatilai︎lumikko