all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: 宋文武 <iyzsong@member.fsf.org>
Cc: guix-devel@gnu.org
Subject: Re: should gnome-desktop-service really provide all of this to a profile?
Date: Tue, 08 Mar 2016 17:35:42 +0100	[thread overview]
Message-ID: <87fuw1j5b5.fsf@gnu.org> (raw)
In-Reply-To: <87ziu9yrbl.fsf@member.fsf.org> ("宋文武"'s message of "Tue, 08 Mar 2016 22:31:10 +0800")

iyzsong@member.fsf.org (宋文武) skribis:

> ludo@gnu.org (Ludovic Courtès) writes:
>
>> Andy Wingo <wingo@igalia.com> skribis:
>>
>>> On Mon 07 Mar 2016 22:11, ludo@gnu.org (Ludovic Courtès) writes:
>>>
>>>> Andy Wingo <wingo@pobox.com> skribis:
>>>>
>>>>> I installed gnome using
>>>>>
>>>>>   guix package --profile=/tmp/foo-profile -i gnome
>>>>>
>>>>> There is a lot of stuff there.  If gnome-desktop-service extends
>>>>> profile-service-type with gnome, will that not "pollute" a lot of
>>>>> profiles?  Attached is a listing of that profile.
>>>>> […]
> These mostly come from ‘nautilus’, which propagated ‘gtk+’.
> I think it’s ok to remove ‘gtk+’ from it, since it’s an application
> after all, and adding input ‘gtk+’ to other (libnautilus using) packages
> is trivial.

Pulseaudio also propagates a few things.

>>>> Good point, this sounds undesirable (and shows that some packages would
>>>> benefit from separate outputs—e.g., “doc” output for xcb.)
> It seems that multiple outputs doesn’t help here.

Multiple outputs do help here: propagating libxcb:out only propagates
libxcb:out, and not libxcb:doc.

> For example, install ‘gtk+:doc’ into the profile will bring all
> propagated-inputs of ‘gtk+’ into profile too, because
> propagated-inputs aren’t per output…

Right, it’s a limitation that we could fix.

It’s rarely a problem though, because usually when you install the “doc”
or “debug” output, you also want the rest, including propagated inputs.

> IIUC, in nix, it’s handled by writing files to specified output:
> ‘$out/nix-support/propagated-build-inputs’
> ‘$out/nix-support/propagated-native-build-inputs’
> ‘$out/nix-support/propagated-user-env-packages’
>
> And only items in ‘propagated-user-env-packages’ are included when
> install into the profile.

Two things here:

  • Back in the day, I couldn’t think of a situation where it would make
    sense for ‘propagated-inputs’ to be different from
    ‘propagated-user-env-packages’ (at the time, the latter was little
    known so in practice people had to install dependencies by
    themselves.)  So in Guix I chose to have just one.

  • I found the ‘nix-support’ trick (that is, having high-level
    information on the build side) kind of hacky, which is why this
    information is solely on the build side in Guix.  This is what
    allows higher-level functionality such as --search-paths to be
    implemented on the host side.

    OTOH, things like <http://bugs.gnu.org/22138> could be more easily
    addressed if all the info was already on the build side.

> I think we should make propagated things per output too.

Yes.

>> Right.  I think we should rewrite the ‘gnome’ meta-package in terms of
>> ‘union-build’ and explicitly include only bin/ and share/.
> Install a ‘meta’ package should have same effect as install all the
> individuals.  If it’s a union and filter from other packages, I won’t
> think it ‘meta’ anymore :-)

Right.  :-)

> Ideally, for every file in a purity profile, we know the reason why it
> exist.  Maybe it’s possible to implement by using services?  If packages
> could declare extensions and extend each other, when install packages
> into the profile, those services extensions are fold together.  I think:
>
> - by default, an empty profile only cares ‘bin’.
>   install man-db to it, will add an extension which cares for ‘share/man’.
>
> - now install glibc into it, since glibc doesn’t have ‘share/man’,
>   it only extend the ‘bin’ extension, so its binaries are added to the
>   profile.
>   
> - then install gcc into the profile, it care for ‘include’ and ‘lib’,
>   and have ‘share/man’, its manpages and headers and libraries of glibc
>   will appear.
>
> - at this point, remove man-db from profile will remove the gcc manpages
>   from it too.
>
> Then I dream what’s cool is that we could know and show users more
> information if all the relations between packages are coded explicitly
> by services extensions:
>
> - query (guix package –-show) man-db:
>    name: man-db
>    extensions:
>      man-page: interest ‘share/man’
>
> - install gcc:
>    The following package will be extended:
>      man-db (man-page)
>    The following package extend gcc:
>      glibc (header library)
>
> And perhaps other things ;-)

Interesting ideas!  There are connections with how search paths work
currently.

Anyway, what do you think would be the best way to avoid “profile
pollution” with the GNOME meta-package?

Thanks,
Ludo’.

  reply	other threads:[~2016-03-08 16:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-07 15:50 should gnome-desktop-service really provide all of this to a profile? Andy Wingo
2016-03-07 21:11 ` Ludovic Courtès
2016-03-08  8:48   ` Andy Wingo
2016-03-08  9:15     ` Ludovic Courtès
2016-03-08 14:31       ` 宋文武
2016-03-08 16:35         ` Ludovic Courtès [this message]
2016-03-09  7:38           ` 宋文武
2016-03-09 23:02             ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fuw1j5b5.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=iyzsong@member.fsf.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.