%preun clarification

Lubos Kardos lkardos at redhat.com
Tue Mar 1 13:35:52 UTC 2016

This behaviour was changed in this commit [1] and the commit message says 
"Supposedly no functional changes here.". So it seems this wasn't done 
intentionally. And yes using %pre/%preun to fail an install/uninstall is a 
really bad idea. 


[1] https://github.com/rpm-software-management/rpm/commit/f4a49c3d446bb180ca6b30a4337065fb6511e641 

----- Original Message -----

> From: "Jerrold Heyman" <Jerrold.Heyman at emc.com>
> To: "General discussion about the RPM package manager"
> <rpm-list at lists.rpm.org>
> Sent: Thursday, February 18, 2016 11:16:09 PM
> Subject: RE: %preun clarification

> I previously wrote the below, and wanted to add that I have since tested on a
> newer version of Mageia, version 4.

> It makes use of rpm version 4.11.1 and has the same behavior as

> Does this mean that is the new behavior? Or is Mageia 4 broken as Mageia 3
> is?

> jerry

> Earlier today (2016/02/18), Jerry Heyman Jerrold.Heyman at emc.com wrote:

> A quick scan of the archives leaves me confused about %preun sciptlets
> returning error (non-zero).

> There is a thread that says using %pre to fail an install/uninstall is a bad
> idea.

> I have been requested fail the removal of an RPM if the binary that was
> installed is currently an active process.

> I’ve written a %preun scriptlet that returns non-zero if the binary is
> actively running.

> On CentOS 6.7 (rpm version 4.8.0) I get the expected behavior. When the
> scriptlet returns non-zero, the removal is terminated and no change to the
> rpmdb.

> On Mageia 3 (rpm version, the non-zero return code appears to be
> ignored and the rpm is removed (files and rpmdb updated).

> Was there a change somewhere between 4.8 -> that permanently altered
> the behavior or is it just a bug in

> Jerry Heyman |

> Principal Software Engineer | Software is the difference

> EMC Data Domain | between hardware and reality

> Jerrold.Heyman at emc.com / 919.597.7812 |

> _______________________________________________
> Rpm-list mailing list
> Rpm-list at lists.rpm.org
> http://lists.rpm.org/mailman/listinfo/rpm-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-list/attachments/20160301/479c855d/attachment.html>

More information about the Rpm-list mailing list