RPM Community Forums

Mailing List Message of <rpm-devel>

Re: Extending header extension tag syntax.

From: Jeff Johnson <n3npq@mac.com>
Date: Fri 09 May 2008 - 14:05:24 CEST
Message-Id: <5E8BE5FF-8700-4E6A-95AB-48447243F788@mac.com>

On May 9, 2008, at 1:20 AM, Ralf S. Engelschall wrote:

> On Thu, May 08, 2008, Jeff Johnson wrote:
>
>> [...]
>> So any ideas about syntax? Off the top of my head, maybe
>>     :foo(fooarg1,fooarg2):bar(bararg)
>> L->R (or R->L, it really doesn't matter yet) serial application
>> of parameterized header extensions.
>> [...]
>
> I think the ":foo(fooarg1,fooarg2):bar(bararg)" syntax plus a left to
> right ("foo", then "bar") execution of the transformation makes both
> sense and would be a good thing. Additionally, the transformator "foo"
> should be searched both in an internal table of C-coded transformators
> and as a Lua function so that one can easily hook into the processing.
>

todo++

Two questions:

1) "... the transformator "foo" ..."
      In the example I gave did you mean specifically that the  
initial "foo" should be handled differently
      than the final "bar". Presumably the "foo" as used by both of  
us has a different contextual
      meaning and all the tokens should be handled identically with a  
lua function overloading.

2) implicit vs explicit Lua header tag/format extensions.
      By explicit, I mean that I'd do something like
	...:lua(function,arg1,arg2)
      because its easier to code up. But implictly overloading all  
the tokens
      as possible lua function names could be done, is certainly  
prettier even if
      slightly harder coding.
      is :lua(funcion,arg1,arg2) gud enuf initially?

Since I'm gonna be messing with the --queryformat parser, I'm likely  
going
to also see if I can't get syntax for a selector-by-value on tag  
contents, something
like perl's "~=" like
     --qf '%{tag~=/pattern/:foo:bar}
at the same time.

73 de Jeff
Received on Fri May 9 14:06:52 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.