Google
  Web www.spinics.net

Re: Upgrade scriptlet

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On 04/17/2011 10:12 AM, Michael Schwendt wrote:
> On Sat, 16 Apr 2011 11:11:28 +0200, TM wrote:
> 
>> Hi,
>>
>> when I want a script to be run during package upgrade, is it better to
>> call it in %postun if $1>=1, or to call it in
>> %post if $1>1? Is one of the two possibilities preferred?
> 
> It depends on what the script is supposed to do and whether files from the
> old pkg are still around and may be needed by the script/program or may
> confuse the script/program. When %postun is executed, any old pkg files
> have been removed already.

One important additional consideration is that when using %post, you can
control what happens in your new package.  With %postun, it's the old
package's %postun that runs on upgrades, which could be a problem and
something that can be hard to work around in the new package.  One
example of such a problem from this list yesterday:

http://lists.fedoraproject.org/pipermail/packaging/2011-April/007744.html
--
packaging mailing list
packaging@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/packaging


[Home]     [Fedora Legacy]     [Fedora Desktop]     [Red Hat 9 Bible]     [Fedora Bible]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

Powered by Linux

Google
  Web www.spinics.net