unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Christopher Baines <mail@cbaines.net>
To: 49522@debbugs.gnu.org
Subject: [bug#49522] [PATCH] weather: Don't look for exported package replacements twice.
Date: Sun,  1 Aug 2021 16:45:34 +0100	[thread overview]
Message-ID: <20210801154534.22051-1-mail@cbaines.net> (raw)
In-Reply-To: <20210711115638.30207-1-mail@cbaines.net>

* guix/scripts/weather.scm (all-packages): Delete duplicates, so that exported
replacements aren't included twice.
---
 guix/scripts/weather.scm | 22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/guix/scripts/weather.scm b/guix/scripts/weather.scm
index 06312d65a2..60a697d1ac 100644
--- a/guix/scripts/weather.scm
+++ b/guix/scripts/weather.scm
@@ -54,16 +54,18 @@
 
 (define (all-packages)
   "Return the list of public packages we are going to query."
-  (fold-packages (lambda (package result)
-                   (match (package-replacement package)
-                     ((? package? replacement)
-                      (cons* replacement package result))
-                     (#f
-                      (cons package result))))
-                 '()
-
-                 ;; Dismiss deprecated packages but keep hidden packages.
-                 #:select? (negate package-superseded)))
+  (delete-duplicates
+   (fold-packages (lambda (package result)
+                    (match (package-replacement package)
+                      ((? package? replacement)
+                       (cons* replacement package result))
+                      (#f
+                       (cons package result))))
+                  '()
+
+                  ;; Dismiss deprecated packages but keep hidden packages.
+                  #:select? (negate package-superseded))
+   eq?))
 
 (define (call-with-progress-reporter reporter proc)
   "This is a variant of 'call-with-progress-reporter' that works with monadic
-- 
2.32.0





  parent reply	other threads:[~2021-08-01 15:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-11 11:56 [bug#49522] [PATCH] weather: Don't look for exported package replacements twice Christopher Baines
2021-07-19 17:10 ` Ludovic Courtès
2021-08-01 15:01   ` Christopher Baines
2021-08-01 15:45 ` Christopher Baines [this message]
2021-09-01 21:30   ` Ludovic Courtès
2021-09-03  9:25     ` bug#49522: " Christopher Baines

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210801154534.22051-1-mail@cbaines.net \
    --to=mail@cbaines.net \
    --cc=49522@debbugs.gnu.org \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).