Hi all,
We currently have an issue with multiple versions of a custom package being installed. The RPM contains a liquibase script (a Java-based DB change management tool) and a %post script to run liquibase.
We are installing with scripts that run "yum update liquibase-script".
If the %post script runs correctly, it returns 0 and the application gets installed correctly but, if the %post script fails, it returns -1 and the application does get installed, but the old one does not get unistalled, so if I run "rpm -qa | grep liquibase-script" I get a list of all the versions that have been installed.
I know that the files have been installed correctly, as the RPM contents have the same name but different content and I have checked it.
Why is this happening?
I thought that %post scripts failing do not prevent the application to installing and that RPM installation is atomic, so installing one package will remove the previous verison. Is there any way to prevent this issue?
We're using CentOS 5.4 on x86_64
Thanks
Gabriel
On 11/11/2010 13:47, Gabriel Tabares wrote:
Hi all,
We currently have an issue with multiple versions of a custom package being installed. The RPM contains a liquibase script (a Java-based DB change management tool) and a %post script to run liquibase.
We are installing with scripts that run "yum update liquibase-script".
If the %post script runs correctly, it returns 0 and the application gets installed correctly but, if the %post script fails, it returns -1 and the application does get installed, but the old one does not get unistalled, so if I run "rpm -qa | grep liquibase-script" I get a list of all the versions that have been installed.
I know that the files have been installed correctly, as the RPM contents have the same name but different content and I have checked it.
Why is this happening?
I thought that %post scripts failing do not prevent the application to installing and that RPM installation is atomic, so installing one package will remove the previous verison. Is there any way to prevent this issue?
We're using CentOS 5.4 on x86_64
Any suggestion, guys?
Thanks
Gabriel
Gabriel Tabares wrote, On 11/15/2010 08:05 AM:
On 11/11/2010 13:47, Gabriel Tabares wrote:
Hi all,
We currently have an issue with multiple versions of a custom package being installed. The RPM contains a liquibase script (a Java-based DB change management tool) and a %post script to run liquibase.
We are installing with scripts that run "yum update liquibase-script".
If the %post script runs correctly, it returns 0 and the application gets installed correctly but, if the %post script fails, it returns -1 and the application does get installed, but the old one does not get unistalled, so if I run "rpm -qa | grep liquibase-script" I get a list of all the versions that have been installed.
I know that the files have been installed correctly, as the RPM contents have the same name but different content and I have checked it.
Why is this happening?
I thought that %post scripts failing do not prevent the application to installing and that RPM installation is atomic, so installing one package will remove the previous verison. Is there any way to prevent this issue?
We're using CentOS 5.4 on x86_64
Any suggestion, guys?
Thanks
Gabriel
The fedora folks have a pretty thorough how to: http://fedoraproject.org/wiki/PackageMaintainers/CreatingPackageHowTo
And man package-cleanup
Hope this helps.