Re: [Rpm-maint] [rpm-software-management/rpm] A saner way for marco argument escaping (#1060)

2020-02-10 Thread Panu Matilainen
> I tried to add it to the buildroot macro (re-)definition, but with buildroot > it is pretty hopeless. rpm's rpmGenPath always expands all arguments, which > leads to the buildroot getting expanded over and over again. Yup, it's %'s all the way down... :turtle: Perhaps we'll get there yet.

Re: [Rpm-maint] [rpm-software-management/rpm] A saner way for marco argument escaping (#1060)

2020-02-10 Thread Michael Schroeder
(Oh, and I renamed ME_NOEXPAND to ME_LITERAL for consistency) -- 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] A saner way for marco argument escaping (#1060)

2020-02-10 Thread Panu Matilainen
Merged #1060 into master. -- 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/1060#event-3022749425___ Rpm-maint mailing list

Re: [Rpm-maint] [rpm-software-management/rpm] A saner way for marco argument escaping (#1060)

2020-02-10 Thread Michael Schroeder
Ok, done. I also used RPMMACRO_LITERAL at some other places where it made sense. I tried to add it to the buildroot macro (re-)definition, but with buildroot it is pretty hopeless. rpm's rpmGenPath always expands all arguments, which leads to the buildroot getting expanded over and over again.

Re: [Rpm-maint] [rpm-software-management/rpm] A saner way for marco argument escaping (#1060)

2020-02-10 Thread Panu Matilainen
pmatilai approved this pull request. Cool, thanks. -- 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] A saner way for marco argument escaping (#1060)

2020-02-10 Thread Michael Schroeder
@mlschroe pushed 3 commits. 69f083fe169487a95a0b9a4896dad88dcae4331d Add a ME_LITERAL macro flag that turns off body expansion 2c5a7c08acae96ab07ae7c6bcee39616f69f852f Add rpmPushMacroFlags function to allow the definition of literal macros 9c082dc030142eb068a8320ac91f7f106736dcbb Use

Re: [Rpm-maint] [rpm-software-management/rpm] A saner way for marco argument escaping (#1060)

2020-02-10 Thread Panu Matilainen
This leaves __file_name and __file_lineno expansion inconsistent. Please move that commit last, and update the __file_name/lineno manipulation in build/ to use literals too. Other than that I guess this is good to go. -- You are receiving this because you are subscribed to this thread. Reply

Re: [Rpm-maint] [rpm-software-management/rpm] A saner way for marco argument escaping (#1060)

2020-02-07 Thread Panu Matilainen
Anyway, looks fine to me on the outset. I'll have a closer look next week. -- 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] A saner way for marco argument escaping (#1060)

2020-02-07 Thread Panu Matilainen
FWIW, tested a bit with the macro generator thing - even after all this noexpand stuff, the %{basename:%{1}} testcase still ends up eating %'s in due to the re-expansion in doFoo(). -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on

Re: [Rpm-maint] [rpm-software-management/rpm] A saner way for marco argument escaping (#1060)

2020-02-07 Thread Michael Schroeder
@mlschroe pushed 1 commit. 42b61f94e8ae14f484184984246d7ea84ae1bf20 Add rpmPushMacroFlags function to allow the definition of literal macros -- You are receiving this because you are subscribed to this thread. View it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] A saner way for marco argument escaping (#1060)

2020-02-07 Thread Panu Matilainen
> We also may want to expose this by adding a rpmPushMacroLiteral() function Lets use a more generic name that takes a flags arguments so it's extensible in the future (for example a readonly/protected kind of behavior would come in handy occasionally). Another approach that wouldn't require a

Re: [Rpm-maint] [rpm-software-management/rpm] A saner way for marco argument escaping (#1060)

2020-02-07 Thread Michael Schroeder
Another good name would be `ME_LITERAL`. We also may want to expose this by adding a rpmPushMacroLiteral() function so that this can be used in other places where we don't want expansion to happen. E.g. everywhere where we have calculated a file name or path and want to set a macro for it. --

[Rpm-maint] [rpm-software-management/rpm] A saner way for marco argument escaping (#1060)

2020-02-07 Thread Michael Schroeder
This adds a ME_NOEXPAND macro flag that turns off body expansion. This is much simpler than the weird % character doubling. Its also a bit faster because theres less calls to expandMacro(). You can view, comment on, or merge this pull request online at: