Subject: bug#37732: mps-youtube propagates util-linux

From: Ludovic Courtès <[email-masked]>
Date: Fri, 01 Nov 2019 15:41:30 +0100

Hi!

Marius Bakke <[email-masked]> skribis:

> Diego Nicola Barbato <[email-masked]> writes:
>
>> Hi Guix,
>>
>> An unfortunate chain of propagated-inputs causes 'util-linux' (mount,
>> umount, etc.) to be installed alongside 'mps-youtube': 'mps-youtube'
>> propagates 'python-pygobject', which propagates 'glib', which propagates
>> 'util-linux'.  It seems to have been introduced with commit 6c237a2,
>> when 'util-linux' was moved to the propagated-inputs of 'glib'.

Do we know why this commit moved ‘util-linux’ to propagated-inputs?
Presumably because of this line in ‘gio-2.0.pc’, right?

  Requires.private: gmodule-no-export-2.0, zlib, mount >= 2.23, libselinux

If it’s “just” because of this, I’d say we don’t need to propagate
‘util-linux’: we only build shared libraries for GLib anyway, so none of
our packages actually use ‘Requires.private’.  If we were to add
packages requiring it, it’s fine to just add ‘mount’ as an explicit
inputs of these packages IMO.

We could follow the same reasoning for the other things that are
propagated due to their being listed in ‘Requires.private’.

Thoughts?

Moving ‘util-linux’ back to ‘inputs’ could perhaps be done on the next
‘staging’ or on ‘core-updates’.

> I have attached a WIP patch that fixes this "long term", by moving the
> util-linux libraries to a separate output.  It rebuilds 7753 packages
> and is intended for the 'core-updates' branch.
>
> From b9cbe08694ddd8248ac32ce60d5fc40d5c619a54 Mon Sep 17 00:00:00 2001
> From: Marius Bakke <[email-masked]>
> Date: Sun, 13 Oct 2019 16:07:44 +0200
> Subject: [PATCH] gnu: util-linux: Move libraries to separate output.
>
> Fixes <https://bugs.gnu.org/37732>.
> Reported by Diego Nicola Barbato <[email-masked]>.
>
> * gnu/packages/linux.scm (util-linux)[outputs]: Add "dev".
> [arguments]: Update #:configure-flags accordingly.  Add phase
> "adjust-bindirs", and rename "move-static-libraries" to "move-libraries",
> while adding a substitution for the .pc files.
> * gnu/packages/fontutils.scm (fontconfig)[propagated-inputs]: Use the "dev"
> output of UTIL-LINUX.
> * gnu/packages/glib.scm (glib)[propagated-inputs]: Likewise.

[...]

> --- a/gnu/packages/linux.scm
> +++ b/gnu/packages/linux.scm
> @@ -1089,19 +1089,40 @@ providing the system administrator with some help in common tasks.")
>                      (("build_kill=yes") "build_kill=no"))
>                    #t))))
>      (build-system gnu-build-system)
> -    (outputs '("out"
> -               "static"))      ; >2 MiB of static .a libraries
> +    (outputs '("out"                   ;6.4 MiB executables and documentation
> +               "dev"                   ;8.8 MiB shared libraries, headers and locales
> +               "static"))              ;2.9 MiB static .a libraries

Shared libraries are not just for development, so I’d say it should be
“lib” instead, no?

Thanks,
Ludo’.