On Thu, 2005-02-24 at 12:44, sudhakar+rpm@xxxxxxxxxxxxxxxx wrote: > Hi all, > > I am a newbie to rpm internals. I will be glad if someone could > help me with a problem I am facing. > > > > There is a program I am using which looks at RPM version number > and compares it against a database to see if the RPM version has a > security bug. The program uses the following calls: > > rpmReadConfigFiles > rpmtsCreate > rpmtsInitIterator > rpmdbNextIterator > readHeaderInt32 > readHeaderString > rpmdbFreeIterator > rpmtsFree > headerGetEntry > rpmvercmp > > > If I want to analyse machine A, I want to take its /var/lib/rpm/ to a > different machine B and run the program there. Now, the directory > /var/lib/rpm/ is 118M on my machine. So it is infeasible for me to > transfer the files. Hence, I want to only export those parts of the > database that are needed for these calls. I am guessing that the relavant > dataset is small and hence more easily manageable. > Unless you're wedded to doing this in C it would probably be easier to do it using the RPM bindings for python. http://people.redhat.com/pnasrat/rpm-python/rpm-python-slides/frames.html Use rpm-python on machine A to dump out the subset of info that you need and move it to Machine B. There are lots of ways to do this but those are python questions not rpm questions. The source to yum can be enlightening. HTH, Huw -- | Huw Lynes | The Moving Picture Company | | System Administrator | 127 Wardour Street | |.........................| London, W1F 0NL | _______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/rpm-list