GNU bug report logs - #47929
[PATCH 0/5] Add manifest support to channel-with-substitutes-available

Previous Next

Package: guix-patches;

Reported by: Mathieu Othacehe <othacehe <at> gnu.org>

Date: Wed, 21 Apr 2021 12:17:01 UTC

Severity: normal

Tags: patch

Full log


Message #17 received at 47929 <at> debbugs.gnu.org (full text, mbox):

From: Mathieu Othacehe <othacehe <at> gnu.org>
To: 47929 <at> debbugs.gnu.org
Cc: Mathieu Othacehe <othacehe <at> gnu.org>
Subject: [PATCH 4/5] scripts: weather: Add packages dashboard support.
Date: Wed, 21 Apr 2021 14:21:07 +0200
* guix/scripts/weather.scm (display-dashboard-url): New procedure.
(guix-weather): Call it.
---
 guix/scripts/weather.scm | 32 +++++++++++++++++++++++---------
 1 file changed, 23 insertions(+), 9 deletions(-)

diff --git a/guix/scripts/weather.scm b/guix/scripts/weather.scm
index 5164fe0494..be0b2e3509 100644
--- a/guix/scripts/weather.scm
+++ b/guix/scripts/weather.scm
@@ -499,6 +499,17 @@ SERVER.  Display information for packages with at least THRESHOLD dependents."
              #f
              systems))))
 
+(define (display-dashboard-url server packages)
+  "Display a link to the dashboard for PACKAGES on the given CI SERVER."
+  (let* ((id (dashboard-register server packages))
+         (url (and id (dashboard-url server id))))
+    (when url
+      (format #t "~%")
+      (format #t (G_ "The packages dashboard is available ~a.~%")
+              (if (supports-hyperlinks?)
+                  (hyperlink url (G_ "here"))
+                  (format #f "here: ~a" url))))))
+
 
 ;;;
 ;;; Entry point.
@@ -554,15 +565,18 @@ SERVER.  Display information for packages with at least THRESHOLD dependents."
                      (report-server-coverage server items
                                              #:display-missing?
                                              (assoc-ref opts 'display-missing?)))
-                   (match (assoc-ref opts 'coverage)
-                     (#f #f)
-                     (threshold
-                      ;; PACKAGES may include non-package objects coming from a
-                      ;; manifest.  Filter them out.
-                      (report-package-coverage server
-                                               (filter package? packages)
-                                               systems
-                                               #:threshold threshold)))
+
+                   ;; PACKAGES may include non-package objects coming from a
+                   ;; manifest.  Filter them out.
+                   (let ((packages (filter package? packages)))
+                     (match (assoc-ref opts 'coverage)
+                       (#f #f)
+                       (threshold
+                        (report-package-coverage server
+                                                 packages
+                                                 systems
+                                                 #:threshold threshold)))
+                     (display-dashboard-url server packages))
 
                    (= 1 coverage))
                  urls))))))
-- 
2.31.1





This bug report was last modified 4 years and 152 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.