hi

i have developed one small program for generating software list using rpmlib library.
i have to collect name, path, product key and version of the software, in this i am able to collect software name and its version.

But how to collect product key and path of the software on which it is installed.. plz help me out from this..

i have to collect the following information (in pink color) from rpm history. plz help me.


[root@RHEL ownyit-1.0]# rpm -q --info gcc
Name : gcc Relocations: (not relocatable)
Version : 3.4.6 Vendor: Red Hat, Inc.
Release : 3 Build Date: Wed 24 May 2006 05:02:18 AM IST
Install Date: Wed 28 Feb 2007 01:42:10 PM IST Build Host: hs20-bc1-5.build.redhat.com
Group : Development/Languages Source RPM: gcc-3.4.6-3.src.rpm
Size : 13015848 License: GPL
Signature : DSA/SHA1, Sat 10 Jun 2006 12:41:39 AM IST, Key ID 219180cddb42a60e
Packager : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
URL : http://gcc.gnu.org
Summary : The GNU cc and gcc C compilers.
Description :
The gcc package includes the cc and gcc GNU compilers for compiling C
code.