FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Packaging

 
 
LinkBack Thread Tools
 
Old 05-20-2010, 02:37 PM
Richard Hughes
 
Default Adding a section on GSettingsSchema

As more applications convert from GConf to GSettings, Fedora packages
are going to need to deal with schema files.

At the moment in gnome-color-manager I use this:

%post
glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :

%postun
glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :

Although doing it for every single package seems like a waste of time.
Maybe posttrans would be better in this case? Anyway, I think we need
to sort out a policy and stick it on
https://fedoraproject.org/wiki/Packaging:ScriptletSnippets before
people start packaging applications that use GSettings schema files.

Let the discussion commence.

Thanks,

Richard.
--
packaging mailing list
packaging@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/packaging
 
Old 05-20-2010, 02:56 PM
Rex Dieter
 
Default Adding a section on GSettingsSchema

Richard Hughes wrote:
> As more applications convert from GConf to GSettings, Fedora packages
> are going to need to deal with schema files.
>
> At the moment in gnome-color-manager I use this:
>
> %post
> glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
>
> %postun
> glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
>
> Although doing it for every single package seems like a waste of time.
> Maybe posttrans would be better in this case? Anyway, I think we need
> to sort out a policy and stick it on
> https://fedoraproject.org/wiki/Packaging:ScriptletSnippets before
> people start packaging applications that use GSettings schema files.
>
> Let the discussion commence.

Thanks for the suggestions, I think %posttrans should be the way to go
in general for stuff like this (I've been meaning to make a similar
proposal to modify scriptletsnippets for update-desktop-database and
update-mime-database for awhile).

So, what that means, is using something like this instead:

%posttrans
glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :

%postun
if [ $1 -eq 0 ]; then
glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
fi

the main advantage of this approach is
* if these items were theoretically optimized (similar to
gtk-update-icon-cache is now) the batched commands would run and finish
faster

Need to be careful that %posttrans is suitable only for stuff that's not
needed for other (later) items in any install transaction (so, this
obviously wouldn't be good for stuff like ldconfig).

Anyway, given that, I've tried hard and failed to come up with any
disadvantages to moving this (and the other update-* items) to
%posttrans in general. Please do chime in, if I missed anything.

-- Rex
--
packaging mailing list
packaging@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/packaging
 

Thread Tools




All times are GMT. The time now is 04:34 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org