[Rpm-maint] Programming RPM with C

Panu Matilainen pmatilai at redhat.com
Thu Aug 2 09:03:11 UTC 2007


On Wed, 25 Jul 2007, Fernando Valente Kakimoto wrote:

> Hello,
>
> I'm a brazilian graduating student and I started developing a C program that
> makes use of RPM Package Manager.
> At really, I have to know what packages are up-to-date in the computer that my
> application is running. Using rpmlib, I can look for all installed packages
> name, version and release, but I can't find yet if the package is upgradable.
> Somebody has some code example that can help me?

How exactly would rpm know if an updated package is available somewhere 
on the net or otherwise? You need plenty of other infrastructure for that, 
for example see what yum, smart and apt-rpm do. Apt-rpm is in C++ while 
the other two are in python so it might be closest to you, just beware -
apt-rpm code is not exactly easy afternoon passtime reading :)

 	- Panu -





More information about the Rpm-maint mailing list