Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Fedora Packaging (http://www.linux-archive.org/fedora-packaging/)
-   -   Adding a section on GSettingsSchema (http://www.linux-archive.org/fedora-packaging/373789-adding-section-gsettingsschema.html)

Richard Hughes 05-20-2010 03:13 PM

Adding a section on GSettingsSchema
 
On 20 May 2010 15:56, Rex Dieter <rdieter@math.unl.edu> wrote:
> 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
>

Works for me.

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

"Tom "spot" Callaway" 05-20-2010 04:33 PM

Adding a section on GSettingsSchema
 
On 05/20/2010 10:56 AM, Rex Dieter wrote:

> 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.

Seems sensible, we should discuss this next Wednesday.

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

Jon Ciesla 05-20-2010 05:39 PM

Adding a section on GSettingsSchema
 
On 05/20/2010 11:33 AM, Tom "spot" Callaway wrote:
> On 05/20/2010 10:56 AM, Rex Dieter wrote:
>
>
>> 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.
>>
> Seems sensible, we should discuss this next Wednesday.
>
> ~spot
> --
> packaging mailing list
> packaging@lists.fedoraproject.org
> https://admin.fedoraproject.org/mailman/listinfo/packaging
>
Is there a draft?

-J

--
- in your fear, speak only peace
in your fear, seek only love

-d. bowie

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

Toshio Kuratomi 05-20-2010 09:06 PM

Adding a section on GSettingsSchema
 
On Thu, May 20, 2010 at 09:56:37AM -0500, Rex Dieter wrote:
> 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).
>
Note that I agree with using %posttrans where it doesn't interfere with
later package installs but there are two things to be wary of here:

1) %posttrans just moves the scriptlet to the ned of the transaction; It
does not consolidate duplicate %posttrans scriptlets into a single command.
That means that the speedups we get are mostly due to filesystem caching.
People should be aware that compute heavy processes or things that don't fit
in the filesystem cache will still be slow even if we put them into
%posttrans.

The current GConf2 scriptlets are much more complex than the GSettings ones
(behind the scenes) because GConf was unacceptably slow when there was no
need to be (new version of a package has the same schema file as the old
version but we were resyncing GConf anyway. The new scriptlets do away with
that.)

2) Sometimes it can interfere and it's hard to tell from the 10,000 foot
view of the Guidelines. For instance, GConf and GSettings seem like they
can very easily interfere with later packages. There's nothing preventing
me from writing an app that does some registration for other applications
and also happens to use GSettings for my settings.

Perhaps we need a generic %posttrans warning on the ScriptletSnippets page
that outlines things to watch out for (Do any of the things your installing
get used in other scriptlets? Do they register services for other
applications?) If the package falls under one of those problems, they
should substitute %post for %posttrans.

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


All times are GMT. The time now is 01:18 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.