unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Simon Tournier <zimon.toutoune@gmail.com>
To: Suhail <suhail@bayesians.ca>, Felix Lechner via <help-guix@gnu.org>
Cc: Julien Lepiller <julien@lepiller.eu>,
	Suhail <suhail@bayesians.ca>,
	Felix Lechner <felix.lechner@lease-up.com>
Subject: Re: Turning off tests leads to a different store item (was: Unable to build "Ten Years Reproducibility Challenge" paper)
Date: Wed, 01 Nov 2023 20:05:05 +0100	[thread overview]
Message-ID: <86edh9pa5a.fsf@gmail.com> (raw)
In-Reply-To: <87o7gdmkdc.fsf_-_@>

Hi,

On Wed, 01 Nov 2023 at 17:52, Suhail <suhail@bayesians.ca> wrote:

> If not, why should skipping the tests result in a different derivation
> tree?

The store path is different because it hashes all the inputs, included
the builder script; from my understanding.

For instance, consider the package ’hello’.  The derivation with and
without tests are:

--8<---------------cut here---------------start------------->8---
$ guix build hello -d --no-grafts
/gnu/store/cvdzgd9glngrb98jqfa6bpm6nj6j3q55-hello-2.12.1.drv

$ guix build hello -d --without-tests=hello --no-grafts
/gnu/store/my14b3qwzqjawzadvcc30p2z5iv53amx-hello-2.12.1.drv
--8<---------------cut here---------------end--------------->8---

Now, let compare them,

--8<---------------cut here---------------start------------->8---
$ cat $(guix build hello -d --no-grafts) \
      | sed 's/,/\n/g' | grep '/gnu/'| sort > /tmp/with
$ cat $(guix build hello -d --no-grafts --without-tests=hello) \
      | sed 's/,/\n/g' | grep '/gnu/' | sort > /tmp/without
$ diff /tmp/with /tmp/without
4a5,6
> "/gnu/store/3hsisq3553z3gcy0yf270qy7ds9rzmis-hello-2.12.1"
> "/gnu/store/3hsisq3553z3gcy0yf270qy7ds9rzmis-hello-2.12.1")])
6,7d7
< "/gnu/store/5mqwac3zshjjn1ig82s12rbi7whqm4n8-hello-2.12.1"
< "/gnu/store/5mqwac3zshjjn1ig82s12rbi7whqm4n8-hello-2.12.1")])
21a22,23
> "/gnu/store/jd6566z3xyyzfnyvsyi95ybk39xhbybr-hello-2.12.1-builder"]
> "/gnu/store/jd6566z3xyyzfnyvsyi95ybk39xhbybr-hello-2.12.1-builder"]
25,26d26
< "/gnu/store/pspxyd64587jq55jhbz3z92j4lnqm857-hello-2.12.1-builder"]
< "/gnu/store/pspxyd64587jq55jhbz3z92j4lnqm857-hello-2.12.1-builder"]
--8<---------------cut here---------------end--------------->8---

Well, basically the difference is from the builder: it is the Guile
script that builds.  One contains ’#:tests? #t’ and the other contains
’#:tests? #f’.

--8<---------------cut here---------------start------------->8---
$ cat /gnu/store/jd6566z3xyyzfnyvsyi95ybk39xhbybr-hello-2.12.1-builder \
   | sed 's/ /\n/g' > /tmp/without-builder
$ cat /gnu/store/pspxyd64587jq55jhbz3z92j4lnqm857-hello-2.12.1-builder
   | sed 's/ /\n/g' > /tmp/with-builder
$ diff /tmp/with-builder /tmp/without-builder
148c148
< #t
---
> #f
--8<---------------cut here---------------end--------------->8---

Well, from my understanding, get the same the store path for the same
package built with or without its tests would mean a deep change of the
build systems.

Somehow, it would mean to have a derivation for building and another
derivation – referring to the former – for testing.  Well, taking this
direction, one could imagine a derivation for each phases; somehow
extend to all phases what it is already done for fetching source, build
and grafts (guix build --source && guix build --no-grafts && guix build).
That would be a piece of work. :-)

Cheers,
simon


      reply	other threads:[~2023-11-01 19:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-01 17:52 Turning off tests leads to a different store item (was: Unable to build "Ten Years Reproducibility Challenge" paper) Suhail
2023-11-01 19:05 ` Simon Tournier [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=86edh9pa5a.fsf@gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=felix.lechner@lease-up.com \
    --cc=help-guix@gnu.org \
    --cc=julien@lepiller.eu \
    --cc=suhail@bayesians.ca \
    /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).