Modifying database

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear all , 
	here is a problem I am stuck with.
Problem statement:
1. The guy working on this project before me created a non relocatable
rpm ( say faulty-1.0.0-55.i686.rpm )which stores its shared libs and
executables in say /opt/Product/binaries
2. In the postun , he added 
	if [ -d /opt/Product/binaries] ;then 
		rm -rf /opt/Product/binaries
	fi
3. This rpm was shipped and went to our customers
4. I now need to release an upgrade( say faulty-1.0.0-85.i686.rpm)
	The way upgrade will work (roughly ) is ( from what ever little
I know)
	a. run the install for the new rpm ( pre post etc)
	b. run the uninstall for the older rpm ( preun, postun )
	Step a above will copy the new binaries to /opt/Product/binaries
	Step b ,with the rpm  which is already shipped and in use , will
delete this directory and render my product useless

How to solve this:
My idea (conceptual and hypothetical ):
1. Create a patch executable/rpm( whatever )  which interacts with the
rpm database , 
2. This patch 	
	a. Creates an entry say faulty-patch in the rpm db
	b. Removes the offending postun of the older rpm
3. Next upgrade package released by us will have a dependency on the
patch

Looking up rpmlib , I could not find apis which let me selectively
modify/edit records. I looked up maximum rpm , but could not get much
other than how to traverse the db

Questions:
1. Anyone has a better solution ?
2. Anyone with rpm api expertise give me hints on the correct apis ( if
there are any that can do what I want ) ?

Regards

	


_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux