[Fedora-packaging] Upgrade scriptlet

Toshio Kuratomi a.badger at gmail.com
Sat Apr 30 15:31:47 UTC 2011


On Sun, Apr 17, 2011 at 02:28:58PM +0200, Michael Schwendt wrote:
> On Sun, 17 Apr 2011 13:02:12 +0300, VS wrote:
> 
> > For example if you install foo.i686 first, then later foo.x86_64:
> > at the time foo.x86_64's %post runs, $1 will be 2 in it even if nothing
> > is actually being upgraded.
> 
> Doesn't that break arch-specific scripts like the following?
> https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#GIO_modules
> 
> | %postun
> | gio-querymodules-%{__isa_bits} %{_libdir}/gio/modules &> /dev/null || :
> |
> | %post
> | if [ $1 -eq 1 ] ; then
> |     # For upgrades, the cache will be regenerated by the new package's %postun
> |     gio-querymodules-%{__isa_bits} %{_libdir}/gio/modules || :
> | fi
> 
> %post for the x86_64 would not refresh the cache, because $1 -eq 1 is false.
> Is there a %postun call for the old pkg (i.e. the i686 pkg)? If so, that
> %postun would refresh the wrong cache due to %_libdir.
> Or is there no %postun call because the install is not an upgrade?
> Then the cache would not be refreshed at all for the x86_64 install.
>
Filed: https://fedorahosted.org/fpc/ticket/81

-Toshio
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
Url : http://lists.fedoraproject.org/pipermail/packaging/attachments/20110430/c82bef13/attachment.bin 


More information about the packaging mailing list