Package identity transformation produces different derivation

  • Open
  • quality assurance status badge
Details
3 participants
  • Ludovic Courtès
  • Ulf Herrman
  • Simon Tournier
Owner
unassigned
Submitted by
Ulf Herrman
Severity
important
U
U
Ulf Herrman wrote on 16 Nov 2023 04:56
(address . bug-guix@gnu.org)
87leaye4h5.fsf@tilde.club
$ guix build --no-grafts --derivations -e \
'(begin
(use-modules (guix packages) (gnu packages gtk))
((package-mapping identity) cairo-sans-poppler))' \
-e '(@ (gnu packages gtk) cairo-sans-poppler)'
=>
/gnu/store/51hwf2mc2ig76a3nm86msv4z9az3s0j3-cairo-1.16.0.drv
/gnu/store/q78ziqcg2dvi2lzj18hzdld85bcydzwk-cairo-1.16.0.drv

Some interesting notes:

1. (package-mapping identity #:deep? #t) *does* produce the same
derivation.
2. bag->derivation's `delete-duplicates' call uses `input=?', but its
input objects in the second tuple position are all <gexp-input>s
produced by `expand-input'. Consequently, `input=?' will fall back
to using `equal?' instead of `derivation=?'. I don't know to what
extent this has to do with the observed bug.

- ulfvonbelow
-----BEGIN PGP SIGNATURE-----

iQHIBAEBCAAyFiEEn6BUn0yca1D9JsMa1lV76sJM9mgFAmVVktgUHHN0cmluZXNz
QHRpbGRlLmNsdWIACgkQ1lV76sJM9mjnzAv/XTMfeaSGNl7ocEp+ceie4QkCzYTk
PlTFPGxU93XJZcyZeqLmhGQ/exlawCOB3/lsHCypqc0cNBUu6xKy8RSeA0KG5y8t
Efb8IHIMpV1DSYZ7h5PWOAdiax5iIQj2yEgAhgukJIifkgR0q/PGs7MaNJm8Bhzh
bpBphilKZcAoXn+TUf2t/GLJ8JiUMo3Mi41LDDQ8quZ16wANGiE96RBygfm6KmoI
zZydT/6ua0RhxWWxIFkyTM6d/cMYcHP7BQNt1UcXh/w+rwWg1W8yH9UFHdRHXwmm
m4MlkpEbHS3qsFWTNmqgYyHIm0BaVi2htPSC9CkjkzmzeLk656/x+Elxs2OOxRZF
kGvpjk8EaQygkLMll/arDRI5WZafVgCdjxooUT6Z3pWzCT72TxJ+gjFadMRUi84T
OfMTLudvHC07yTTna+ATFYukPconP2z65SOKS4DrS5OS6X+cbEwPmSmHQ8wAAZ7c
7S1YLHTK2V5vIKJCp6OXQLM5quAwahvsuJ2e
=G53s
-----END PGP SIGNATURE-----

L
L
Ludovic Courtès wrote on 27 Nov 2023 23:03
control message for bug #67221
(address . control@debbugs.gnu.org)
87a5qyx39q.fsf@gnu.org
severity 67221 important
quit
S
S
Simon Tournier wrote on 12 Jan 11:50 +0100
Re: bug#67221: Package identity transformation produces different derivation
87wmsex1u8.fsf@gmail.com
Hi,

On Wed, 15 Nov 2023 at 21:56, Ulf Herrman <striness@tilde.club> wrote:
Toggle quote (9 lines)
> $ guix build --no-grafts --derivations -e \
> '(begin
> (use-modules (guix packages) (gnu packages gtk))
> ((package-mapping identity) cairo-sans-poppler))' \
> -e '(@ (gnu packages gtk) cairo-sans-poppler)'
> =>
> /gnu/store/51hwf2mc2ig76a3nm86msv4z9az3s0j3-cairo-1.16.0.drv
> /gnu/store/q78ziqcg2dvi2lzj18hzdld85bcydzwk-cairo-1.16.0.drv

The only difference is from the builder: %build-inputs contains

("util-linux" . "/gnu/store/gwx2sf5wl9bsl21lwv35g5la63bwyy95-util-linux-2.37.4-lib")

for the non-transformed ’(@ (gnu packages gtk) cairo-sans-poppler)’
package, only.

Hum, is ’package-mapping’ removing it?


Toggle quote (3 lines)
> 1. (package-mapping identity #:deep? #t) *does* produce the same
> derivation.

Well, it means that #:deep? #t adds “util-linux” in the builder.


Cheers,
simon
?