[Rpm-maint] arbitrary tag definition and use from the python interface
mls at suse.de
Fri Jul 13 17:46:24 UTC 2007
On Fri, Jul 13, 2007 at 01:35:19PM -0400, Peter Bowen wrote:
> On Fri, 2007-07-13 at 13:22 -0400, seth vidal wrote:
> > I was wondering how possible/doable it would be to support arbitrary tag
> > definition w/i an rpm.
> > so in the specfile I could do (for example)
> > TagDef: mytag
> > mytag: foovalue
> > Then that would get thrown into the rpm when built and when I open up
> > the header in rpm-python maybe I could do:
> > hdr.mytag
> > >>> 'foovalue'
> > How reasonable is that to consider for later versions of rpm?
> TagDef: MyTag 20003
> MyTag: foovalue
Please no, this makes no sense. Instead, you should reserve a Tag
range for private definitions and a Tag which holds the names.
E.g., lets say the range is >= 10000
would assign 10000 to MyTag, and put "MyTag" in the "TAG_PRIVATE"
If rpm/python/... would need to look up "MyTag", it would first
look up the index in the TAG_PRIVATE array, then add "10000" to
it to get the real tag number, and then do the real lookup.
Michael Schroeder mls at suse.de
SUSE LINUX Products GmbH, GF Markus Rex, HRB 16746 AG Nuernberg
More information about the Rpm-maint