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
Attachment:
signature.asc
Description: This is a digitally signed message part
-- fedora-devel-list mailing list fedora-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/fedora-devel-list