RE: Querying RPM database in a RPM preinstall script

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

 



Title: RE: Querying RPM database in a RPM preinstall script


-----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


[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