RPM Community Forums

Mailing List Message of <rpm-users>

Re: Errors - API for rpm

From: Jeff Johnson <n3npq@mac.com>
Date: Fri 18 Sep 2009 - 14:42:29 CEST
Message-id: <A48C9CA9-5FDC-4FF9-A4DF-12A4B89A2E28@mac.com>

On Sep 18, 2009, at 5:36 AM, Manoj Palhade wrote:

>
> Hi,
>
> I am trying to implement sample program mentioned in “Maximum RPM”. My
> understanding is that this content is not update with current version
> of RPM source code.
>
>

The examples  in "Maximum RPM" won't compile with any version
of RPM released in the last 5-6 years. The examples were written in  
1997,
lots has changed since.

> 1.      In sample program I am getting following error.
>
> undefined reference to `headerDump'
> undefined reference to `headerFreeIterator'
> undefined reference to `headerGetEntry'
> undefined reference to `headerInitIterator'
> undefined reference to `headerNextIterator'
> undefined reference to `rpmFreeSignature'
> undefined reference to `rpmReadPackageInfo'
>
>

If you post the source I can ttry to rewrite o the current @rpm5.org  
API.
> 2.      Also As mentioned in “Maximum RPM”; I included rpmlib.h but  
> not
> able to find header.h.
>
>

Yes. Most of what used to be in header.h has moved to <rpmdb/rpmtag.h>.

But rpmReadPackageFile() is likely what you are looking for.

73 de Jeff
Received on Fri Sep 18 14:42:49 2009
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.