RPM library function for SLES 10Sp2
pmatilai at laiskiainen.org
Wed May 6 08:59:38 UTC 2009
On Tue, 5 May 2009, shruthi srinivasalu wrote:
> I am a working software professional and I wanted to use rpm library
> API's for my development. I did install the latest 4.7.0 rpm lib source
> code, but I didnt get the exact api that I am looking for. The API that i
> want to use is
> #include <rpm/rpmlib.h>
> int rpmInstallPackage(char * rootdir,
> rpmdb db,
> int fd,
> char * prefix,
> int flags,
> rpmNotifyFunction notify,
> char * labelFormat,
> char * netsharedPath);
> But the rpmlib.h header file in 4.7.0 version does not provide this. Can
> anyone help me out in finding the exact version which provides me this
rpmInstallPackage() is rpm-3.x era API, you wont find it in any remotely
recent rpm version.
Also since you're working on SLES 10 you dont want to be looking at rpm
4.7.0 sources but rpm 4.4.2 which is what SLES 10 comes with, the API is
considerably different in places.
> Basically I am looking for a API which can do the "rpm --install
> <file.rpm>" command implementation.
You either want rpmInstall() (see rpmcli.h) or, depending on how much
control you need, the "lower level" transaction API (see rpmts.h). For the
latter, see http://laiskiainen.org/rpm/examples/ for some examples on how
to use it.
- Panu -
More information about the Rpm-list