Subject: bug#28749: guix build --subsitute-urls does not override guix-daemon run with --no-subsitutes

From: Drashne <[email-masked]>
Date: Sun, 08 Oct 2017 13:13:16 -0400

From the kind people on #guix, I've heard that "guix build --subsitute-urls" should override "guix-daemon --no-subsitutes", but it seems it's not doing so for me.

Here's the situation I ran in to:

While doing a "./pre-inst-env guix pull" I got an error about:

  output path `/gnu/store/53lj4z9cavl7n27r89zjnvyd8fk854kj-libgit2-0.26.0.tar.gz' should have sha256 hash `1fdk9yhwvl1w1z71ykzcvgh4nsf8scxcbclz5anh98zpplmhmisa', instead has `
1b3figbhp5l83vd37vq6j2narrq4yl9pfw6mw0px0dzb1hz3jqka'

So I tried "./pre-inst-env guix build --source libgit2 --substitute-urls=[https://mirror.hydra.gnu.org"](https://mirror.hydra.gnu.org)
but it redirected me to https://codeload.github.com/libgit2/libgit2/tar.gz/v0.26.0
which had the wrong hash.

Attached is the full log of that failed attempt.  This was done while guix-daemon was run with the --no-subsitutes option.

Then I killed guix-daemon and restarted it without --no-subsitutes, and did the same thing and it worked (log of the success also attached).