-----Original Message----- From: rpm-list-admin@xxxxxxxxxx [mailto:rpm-list-admin@xxxxxxxxxx] On Behalf Of Reznic Valery Sent: Thursday, January 08, 2004 11:11 AM To: rpm-list@xxxxxxxxxx Subject: RE: Querying RPM database in a RPM preinstall script Hi Valery: Thanks for the info. The reason I want to provide a patch RPM is that the application RPM is *huge* and we do not wish to redistribute the entire application RPM when only a small set of files needs to be patched. AFAIK, rpm's -U option will erase any files that were in an old version of a package but are no longer in the new version. Therefore, as far as I can tell, I'd have to redeliver every single file in the rpm package to change only the files that need to be patched. Walter -----Original Message----- From: Goulet Walter-CWG009 [mailto:Walter.Goulet@xxxxxxxxxxxx] Sent: Thursday, January 08, 2004 7:03 PM To: 'rpm-list@xxxxxxxxxx' Subject: Querying RPM database in a RPM preinstall script Hi: I'm wondering if anyone has any suggestions on how to query an existing RPM package from within the specfile (preinstall) script of another RPM package. My reason for doing this is that I want to patch an existing application binary RPM with another patch binary RPM. Since the patch RPM will have a different database entry than the existing application RPM, the patch RPM will not honor %config file directives in the original application RPM specifile. Therefore, the patch RPM should handle any config files in the application RPM manually. I wrote a simple preinstall script in the patch RPM to backup the application RPM config files, but when I attempt to query the application RPM through 'rpm -qa' from my preinstall script, RPM complains because there are 2 instances of RPM being executed. Is there another way to query the database? I really don't want to write a wrapper script to handle this but if that's the only way then I can explore that option. I'd much rather be able to only use 'rpm' commands for this. I'm using RPM v4.0.4 on Sun Solaris 9. More resent rpm version, ie 4.2 (may be 4.1 too) will allow it. By the way, why you want patch rpm A with rpm B instead of provide another version of rpm A ? Valery Thanks, Walter Goulet _______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/rpm-list _______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/rpm-list