Re: formatting output in rpm-python?

seth vidal <skvidal-c/MNwgJ9CEH2fBVCVOL8/[email protected]> Sat, 17 Jan 2004 12:22:05 -0500
Newsgroups gmane.linux.redhat.rpm.python
Message-ID <1074360125.17373.23.camel@binkley>
On Sat, 2004-01-17 at 12:19, Armijn Hemel wrote:
> On Sat, Jan 17, 2004 at 11:40:58AM -0500, seth vidal wrote:
> 
> > > Right, I found the solution (and the `problem' more or less):
> > >   tmp = h.dsFromHeader('requirename')
> > >     for i in tmp:
> > >            print i
> > > 
> > > gives me tuples like
> > > ('textutils', '', 64)
> > > which is far more usable for me :)
> > 
> > What is the preference for using dsFromHeader() instead of grabbing
> > REQUIRENAME, REQUIREFLAGS and REQUIREVERSION and zipping them together
> > to make, more or less, the same set of things.
> > 
> > I guess I'm just trying to figure out which methods are the 'preferred
> > ones' and why they're preferred.
> 
> Simply because I didn't know. This is indeed clearer (not that much
> faster though). Now I just have to find out exactly what the numbers in
> the `REQUIREFLAGS' stand for. Anybody a clue about this?
> 

yep. :)

look at

http://devel.linux.duke.edu/cgi-bin/viewcvs.cgi/generate/dumpMetadata.py?rev=1.9&cvsroot=metadata&content-type=text/vnd.viewcvs-markup

class RpmMetaData._correctFlags()

You only need certain data of the flags.

-sv