[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Output of guix build --check foo is not part of store deduplication
From: |
Ludovic Courtès |
Subject: |
Re: Output of guix build --check foo is not part of store deduplication |
Date: |
Sat, 25 Aug 2018 00:08:09 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
Hello!
Björn Höfling <address@hidden> skribis:
> Usually, the store gets deduplicated, i.e. if files bar and baz have
> the same content, they will hard-link to the same thing on disk. That's
> cool for saving space if for example some package get's updated because
> of a changed dependency but really there is no or little change to the
> output files.
>
> But the '-check' files are somehow not part of that deduplication. Even
> if you enforce deduplication with guix gc --optimize. You can see it
> like this:
I think it’s on purpose: “-check” items are not registered as valid (in
the database), and thus it makes little sense to deduplicate them since
they’ll be GC’d rapidly. (And Chris provides useful links to the
relevant code.)
> If you now diffoscope them, diffoscope will call stat and then we get
> diffs like:
>
> │ │ ---
> /gnu/store/h63cx6akyrv3m73lky585ba10qq3mydc-libchop-0.5.2/share/info/libchop.info.gz
> │ │ ├── +++
> /gnu/store/h63cx6akyrv3m73lky585ba10qq3mydc-libchop-0.5.2-check/share/info/libchop.info.gz
> │ │ │ ├── /gnu/store/as7vb5xx7vqdwmmqj9543470r49b4c0c-coreutils-8.28/bin/stat
> {}
> │ │ │ │ @@ -1,8 +1,8 @@
> │ │ │ │
> │ │ │ │ Size: 29524 Blocks: 64 IO Block: 4096 regular
> file
> │ │ │ │ -Links: 3
> │ │ │ │ +Links: 1
>
>
> This is annoying because it hides the actual unreproducibility-problem.
> Is there any reason for that?
I think this information is useful for .deb or RPM packages, but
typically useless for Nix and Guix because we “canonicalize” file
metadata.
Diffoscope chould have a flag to disable ‘stat’ comparison altogether,
not just nlinks, but the patch by Eelco that you mention should have the
same effect in practice.
Ludo’.