<html><body><div style="font-family: times new roman, new york, times, serif; font-size: 12pt; color: #000000"><div>This behaviour was changed in this commit [1] and the commit message says<br>"Supposedly no functional changes here.". So it seems this wasn't done<br>intentionally. And yes using %pre/%preun to fail an install/uninstall is a </div><div>really bad idea.<br><br>Lubos<br><br></div><div>[1] https://github.com/rpm-software-management/rpm/commit/f4a49c3d446bb180ca6b30a4337065fb6511e641<br></div><div><br></div><hr id="zwchr"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>From: </b>"Jerrold Heyman" <Jerrold.Heyman@emc.com><br><b>To: </b>"General discussion about the RPM package manager" <rpm-list@lists.rpm.org><br><b>Sent: </b>Thursday, February 18, 2016 11:16:09 PM<br><b>Subject: </b>RE: %preun clarification<br><div><br></div>



<style><!--

@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}

p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>


<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">I previously wrote the below, and wanted to add that I have since tested on a newer version of Mageia, version 4.</span></p>
<p class="MsoNormal"><span style="color:#1F497D">It makes use of rpm version 4.11.1 and has the same behavior as 4.11.0.1</span></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="color:#1F497D">Does this mean that is the new behavior? Or is Mageia 4 broken as Mageia 3 is?</span></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="color:#1F497D">jerry</span></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="color:#1F497D">Earlier today (2016/02/18), Jerry Heyman
<a href="mailto:Jerrold.Heyman@emc.com" target="_blank">Jerrold.Heyman@emc.com</a> wrote:</span></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span></p>
<p class="MsoNormal">A quick scan of the archives leaves me confused about %preun sciptlets returning error (non-zero). 
</p>
<p class="MsoNormal">There is a thread that says using %pre to fail an install/uninstall is a bad idea.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">I have been requested fail the removal of an RPM if the binary that was installed is currently an active process.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">I’ve written a %preun scriptlet that returns non-zero if the binary is actively running.</p>
<p class="MsoNormal">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.</p>
<p class="MsoNormal">On Mageia 3 (rpm version 4.11.0.1), the non-zero return code appears to be ignored and the rpm is removed (files and rpmdb updated).</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Was there a change somewhere between 4.8 -> 4.11.0.1 that permanently altered the behavior or is it just a bug in 4.11.0.1?</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Jerry Heyman                           |</p>
<p class="MsoNormal">Principal Software Engineer            |    Software is the difference</p>
<p class="MsoNormal">EMC Data Domain                        |    between hardware and reality</p>
<p class="MsoNormal"><a href="mailto:Jerrold.Heyman@emc.com" target="_blank">Jerrold.Heyman@emc.com</a> / 919.597.7812  |</p>
<p class="MsoNormal"> </p>
</div>


<br>_______________________________________________<br>Rpm-list mailing list<br>Rpm-list@lists.rpm.org<br>http://lists.rpm.org/mailman/listinfo/rpm-list<br></blockquote><div><br></div></div></body></html>