guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Shall updaters fall back to other updaters?


From: zimoun
Subject: Re: Shall updaters fall back to other updaters?
Date: Mon, 04 Jul 2022 16:02:14 +0200

Hi,

On Thu, 30 Jun 2022 at 10:58, Hartmut Goebel <h.goebel@crazy-compilers.com> 
wrote:

> BTW 2: Which updater is used for each package is non-deterministic.

>From (guix discovery), ’all-modules’ is not deterministic because it
depends on how the filesystem tree is walked.

Therefore, indeed ’importer-modules’ from (guix upstream) is not sorted
and the order is non-deterministic.

(Note that ’fold-packages’ from (guix packages) is not determining too,
if I remember correctly.)


Well, make ’all-modules’ deterministic requires some benchmark because
it could like to some time penalty; even if the order does not matter.
Some commands are already enough slow for adding an extra penalty. ;-)

Maybe sorting ’%updaters’ would be enough; something like,

--8<---------------cut here---------------start------------->8---
(define %updaters
  ;; The list of publically-known updaters.
  (delay (sort (fold-module-public-variables (lambda (obj result)
                                               (if (upstream-updater? obj)
                                                   (cons obj result)
                                                   result))
                                             '()
                                             (importer-modules))
               (lambda (u1 u2)
                 (string<?
                  (upstream-updater-name u1) (upstream-updater-name u2))))))
--8<---------------cut here---------------end--------------->8---


Cheers,
simon




reply via email to

[Prev in Thread] Current Thread [Next in Thread]