[Rpm-maint] Problems with %Requires(preun):
scottb at xandros.com
Tue Dec 11 16:18:08 UTC 2007
I have a number of RPM's that use the declaration:
Requires(preun): <package name>
Requires(postun): <package name>
I was expecting this to keep <package name> around until it after the
pre/post uninstall script for the package has executed. However this
does not seem to be the case all the time. I've been testing this on
RHEL 5.1 using rpm 4.4.2.
For example I have a package dv-bw-quickstart.rpm that contains in its
This package fails to uninstall, as the pre-uninstall script fails,
because it cannot find a script from dv-xdg-utils. The problem seems to
be that dv-xdg-utils has been removed before the post-uninstall script
in dv-bw-quickstart has been run.
Typically this is seen when I remove our product from the system in a
transaction with over 100 rpm's, but I have managed to reproduce this
behaviour with just: rpm -e dv-xdg-utils dv-bw-quickstart
Am I doing something wrong here? Do I have to add a the specific script
to get this to work correctly?
ie: Requires(postun): /opt/xandros/bin/xdg-desktop-menu for example
When researching this on the web I noticed there seems to be a bug with
the following construct in some versions of rpm:
Requires(postun): package1, package2
I have modified all my spec files so that each Requires line in a spec
file only references a single package. This didn't fix the problem.
More information about the Rpm-maint