Hallo.

Because many people asks, I am trying to explain problems with gconf
scriptlets in detail. After installation of any package with gconf
schemas, one needs to update gconf database.

It's easy to do it. Much more complicated situation occurs, when you
want to upgrade any application - you need to remove obsolete keys, but
not remove the new ones.

With older versions of RPM, it was not possible at all, so we installed
schemas and kept them forever. Now it is possible, so I created a new
implementation.

It is be available in openSUSE 10.3 and in GNOME:UNSTABLE.

As a bonus, macros also create schemas part of file list for you - it
could not happen, that you forget to install any schemas file (which can
cause an application crash).


Here is a simple howto. It also contains some common tricks you will
need in packages:


Preamble (i. e. initial set of lines; put it as last command, automatic
spec formatters used by SuSE are not able to read lines after it):
%gconf_schemas_prereq

%install
...
%find_gconf_schemas
or
%def_gconf_schemas subpackage1
%add_gconf_schemas schemas_name1
%add_gconf_schemas schemas_name2
%def_gconf_schemas subpackage2
%add_gconf_schemas schemas_name3
%add_gconf_schemas schemas_name4
%end_gconf_schemas
schemas names are without path and suffix

%pre -f %{name}.schemas_pre

%preun -f %{name}.schemas_preun

%posttrans -f %{name}.schemas_posttrans

%files -f %{name}.schemas_list
or
%files -f subpackage.schemas_list

You don't have to list schemas files in the file list, it is done
automatically for you.


In case of more -f needed for one %files:

%install
...
%find_gconf_schemas
%find_lang %{name}
cat %{name}.schemas_list %{name}.lang >%{name}.lst

%files -f %{name}.lst

-- 
Best Regards / S pozdravem,

Stanislav Brabec
software developer
---------------------------------------------------------------------
SUSE LINUX, s. r. o.                          e-mail: [EMAIL PROTECTED]
Lihovarská 1060/12                            tel: +420 284 028 966
190 00 Praha 9                                fax: +420 284 028 951
Czech Republic                                http://www.suse.cz/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to