Subject: bug#31719: Chains of dependencies getting longer

From: Ludovic Courtès <[email-masked]>
Date: Mon, 01 Mar 2021 11:04:02 +0100

Hi,

Andreas Enge <[email-masked]> skribis:

> trying a "guix build openjdk", I see this:
> 2136.0 MB would be downloaded:
>    /gnu/store/243algr6h60j46spn5dqhjc4mhkd0a0p-libelf-0.8.13
>    /gnu/store/ymyvcc0871lwbnkv5acf5lldv0ahm5z1-openjdk-9.181-jdk
>    /gnu/store/3hb80r2l48ix8pq2kvcsr1i9aj76d681-openjdk-9.181
>    /gnu/store/52bp22jrvwfqa5fmlv2y5vxcir74m8jb-openjdk-10.46-jdk
>    /gnu/store/bp86qd2vgaqahqam3n89xl1wz02g0srs-openjdk-10.46
>    /gnu/store/a8f5ksk3gb4i1wrn7m5fm5ijc0zwwg2w-openjdk-11.28-jdk
>    /gnu/store/9ni61z4nhvkrxbzj6gwip8zrb7zbkx6l-openjdk-11.28
>    /gnu/store/837pl2vmq9haiw3kmsnh72fkwvcljipk-openjdk-12.33-jdk
>    /gnu/store/ll5dgf42x9smclrc1mx4gyk3dl683m77-openjdk-13.0-jdk
>    /gnu/store/bjvy5ab6f0gff52m808vzcn3rw55yxjn-openjdk-14.0-doc
>    /gnu/store/r8kxk031fighc4dxr57nl0wirzhk8v08-openjdk-14.0-jdk
>    /gnu/store/25kx1vna763xh4mpszp4p4sy4j6iifs3-openjdk-14.0

Weird.  I see this:

--8<---------------cut here---------------start------------->8---
$ guix build openjdk -n
369.8 MB would be downloaded:
   /gnu/store/676kcvxnnjfcy960fy4xkr10fbn3ciay-openjdk-14.0-doc
   /gnu/store/dk8rkrfkdgsmy1a33n0sc39fhqggy1nh-openjdk-14.0-jdk
   /gnu/store/ylakfs5fwq5sqsk5zbkwwf2d1lp0jfxs-openjdk-14.0
$ guix build openjdk@13 -n
358.0 MB would be downloaded:
   /gnu/store/hipy0g8zpnicqcwhx5ygx9fmmkbgbw6w-openjdk-13.0-doc
   /gnu/store/ff9nn7ipbpnrrvsg0djdrzm0a8v1jx5j-openjdk-13.0-jdk
   /gnu/store/nb6p8aqjjw923vwd7safbh0w5q3mr9fq-openjdk-13.0
$ guix size openjdk@14 | grep openjdk
/gnu/store/ylakfs5fwq5sqsk5zbkwwf2d1lp0jfxs-openjdk-14.0           389.3   295.8  76.0%
$ guix describe
Generacio 175   Feb 04 2021 22:52:40    (nuna)
  guix 5ae09d7
    repository URL: https://git.savannah.gnu.org/git/guix.git
    branch: master
    commit: 5ae09d7979a0696d862b9555314eab199f7ce576
--8<---------------cut here---------------end--------------->8---

What this shows is that the compiled openjdk 14 does not depend on
previous versions; likewise for version 13.

So the long dependency chain is a built-time-only dependency chain.
It’s a problem when building from source but not when using substitutes.

Ludo’.