summary refs log tree commit diff
path: root/build-aux
diff options
context:
space:
mode:
Diffstat (limited to 'build-aux')
-rw-r--r--build-aux/check-available-binaries.scm4
-rw-r--r--build-aux/check-final-inputs-self-contained.scm2
-rw-r--r--build-aux/update-NEWS.scm62
-rw-r--r--build-aux/update-guix-package.scm5
4 files changed, 53 insertions, 20 deletions
diff --git a/build-aux/check-available-binaries.scm b/build-aux/check-available-binaries.scm
index b832d99935..c80db1a37e 100644
--- a/build-aux/check-available-binaries.scm
+++ b/build-aux/check-available-binaries.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -17,7 +17,7 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 ;;;
-;;; Check whether important binaries are available at hydra.gnu.org.
+;;; Check whether important binaries are available.
 ;;;
 
 (use-modules (guix store)
diff --git a/build-aux/check-final-inputs-self-contained.scm b/build-aux/check-final-inputs-self-contained.scm
index 37dc883d3c..c819086508 100644
--- a/build-aux/check-final-inputs-self-contained.scm
+++ b/build-aux/check-final-inputs-self-contained.scm
@@ -17,7 +17,7 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 ;;;
-;;; Check whether important binaries are available at hydra.gnu.org.
+;;; Check whether important binaries are available.
 ;;;
 
 (use-modules (guix store)
diff --git a/build-aux/update-NEWS.scm b/build-aux/update-NEWS.scm
index a9dffef1d2..bf5f0e141b 100644
--- a/build-aux/update-NEWS.scm
+++ b/build-aux/update-NEWS.scm
@@ -30,6 +30,7 @@
              (ice-9 match)
              (ice-9 rdelim)
              (ice-9 regex)
+             (ice-9 vlist)
              (ice-9 pretty-print))
 
 (define %header-rx
@@ -98,31 +99,60 @@ paragraph."
                              (lambda (match port)
                                (let ((stars (match:substring match 1)))
                                  (format port
-                                         "~a ~a new packages~%~%~a~%~%"
-                                         stars (length added)
-                                         (enumeration->paragraph added)))))))))
+                                         "~a ~a new packages~%~%"
+                                         stars (length added)))))))))
 
 (define (write-packages-updates news-file old new)
   "Write to NEWS-FILE the list of packages upgraded between OLD and NEW."
-  (let ((upgraded (filter-map (match-lambda
-                                ((package . new-version)
-                                 (match (assoc package old)
-                                   ((_ . old-version)
-                                    (and (version>? new-version old-version)
-                                         (string-append package "@"
-                                                        new-version)))
-                                   (_ #f))))
-                              new)))
+  (define important
+    '("gcc" "glibc" "binutils" "gdb"                   ;toolchain
+      "shepherd" "linux-libre" "xorg-server" "cups"    ;OS
+      "gnome" "xfce" "enlightenment" "lxde" "mate"     ;desktop env.
+      "guile" "bash" "python" "python2" "perl"         ;languages
+      "ghc" "rust" "go" "julia" "r" "ocaml"
+      "icedtea" "openjdk" "clojure" "sbcl" "racket"
+      "emacs" "gimp" "inkscape" "libreoffice"          ;applications
+      "octave" "icecat" "gnupg"))
+
+  (let* ((table    (fold (lambda (package table)
+                           (match package
+                             ((name . version)
+                              (vhash-cons name version table))))
+                         vlist-null
+                         new))
+         (latest   (lambda (name)
+                     (let ((versions (vhash-fold* cons '() name table)))
+                       (match (sort versions version>?)
+                         ((latest . _) latest)))))
+         (upgraded (filter-map (match-lambda
+                                 ((package . new-version)
+                                  (match (assoc package old)
+                                    ((_ . old-version)
+                                     (and (string=? new-version
+                                                    (latest package))
+                                          (version>? new-version old-version)
+                                          (cons package new-version)))
+                                    (_ #f))))
+                               new))
+         (noteworthy (filter (match-lambda
+                               ((package . version)
+                                (member package important)))
+                             upgraded)))
     (with-atomic-file-replacement news-file
       (lambda (input output)
         (rewrite-org-section input output
                              (make-regexp "^(\\*+) (.*) package updates")
                              (lambda (match port)
-                               (let ((stars (match:substring match 1)))
+                               (let ((stars (match:substring match 1))
+                                     (lst   (map (match-lambda
+                                                   ((package . version)
+                                                    (string-append package " "
+                                                                   version)))
+                                                 noteworthy)))
                                  (format port
-                                         "~a ~a package updates~%~%~a~%~%"
+                                         "~a ~a package updates~%~%Noteworthy updates:~%~a~%~%"
                                          stars (length upgraded)
-                                         (enumeration->paragraph upgraded)))))))))
+                                         (enumeration->paragraph lst)))))))))
 
 
 (define (main . args)
@@ -138,6 +168,8 @@ paragraph."
 
        (let-values (((previous-version new-version)
                      (call-with-input-file news-file NEWS->versions)))
+         (format (current-error-port) "Updating NEWS for ~a to ~a...~%"
+                 previous-version new-version)
          (let* ((old (call-with-input-file (package-file previous-version)
                        read))
                 (new (fold-packages (lambda (p r)
diff --git a/build-aux/update-guix-package.scm b/build-aux/update-guix-package.scm
index 9598872dfd..83f6eca6bb 100644
--- a/build-aux/update-guix-package.scm
+++ b/build-aux/update-guix-package.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2017 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2017, 2018 Ludovic Courtès <ludo@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -133,7 +133,8 @@ COMMIT."
            ;; Add an indirect GC root for SOURCE in the current directory.
            (false-if-exception (delete-file root))
            (symlink source root)
-           (add-indirect-root store root)
+           (add-indirect-root store
+                              (string-append (getcwd) "/" root))
 
            (format #t "source code for commit ~a: ~a (GC root: ~a)~%"
                    commit source root)))))