unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: "Björn Höfling" <bjoern.hoefling@bjoernhoefling.de>
To: Marco van Hulten <marco@hulten.org>
Cc: help-guix <help-guix@gnu.org>
Subject: Re: many similar builds
Date: Tue, 9 Oct 2018 21:51:44 +0200	[thread overview]
Message-ID: <20181009215144.31910103@alma-ubu> (raw)
In-Reply-To: <20181009203428.28b100a2@jasniac.instanton>

[-- Attachment #1: Type: text/plain, Size: 2553 bytes --]

On Tue, 9 Oct 2018 20:34:28 +0200
Marco van Hulten <marco@hulten.org> wrote:

> $ md5sum /gnu/store/*-xeyes-*/bin/xeyes
> e17c8aab7cdeedb763601288b6eb0c43  /gnu/store/3syyc8yvyymnwsada0kgm1jmc83232c8-xeyes-1.1.2/bin/xeyes
> f44bf885477a110f7d0ee7b3524b978a  /gnu/store/j0ycra947a0y3d3c9afms7sjlykis629-xeyes-1.1.2/bin/xeyes
> $ ls -l /gnu/store/*-atril-*/bin/atril
> -r-xr-xr-x 2 root root 1226 Jan  1
> 1970 /gnu/store/01j2hg31cv41a0fb19h1wvmn7dzxlv8s-atril-1.18.1/bin/atril
> -r-xr-xr-x 2 root root 1226 Jan  1
> 1970 /gnu/store/1qsm3qmiqc84p8yakbxvyccjbg64ak7z-atril-1.18.1/bin/atril
> -r-xr-xr-x 2 root root 1226 Jan  1
> 1970 /gnu/store/30syxb0vqbcc0zap47mhxlswmhq0w2vw-atril-1.18.1/bin/atril
> -r-xr-xr-x 2 root root 1226 Jan  1
> 1970 /gnu/store/3b95dhdrkyhbw3bijzy9phd34bq32nnq-atril-1.18.1/bin/atril
> ...
> 
> and many more, and 14 different «same-version» installations for
> brasero.  Does this mean that it is just very difficult to get
> reproducible builds?


To add to the already given answers: The store is deduplicated (if that
feature is not explicitly disabled): If two files share the same
content, they are stored only once on hard disk and a hard link points
to that same inode. See here:

I have 21 copies of icedtea-3.7.0 in my store:

$ ls /gnu/store/*icedtea-3.7.0/bin/java -d | wc
     21      21    1407

But if I look at the java command in there, I see it has only two different
ones, with inode count 17 and 24 (first column after permissions):

ls -l /gnu/store/*icedtea-3.7.0/bin/java -d


-r-xr-xr-x 17 root root  8344 Jan  1  1970 /gnu/store/5737dyajx477kl9h0bi393ax0qb4vixc-icedtea-3.7.0/bin/java
-r-xr-xr-x 24 root root  8328 Jan  1  1970 /gnu/store/9lg4136fwprf0fm5jjwd818zqsn2bqim-icedtea-3.7.0/bin/java
[...]

(Of cause 17 + 24 > 21, so there must be some bitwise-identical java
around in some other package)

And `du` tells me:

$ du -shc /gnu/store/*icedtea-3.7.0
114M    /gnu/store/0s9z0prad24i9l6bjvzjf6agwgfmh1l8-icedtea-3.7.0
15M     /gnu/store/2k3ixx4hfkb2nf8d9530phympalxb7bs-icedtea-3.7.0
[..]
186M    total

# With '-l' option to ignore hard links:
$ du -shcl /gnu/store/*icedtea-3.7.0
114M    /gnu/store/0s9z0prad24i9l6bjvzjf6agwgfmh1l8-icedtea-3.7.0
[..]
2.4G    total

Wow, that's a space-saver! You don't have to worry to have all those
(nearly similar/totally similar) store entries around. I prefer to keep
them if I can, that saves me CPU-time whenever I build older commits
out of the Guix git repository.

Björn







[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

      parent reply	other threads:[~2018-10-09 19:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-09 18:34 many similar builds Marco van Hulten
2018-10-09 19:09 ` Pierre Neidhardt
2018-10-09 19:22   ` Tobias Geerinckx-Rice
2018-10-09 19:51 ` Björn Höfling [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181009215144.31910103@alma-ubu \
    --to=bjoern.hoefling@bjoernhoefling.de \
    --cc=help-guix@gnu.org \
    --cc=marco@hulten.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).