[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Shall updaters fall back to other updaters?
From: |
Kaelyn |
Subject: |
Re: Shall updaters fall back to other updaters? |
Date: |
Sun, 03 Jul 2022 15:11:10 +0000 |
------- Original Message -------
On Sunday, July 3rd, 2022 at 1:12 AM, Hartmut Goebel
<h.goebel@crazy-compilers.com> wrote:
> Am 01.07.22 um 15:15 schrieb Ludovic Courtès:
>
> > > BTW 2: Which updater is used for each package is non-deterministic.
> > > Do you have an example? I’d think they’re always tried in the same
> > > order, no?
>
>
> When looking at the code, I don't see any means of sorting:
> https://git.savannah.gnu.org/cgit/guix.git/tree/guix/upstream.scm#n245
>
> and below. (Maybe sorting is hidden in one of the function
> guile-internal used there there.)
I just looked at 'importer-modules and did some tracing of where the list of
modules come from (back through 'all-modules, etc). It appears that by default
the list of importer modules comes from 'scheme-file, which is defined at:
https://git.savannah.gnu.org/cgit/guix.git/tree/guix/discovery.scm#n43
That function builds a list of scheme files found recursively under a given
directory with the help of 'scandir*. There is no sorting there or along the
call chain back to 'importer-modules, so I'm fairly sure the directory entries
are returned in a filesystem-dependent order. If the filesystem returns entries
in sorted order or if the contents of that directory tree are relatively static
(in that the order of directory entries hasn't changed), then the results will
appear to be in a consistent/deterministic order. To me, this feels like the
importers will need a more deterministic order imposed on them to get import
results that are consistent across systems. HTH!
Cheers,
Kaelyn