unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* TODO: user-environment-hook
@ 2015-01-02  4:44 宋文武
  2015-01-02 21:38 ` Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: 宋文武 @ 2015-01-02  4:44 UTC (permalink / raw)
  To: guix-devel

Currently, (guix profiles) has code to build 'info-dir' for packages in profile.
As mentioned in TODO, IIUC, we should move the code to 'texinfo'.

Other usecases include:
* hicolor-icon-theme: use gtk-update-icon-cache to get 'icon-theme.cache'.
* shared-mime-info: use update-mime-database to get 'mime.cache'.
* desktop-file-utils: use update-desktop-database to get 'mimeinfo.cache'.
? glib: use glib-compile-schemas to get 'gschema.compiled'.

For schemas, it's always safe for packages in system profile,
but may broken for user profile:
  user had install package A
  user update the guix disto, A -> A' has incompatible schema change
  user now install package B' which depend on schema of A'
B' will crash if we have schemas from A and B'.

If we make A a propagated-inputs of B, dose A will be update to A' when
install B'?
If so, that's great, we can even get rid of glib-or-gtk-build-system.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: TODO: user-environment-hook
  2015-01-02  4:44 TODO: user-environment-hook 宋文武
@ 2015-01-02 21:38 ` Ludovic Courtès
  2015-01-03  6:45   ` 宋文武
  0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2015-01-02 21:38 UTC (permalink / raw)
  To: 宋文武; +Cc: guix-devel

宋文武 <iyzsong@gmail.com> skribis:

> Currently, (guix profiles) has code to build 'info-dir' for packages in profile.
> As mentioned in TODO, IIUC, we should move the code to 'texinfo'.

Yes, that’s the initial idea.  However, it’s not clear that attaching
“user environment hooks” to packages is the right thing.

For instance, you can install Info files, and if you only ever use the
Info reader of Emacs, you never install Texinfo itself; yet, the ‘dir’
file must be generated.

> Other usecases include:
> * hicolor-icon-theme: use gtk-update-icon-cache to get 'icon-theme.cache'.
> * shared-mime-info: use update-mime-database to get 'mime.cache'.
> * desktop-file-utils: use update-desktop-database to get 'mimeinfo.cache'.
> ? glib: use glib-compile-schemas to get 'gschema.compiled'.

Same problem here: users may never explicitly install GLib, yet these
operations should always be performed.

So I’m tempted to think we could just augment ‘profile-derivation’ to
invoke other hooks similar to ‘info-dir-file’ in (guix profile).  We
could specify a list of “profile hooks” like:

  `(("share/info" . ,info-dir-file)
    ("share/foo/mime.cache" . ,mime-cache-file))

WDYT?

> For schemas, it's always safe for packages in system profile,
> but may broken for user profile:
>   user had install package A
>   user update the guix disto, A -> A' has incompatible schema change
>   user now install package B' which depend on schema of A'
> B' will crash if we have schemas from A and B'.
>
> If we make A a propagated-inputs of B, dose A will be update to A' when
> install B'?

Yes, when installing a package with propagated inputs, said inputs are
installed as well, possibly overriding others.  However, if you look at
collision handling in (guix build union) is minimalist, so anything can
happen.

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: TODO: user-environment-hook
  2015-01-02 21:38 ` Ludovic Courtès
@ 2015-01-03  6:45   ` 宋文武
  0 siblings, 0 replies; 3+ messages in thread
From: 宋文武 @ 2015-01-03  6:45 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

Ludovic Courtès <ludo@gnu.org> writes:

> 宋文武 <iyzsong@gmail.com> skribis:
>
>> Currently, (guix profiles) has code to build 'info-dir' for packages in profile.
>> As mentioned in TODO, IIUC, we should move the code to 'texinfo'.
>
> Yes, that’s the initial idea.  However, it’s not clear that attaching
> “user environment hooks” to packages is the right thing.
>
> For instance, you can install Info files, and if you only ever use the
> Info reader of Emacs, you never install Texinfo itself; yet, the ‘dir’
> file must be generated.
>
>> Other usecases include:
>> * hicolor-icon-theme: use gtk-update-icon-cache to get 'icon-theme.cache'.
>> * shared-mime-info: use update-mime-database to get 'mime.cache'.
>> * desktop-file-utils: use update-desktop-database to get 'mimeinfo.cache'.
>> ? glib: use glib-compile-schemas to get 'gschema.compiled'.
>
> Same problem here: users may never explicitly install GLib, yet these
> operations should always be performed.
>
> So I’m tempted to think we could just augment ‘profile-derivation’ to
> invoke other hooks similar to ‘info-dir-file’ in (guix profile).  We
> could specify a list of “profile hooks” like:
>
>   `(("share/info" . ,info-dir-file)
>     ("share/foo/mime.cache" . ,mime-cache-file))
>
> WDYT?
OK, I'll try to do this way :)
>
>> For schemas, it's always safe for packages in system profile,
>> but may broken for user profile:
>>   user had install package A
>>   user update the guix disto, A -> A' has incompatible schema change
>>   user now install package B' which depend on schema of A'
>> B' will crash if we have schemas from A and B'.
>>
>> If we make A a propagated-inputs of B, dose A will be update to A' when
>> install B'?
>
> Yes, when installing a package with propagated inputs, said inputs are
> installed as well, possibly overriding others.  However, if you look at
> collision handling in (guix build union) is minimalist, so anything can
> happen.
>
> Thanks,
> Ludo’.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-01-03  6:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-02  4:44 TODO: user-environment-hook 宋文武
2015-01-02 21:38 ` Ludovic Courtès
2015-01-03  6:45   ` 宋文武

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).