'--with-input', '--with-git-url' etc. cause unnecessary rebuilds

OpenSubmitted by Ludovic Courtès.
Details
2 participants
  • Ludovic Courtès
  • Ludovic Courtès
Owner
unassigned
Severity
important
Merged with
L
L
Ludovic Courtès wrote on 7 Nov 2019 13:35
‘--with-input’ causes unintended rebuilds
(address . bug-Guix@gnu.org)
87eeyjsw3g.fsf@inria.fr
Hello,
Consider this example:
Toggle snippet (12 lines)$ guix build glib -nd/gnu/store/9zz9hvzaz06f40a4cbvhskb183x676w4-glib-2.60.6.drv$ guix build glib --with-input=inkscape=libreoffice -nd/gnu/store/15f9jkpakmsaz8i2a0gy4kir1zyk29vi-glib-2.60.6.drv$ guix describeGeneracio 114 Nov 02 2019 11:32:51 (nuna) guix ab1c063 repository URL: https://git.savannah.gnu.org/git/guix.git branch: master commit: ab1c063ab08e069fbe62919828fa634a2e222bbf
Since GLib does not depend on Inkscape, the ‘--with-input’ flag shouldhave no effect: we should get the same glib derivation. However, we’renot.
If we diff the ‘glibc-2.60.6-guile-builder’ files of each derivation, wesee that the second one has a duplicate entry:
(define %build-inputs `(… ("python" . "/gnu/store/78w7y0lxar70j512iqw8x3nimzj10yga-python-3.7.4") ("python" . "/gnu/store/78w7y0lxar70j512iqw8x3nimzj10yga-python-3.7.4") …))
whereas the first one doesn’t have this duplicate entry. IOW, the twoderivations are functionally equivalent but are not bit-identical.
Indeed, evaluating:
(bag-transitive-inputs (package->bag ((package-input-rewriting '()) glib)))
shows that we have two “python” packages there that are not ‘eq?’.
To be continued…
Ludo’.
L
L
Ludovic Courtès wrote on 8 Nov 2019 22:06
(address . 38100@debbugs.gnu.org)
87ftiydqnb.fsf@gnu.org
Hi,
Ludovic Courtès <ludovic.courtes@inria.fr> skribis:
Toggle quote (7 lines)> Indeed, evaluating:>> (bag-transitive-inputs> (package->bag ((package-input-rewriting '()) glib)))>> shows that we have two “python” packages there that are not ‘eq?’.
The problem is that ‘glib’ depends on ‘python-libxml2’, which uses‘python-build-system’ and thus has ‘python’ as an implicit input.
‘package-input-rewriting’ doesn’t touch implicit inputs so it leavesthat implicit ‘python’ untouched.
Since ‘transitive-inputs’ (used by ‘bag-transitive-inputs’) uses pointerequality, we end up with two “python” packages that are not ‘eq?’ butare functionally equivalent: the one produced by‘package-input-rewriting’, and the implicit dependency of‘python-libxml2’. QED.
(This is essentially the same as https://bugs.gnu.org/30155.)
I’m not sure how to address it.
Ludo’.
L
L
Ludovic Courtès wrote on 2 Jul 00:14 +0200
control message for bug #38100
(address . control@debbugs.gnu.org)
878sg2yjbj.fsf@gnu.org
merge 38100 42156quit
L
L
Ludovic Courtès wrote on 2 Jul 00:15 +0200
(address . control@debbugs.gnu.org)
87zh8ix4o8.fsf@gnu.org
severity 38100 importantquit
L
L
Ludovic Courtès wrote on 3 Aug 16:30 +0200
control message for bug #42156
(address . control@debbugs.gnu.org)
87tuxjssyb.fsf@gnu.org
retitle 42156 '--with-input', '--with-git-url' etc. cause unnecessary rebuildsquit
?