From: Leo Famulari <leo@famulari.name>
To: Andy Tai <lichengtai@gmail.com>
Cc: 52591@debbugs.gnu.org
Subject: bug#52591: downloading from software archives as default even if version is wrong
Date: Fri, 17 Dec 2021 19:06:46 -0500 [thread overview]
Message-ID: <Yb0mFsOxRN5sBlAJ@jasmine.lan> (raw)
In-Reply-To: <CAJsg1E8UPfxuyErnP_32H0Qr71+eeJsvFNLRWZotw=uTFdDJsg@mail.gmail.com>
On Fri, Dec 17, 2021 at 03:40:45PM -0800, Andy Tai wrote:
> as seen above, somehow the old version was downloaded from a cached
> copy at softwareheritage archives, and it proceeds to build. This
> should not proceed but fail for wrong checksum.
This can happen with the Nix content-addressed archive fallback that we
use, too.
Basically, when the normal URLs fail, Guix queries these
content-addressed archives by content. That is, by their hash.
The version number is considered to be metadata, not content, and so the
download "succeeds".
Since the source origins are named by their hash, this is the correct
behaviour, although there is some room for error, as you've found.
Do you have any ideas about how to improve things?
We taught Guix to respect the GUIX_DOWNLOAD_FALLBACK_TEST [0]
environment variable, which controls how Guix uses these fallback
archives.
I recommend setting it to "none" if you are doing package development in
order to avoid this pitfall. Otherwise, these archives are helpful for
using Guix, since sources do disappear upstream, URLs change, etc, and
we'd like for old versions of Guix to be usable.
[0]
https://git.savannah.gnu.org/cgit/guix.git/commit/?id=c4a7aa82e25503133a1bd33148d17968c899a5f5
https://git.savannah.gnu.org/cgit/guix.git/commit/?id=bd61d62182bfda4a695757ec66810b28e8e1a6d0
next prev parent reply other threads:[~2021-12-18 0:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-17 23:40 bug#52591: downloading from software archives as default even if version is wrong Andy Tai
2021-12-17 23:58 ` Maxime Devos
2021-12-18 0:06 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
2021-12-18 0:23 ` Andy Tai
2021-12-18 1:51 ` Leo Famulari
2021-12-18 1:57 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
2021-12-18 0:06 ` Leo Famulari [this message]
2021-12-18 0:07 ` raingloom
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Yb0mFsOxRN5sBlAJ@jasmine.lan \
--to=leo@famulari.name \
--cc=52591@debbugs.gnu.org \
--cc=lichengtai@gmail.com \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.