Subject: [bug#33535] [PATCH] refresh: Account for overlapping updater coverage.

From: [email-masked] (Ludovic Courtès)
Date: Thu, 29 Nov 2018 18:42:38 +0100

Hello!

[email-masked] skribis:

> From: Eric Bavier <[email-masked]>
>
> * guix/scripts/refresh.scm (list-updaters-and-exit): Do not assume updater
> predicates are disjoint.  Track covered packages directly.
> ---
> Hello Guix,
>
> Some of our packages are covered by more than one of our updaters:
>
> scheme@(guile-user)> ,use(gnu packages)(guix packages)(guix upstream)
> scheme@(guile-user)> ,use(srfi srfi-1)(srfi srfi-26)
> scheme@(guile-user)> (define updaters (force (@@ (guix upstream) %updaters)))
> scheme@(guile-user)> (define predicates (map upstream-updater-predicate updaters))
> scheme@(guile-user)> (define doubles
>   (fold-packages
>     (lambda (pkg result)
>       (if (> (count (cut <> pkg) predicates) 1)
>          (cons pkg result)
>        result))
>     '()))
> scheme@(guile-user)> (length doubles)
> $1 = 469
> scheme@(guile-user)> (map package-name doubles)
> $2 = ("agda" "emacs-agda2-mode" "fribidi" "raincat" "ghc-tasty-quickcheck" ... "ghc-hxt")
>
> It seams mostly packages covered by both the "hackage" and "stackage"
> updaters.  And Fribidi is a GNU package but hosted on github.
>
> Currently this leads to double-counting while computing total package
> coverage and a too optimistic result (by about 5.4%).
>
> The below patch fixes it by tracking the (un)covered packages directly.

Oh, good catch.  LGTM!

That also means we’ll have to work on our updaters…  :-)

Thanks,
Ludo’.