Add a fake rpm in database

Murilo Opsfelder muriloo at linux.vnet.ibm.com
Fri Nov 12 19:47:47 UTC 2010


Hi guys,

I'd like to know if it's possible to add a kind of fake rpm in rpm database.

I would provide all rpm headers, for instance, from a file and add these 
headers in rpm database. As if I was running "insert" commands in it.

I only need rpm name and version to be added in database.

It would be similar to this pseudo-python snippet:

params = {
	"name"    : "my_fake_rpm_name",
	"version" : "1.0",
	"release" : "1"
}
rpm.install(params)

Thus I could query rpm database and package would appear as a result:

$ rpm -q my_fake_rpm_name
my_fake_rpm_name-1.0-1

Any help is appreciated.
Thanks in advance.

-- 
Murilo


More information about the Rpm-list mailing list