GConf2 scriptlets (was: Re: Fedora 17 updates-testing report)

Michael Schwendt mschwendt at gmail.com
Sun Mar 10 22:00:10 UTC 2013


> It seems I'm not up-to-date with regard to the %pre and %post scriptlets
> for GConf: https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#GConf
> 
> Why does %post uninstall the new .schemas file? Shouldn't it use the
> old copy from the previous package release that was saved in %pre in
> /var/lib/rpm-state/gconf?

What I mean is the following. Why isn't it done like that?

--- /root/macros.gconf2	2013-03-10 22:53:28.020445325 +0100
+++ /etc/rpm/macros.gconf2	2013-03-10 22:57:59.788726367 +0100
@@ -73,8 +73,8 @@
     if test -f %{_localstatedir}/lib/rpm-state/gconf/"$schema".schemas ; then \
         cmp --quiet %{_sysconfdir}/gconf/schemas/"$schema".schemas %{_localstatedir}/lib/rpm-state/gconf/"$schema".schemas \
         if test $? != 0; then\
-            %_do_gconf_schema_remove \
             export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` \
+            gconftool-2 --makefile-uninstall-rule %{_localstatedir}/lib/rpm-state/gconf/"$schema".schemas > /dev/null || : \
             gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/"$schema".schemas > /dev/null || : \
         fi \
         rm -f %{_localstatedir}/lib/rpm-state/gconf/"$schema".schemas \


More information about the test mailing list