[Rpm-maint] [PATCH] Export rpmExpand to python bindings

Panu Matilainen pmatilai at redhat.com
Tue Aug 14 07:23:41 UTC 2007


On Mon, 13 Aug 2007, Jeremy Katz wrote:

> There are a number of cases where you might want to be able to determine
> the value of a macro from the python bindings.  The attached patch adds
> an rpm.expandMacro method.
>
> Specific use case this time is to get the value of %_i18ndomains so that
> we can properly translate package summaries and descriptions out of
> specspo from yum/pirut.  But I've wanted it a few other times in the
> past too.

Yup, always puzzled me why there is no way to expand macros from 
rpm-python and was going to add this sooner or later, thanks.

While at it, maybe we should consider exposing some of the other macro 
functions to python as well, rpmGetPath() might be useful in some cases.

 	- Panu -




More information about the Rpm-maint mailing list