Hi,
(sorry for the late respone:/ ).
On 2006-12-12 14:28:53 +0100, Marcus Rueckert wrote:
> On 2006-12-12 14:04:25 +0100, Michal Marek wrote:
> > > %postun
> > > # remove the package from the pear-packagemanager
> > > pear uninstall --nodeps --register-only PACKAGE
> >
> > I'd wrap it with 'if test -x /usr/bin/pear; then ... fi', because rpm
> > doesn't implement ordering of packages during uninstallation.
>
> i think a "Requires: php5-pear" should makre sure that php5-pear is
> uninstalled after the pear modules.
>
No that doesn't work:
linux:~ # rpm -ihv /home/marcus/packages/RPMS/i586/test2-1.2.3-0.i586.rpm
Preparing... ########################################### [100%]
1:test2 ########################################### [100%]
linux:~ # rpm -ihv /home/marcus/packages/RPMS/i586/test-1.2.3-0.i586.rpm
Preparing... ###########################################
[100%]
1:test ########################################### [100%]
linux:~ # rpm -qR test
test2
/bin/sh
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(PayloadIsBzip2) <= 3.0.5-1
linux:~ # rpm -e test2
error: Failed dependencies:
test2 is needed by (installed) test-1.2.3-0.i586
linux:~ # rpm -ql test2
/usr/bin/test-script
linux:~ # rpm -e test2 test
/var/tmp/rpm-tmp.36822: line 1: /usr/bin/test-script: No such file or directory
error: %postun(test-1.2.3-0.i586) scriptlet failed, exit status 127
linux:~ # rpm -q test test2
test-1.2.3-0
package test2 is not installed
linux:~ #
So it's the best to use an if-check around the %postun section.
> > > But this maybe leads to some problems too.
> > > One possible problem could be that the user removes the pear-package via
> > > the
> > > pear commandline tool but the package still exists in the rpm database..?!
> >
> > I think this is a generic problem, it would be interesting to see
> > how/whether is it solved in cpan or gems. Darix, Anicka, are you there? ;-)
>
> i have the similar problem with my rubygem-* rpms. i thought about
> hacking the cmdline tool to check if the module was installed via rpm
> and error out in this case. so far i didnt find time to implement it.
>
How do you want to find out if the module was installed via rpm or via the
commandline tool?
Marcus
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]