rawhide report: 20061109 changes

Toshio Kuratomi a.badger at gmail.com
Thu Nov 9 22:37:47 UTC 2006


On Thu, 2006-11-09 at 22:48 +0100, Tomasz Kłoczko wrote:
> BTW. I have small modification %post/%postun script template:
> 
> if [ -x %{_bindir}/gconftool-2 ]; then
>         export GCONF_CONFIG_SOURCE=`%{_bindir}/gconftool-2 --get-default-source`
>         rm -f $GCONF_CONFIG_SOURCE/*
>         %{_bindir}/gconftool-2 --makefile-install-rule /etc/gconf/schemas/*.schemas >& /dev/null
> fi
> 
> It will allow remove all "Requires(post,postun): GConf", "Prereq: GConf"
> or Requires(post,postun): /usr/bin/gconftool-2 rules.

For the general case of making a Requires(post) optional you need to
make sure that the package that you are making optional invokes its
update program when it installs.  For instance:

  Use this when a package drops an XML file in
  %{_datadir}/mime/packages. 

    %post
    update-mime-database %{_datadir}/mime &> /dev/null || :

  $ rpm -q --scripts shared-mime-info
  postinstall scriptlet (using /bin/sh):
  /usr/bin/update-mime-database /usr/share/mime &> /dev/null

For the specific case of gconf schemas, you don't gain much by making
this optional.  The program itself depends on GConf2 so you have to pull
it in for the program whether or not the scriptlet depends on it.  This
in contrast to gtk-update-icon-cache for kde apps and
update-mime-database where the program can run fine without installing
gtk2 or shared-mime-info.

-Toshio
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://listman.redhat.com/archives/fedora-devel-list/attachments/20061109/1403a211/attachment.sig>


More information about the fedora-devel-list mailing list