Hi, zimoun skribis: > On Sat, 18 Sep 2021 at 18:06, Ludovic Courtès wrote: >> zimoun skribis: >> >>> Why the store item of source tarball is it different when applying the >>> transformation? >>> >>> Maxime provided a clue [1]. >> >> Maxime is right: ‘--with-source’ passes #:recursive? #t unconditionally, >> whereas it’s usually #f for a ‘url-fetch’ kind of URI. > > Thanks for confirming. Why is it different? Because we want ‘--with-source’ to also work with directories (see comment in ‘package-with-source’). >> What we could do is make it #t if and only if the URL denotes a local >> file and that file is a directory. I think that would achieve what you >> want without any observable regression in practice. > > What I expect is that 2 (fixed-output) files with the same hash > (0ssi1w…) lives at the same store location… > > $ guix hash /gnu/store/chariqd6k0sli3s7vcl4q3al0crirz5v-hello-2.10.tar.gz > 0ssi1wpaf7plaswqqjwigppsg5fyh99vdlb9kzl7c9lng89ndq1i > > $ guix hash /gnu/store/hbdalsf5lpf01x4dcknwx6xbn6n5km6k-hello-2.10.tar.gz > 0ssi1wpaf7plaswqqjwigppsg5fyh99vdlb9kzl7c9lng89ndq1i The difference here is that one is marked as “recursive” and the other is not. The patch below does one I suggested earlier: passing #:recursive? #t if and only if we know the source is a directory. However it’s not enough to get the same derivation: we’d also need to return a fixed-output derivation rather than a plain store file name. (See also .) To be continued… Ludo’.