RPM Community Forums

Mailing List Message of <rpm-users>

replacing a rpm which has a preventing measure in its preun section

From: Oguz Yilmaz <oguzyilmazlist@gmail.com>
Date: Sat 13 Nov 2010 - 09:45:56 CET
Message-ID: <AANLkTik4J2TNSZt9eeyBUgYhQKf-3cW3_Wbwtwu=YW2-@mail.gmail.com>
Hi,

I have a rpm named deployment which has a preun section like:

preuninstall scriptlet (using /bin/sh):
echo "You should not uninstall this package"
exit 1;

I have another rpm named "installrpm" which should replace "deployment"

A- I have added

Provides: deployment
Obsoletes: deployment

linesi n "installrpm" spec file.

However, because of the preun lines, installrpm can not replace deployment.


B- I have tried to remove deplyment by hand in the post section of
"installrpm".

%post
rpm -q deployment 2>&1 > /dev/null
if [ $? -eq 0 ]; then
        rpm -ev deployment --nodeps --noscripts
fi

However this time, rpm db lock can not be obtained by inner "rpm -ev
deployment --nodeps --noscripts" command.

I have to put "installrpm" into a repository. So it should be working
without manual intervention.

Do you have any recommendation?

Regards,

--
Oguz YILMAZ
Received on Sat Nov 13 09:52:24 2010
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.