[Rpm-maint] rpm tag query and headerSprintf

Vento Neicapelli lascoscazzato at hotmail.com
Fri Dec 14 21:32:00 UTC 2007


Thank you again Michael,

Regards,

Vento

> Date: Fri, 14 Dec 2007 21:03:42 +0100
> From: mls at suse.de
> To: lascoscazzato at hotmail.com
> CC: rpm-maint at lists.dulug.duke.edu
> Subject: Re: [Rpm-maint] rpm tag query and headerSprintf
> 
> On Fri, Dec 14, 2007 at 07:27:34PM +0000, Vento Neicapelli wrote:
> > 
> > the citation disappear...(due to hotmail...) 
> > _he said about db opening_:
> > 
> > "
> > You likely do _NOT_ want to open a rpmdb directly.
> > 
> > Instead see Chapter 15 of "The RedHat RPM Guide" at
> > 
> >     
> > http://docs.fedoraproject.org/drafts/rpm-guide-en/ch-programming-c.html
> > 
> > (aside) Hmmm, the example code I sent to Eric Foster-Johnson yearsago seems not to have survived editing by Eric or Fedora or ...
> > 
> > "
> 
> Maybe you should use rpmts instead:
> 
>     ts = rpmtsCreate();
>     rc = rpmtsOpenDB(ts, O_RDONLY);
>     mi = rpmtsInitIterator(ts, RPMTAG_NAME, pkgName, 0);
>     while((h = rpmdbNextIterator(mi) ) !=NULL) {
>       ...
>     }
>     rpmtsCloseDB(ts);
>     ts = rpmtsFree(ts);
> 
> Cheers,
>   Michael.
> 
> -- 
> Michael Schroeder                                   mls at suse.de
> SUSE LINUX Products GmbH, GF Markus Rex, HRB 16746 AG Nuernberg
> main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);}

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rpm.org/pipermail/rpm-maint/attachments/20071214/5d804f50/attachment-0001.htm 


More information about the Rpm-maint mailing list