rawhide report: 20061109 changes

Tomasz Kłoczko kloczek at zie.pg.gda.pl
Thu Nov 9 21:48:01 UTC 2006


Dnia 09-11-2006, czw o godzinie 22:20 +0100, Michael Schwendt
napisał(a):
[..]
> > It do not produces xml files with empty trees in $GCONF_CONFIG_SOURCE
> > directory. Is it correct ? (IMO not)
> > Probably --makefile-{,un}install-rule switches are not fully symmetric.
> 
> They are.

So what are doing all not removed keys from this xml files ?
Example from my /etc/gconf/gconf.xml.defaults/%%gconf-tree-af.xml:

<?xml version="1.0"?>
<gconf>
        <dir name="schemas">
                <dir name="apps">
                        <dir name="nautilus">
                                <dir name="preferences">
                                        <entry
name="show_special_flags">
                                                <local_schema
short_desc="Aktiveer 'spesiale' vlaggies in lêervoorkeurdialo
og">
                                                        <longdesc>Indien
waar, sal Nautilus jou toelaat om van die meer esoteriese lê
eropsies van 'n lêer in die lêervoorkeurdiaaloog laat
verander.</longdesc>
                                                </local_schema>
                                        </entry>
                                </dir>
                        </dir>
                        <dir name="gnome_settings_daemon">
                                <dir name="keybindings">
                                        <entry name="brightness_up">
                                                <local_schema
short_desc="Helderheid-op">

<longdesc>Helderheid-op se kortpad.</longdesc>
                                                </local_schema>
                                        </entry>
                                        <entry name="brightness_down">
                                                <local_schema
short_desc="Helderheid-af">

<longdesc>Helderheid-af se kortpad.</longdesc>
                                                </local_schema>
                                        </entry>
                                </dir>
                        </dir>
                </dir>
        </dir>
</gconf>

> Still I'm confused as what you try to accomplish. If your %postun does not
> evaluate $1 properly, your old package's %postun script is executed last
> and reverts changes your new package needs.
> 
> The following page covers this,
> 
>   http://fedoraproject.org/wiki/Packaging/ScriptletSnippets
> 
> and also suggests a work-around for package upgrades where you want
> to remove old schema files, which are obsolete.

		install 	upgrade 	uninstall 

%pre 		$1 == 1		$1 == 2		-- 
%post 		$1 == 1		$1 == 2		-- 
%preun 		--		$1 == 1 	$1 == 0 
%postun 	--		$1 == 1		$1 == 0 

If you want replace register/unregister subset schemas by reinstall all
files you need hook only in %post and %postun .. *unconditionaly*. No
matter is it first install, upgrade or uninstall.

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.

kloczek





More information about the fedora-devel-list mailing list