[Rpm-maint] [PATCH] Check for undefined macros

Panu Matilainen pmatilai at laiskiainen.org
Fri Feb 15 17:00:24 UTC 2013


On 02/15/2013 11:59 AM, Panu Matilainen wrote:
> On 01/27/2013 07:27 AM, Alexey Tourbin wrote:
>> +char * rpmExpandMacros    (rpmMacroContext mc, const char *src,
>> +                const char *fileName, int lineNum,
>> +                void undefined(const char *fileName, int lineNum,
>> +                    const char *s, const char *f, const char *fe,
>> +                    const char *exp, int level, void *arg),
>> +                void *arg);
>
> Eek :) This is quite an argument monster for a public API function. Most
> of it is of course actually for the undefined() callback, and could be
> hidden behind a typedef to make it less scary-looking and to require
> less arguments for common uses - I'm basically shopping for something
> that could nicely replace many uses of rpmExpand(), see below. Haven't
> looked in detail how feasible (or not) these would be in practise but
> some ideas / thoughts:

<lengthy braindump on future macro API aspirations deleted>

...and then there's the entirely feasible option of simply punting the 
issue 'till some later time by making the new rpmExpandMacros() 
non-public for now. It can't have hidden visibility since librpmbuild 
needs to be able to call it, but it certainly wouldn't be the first (nor 
the last I suspect) function in librpm* whose prototype is only 
available within the rpm source tree despite technically being exported 
in the library ABI.

	- Panu -


More information about the Rpm-maint mailing list