Re: [Rpm-maint] [rpm-software-management/rpm] Unify builtin and user-defined parametric macro calling syntax (#1434)

2020-11-26 Thread Panu Matilainen
Merged #1434 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/1434#event-4041765581___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Unify builtin and user-defined parametric macro calling syntax (#1434)

2020-11-26 Thread Panu Matilainen
Okay, "parse" macros down to three...

-- 
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/1434#issuecomment-734157025___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Unify builtin and user-defined parametric macro calling syntax (#1434)

2020-11-26 Thread Panu Matilainen
@pmatilai pushed 2 commits.

fe6b5004a420385792973000b18509608b7c6b0f  Change %undefine macro to "func" 
style now that we can
71363c798f1d4748ef17bb9824a78bd3dc58f683  Change %dump macro to "func" style 
now that we can


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1434/files/e981e1b79515fb8cd7e28be2e5ee21e750bb2d14..71363c798f1d4748ef17bb9824a78bd3dc58f683
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Unify builtin and user-defined parametric macro calling syntax (#1434)

2020-11-26 Thread Panu Matilainen
Oh, I totally agree on the "parse" type and related API being weird, annoying 
and limiting.
So I do plan to address/fix at least some of this if only because #1419 needs a 
sane define/undefine API with error checking (and would certainly gladly accept 
patches to that effect too ;) 

So the state of things here is basically just an intermediate (but necessary) 
step on the road to nicer stuff, guess that wasn't too clear on the description.

-- 
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/1434#issuecomment-734117054___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Unify builtin and user-defined parametric macro calling syntax (#1434)

2020-11-25 Thread Michael Schroeder
The handling of "parse" type builtins is kind of weird. I would prefer to have 
the parsing outside of doExpandThisMacro() so that I can set args to [ "foo", 
"bar" ] and expand the %define macro to do a `%define foo bar`

We only have 5 builtin macros that are "parse" type: define, global, undefine, 
dnl, dump
So this doesn't matter much and splitting the parsing from the processing is 
probably not worth the hassle. (Btw, the parsing of the undefine and dump 
macros is quite weird.)

With other words: Ok from my side. Feel free to ignore my ramblings ;-)

-- 
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/1434#issuecomment-733977053___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Unify builtin and user-defined parametric macro calling syntax (#1434)

2020-11-25 Thread Panu Matilainen
Updated for some subtle fixes and more testcases to showcase what's possible.

If there are no further comments/objections I'll hit merge tomorrowish.

-- 
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/1434#issuecomment-733685936___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Unify builtin and user-defined parametric macro calling syntax (#1434)

2020-11-13 Thread Panu Matilainen
@pmatilai pushed 1 commit.

4ff97742c5544cdfcc3e7ce932d40be7f027b277  Specify number of expected arguments 
for builtins in numbers


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1434/files/896978fede77ed91b58d7098e1d0bfba325070a8..4ff97742c5544cdfcc3e7ce932d40be7f027b277
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Unify builtin and user-defined parametric macro calling syntax (#1434)

2020-11-13 Thread Panu Matilainen
Uh, I don't know about that. Things would've been different with this and other 
recent changes certainly.

Added commits to unify the two builtin types internally too, gaining back type 
safety and pre-requisites for builtins accepting multiple arguments.

-- 
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/1434#issuecomment-726654552___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Unify builtin and user-defined parametric macro calling syntax (#1434)

2020-11-12 Thread Vít Ondruch
If I understand it correctly, having this 6 years ago, I would not need to 
[this](https://src.fedoraproject.org/rpms/ruby/c/8e2921fd5a3125b7c) change, 
right?

-- 
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/1434#issuecomment-726046576___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Unify builtin and user-defined parametric macro calling syntax (#1434)

2020-11-12 Thread Panu Matilainen
Besides just blurring the largely unnecessary boundary between builtins and 
user defined macros, this helps making everything equally accessible in #1419. 

-- 
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/1434#issuecomment-726004252___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


[Rpm-maint] [rpm-software-management/rpm] Unify builtin and user-defined parametric macro calling syntax (#1434)

2020-11-12 Thread Panu Matilainen
Accept both %{foo:arg} and %{foo arg} notation for both builtins
and user-defined parametric macros, the former only ever has one
argument whereas the latter can have multiple.

parse type builtins such as %define are trickier and only work with
traditional syntax for now.
You can view, comment on, or merge this pull request online at:

  https://github.com/rpm-software-management/rpm/pull/1434

-- Commit Summary --

  * Unify builtin and user-defined parametric macro calling syntax

-- File Changes --

M rpmio/macro.c (83)
M tests/rpmmacro.at (22)

-- Patch Links --

https://github.com/rpm-software-management/rpm/pull/1434.patch
https://github.com/rpm-software-management/rpm/pull/1434.diff

-- 
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/1434
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint