all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#44650: Do not suggest `guix pull --news' after first pull
@ 2020-11-15  1:56 pelzflorian (Florian Pelz)
  2020-11-15 15:17 ` pelzflorian (Florian Pelz)
  0 siblings, 1 reply; 4+ messages in thread
From: pelzflorian (Florian Pelz) @ 2020-11-15  1:56 UTC (permalink / raw)
  To: 44650

[-- Attachment #1: Type: text/plain, Size: 1146 bytes --]

After doing a `guix pull` on the new VM image
<https://alpha.gnu.org/gnu/guix/guix-system-vm-image-1.2.0rc1.x86_64-linux.xz>,
the following is displayed:

> hint: Run `guix pull --news' to read all the news.
> 
> hint: After setting `PATH', run `hash guix' to make sure your shell refers to `/home/guest/.config/guix/current/bin/guix'.

The former `guix pull --news` is without effect (it is the very first
time I did a `guix pull`).  It is a no-op.  Users should not get the
suggestion to run `guix pull --news`.


Within (guix scripts pull)’ build-and-install procedure, the value of
(display-channel-news-headlines profile) is <unspecified>.

The attached patch changes it to return #f.  I have verified running
`guix pull --news' is not suggested anymore with it (although I have
not tested if news are still displayed).

It would perhaps be nicer if the news since version 1.2.0 were
displayed, but I do not know how to make it so.  I guess since the
original guix package must come from the guix package in (gnu packages
package-management), it is impossible to determine the version from
which news should be computed.

Regards,
Florian

[-- Attachment #2: 0001-pull-Do-not-suggest-running-guix-pull-news-on-the-fi.patch --]
[-- Type: text/plain, Size: 1413 bytes --]

From 8da37dc91f2f82da5f1da0ed2b6f0c0602599e5c Mon Sep 17 00:00:00 2001
From: Florian Pelz <pelzflorian@pelzflorian.de>
Date: Sat, 14 Nov 2020 23:36:52 +0100
Subject: [PATCH] pull: Do not suggest running `guix pull --news' on the first
 run.

* guix/scripts/pull.scm (display-channel-news-headlines): If there
are no news to display, return false instead of <unspecified>.
---
 guix/scripts/pull.scm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm
index bb1b560a22..38405fb79d 100644
--- a/guix/scripts/pull.scm
+++ b/guix/scripts/pull.scm
@@ -385,7 +385,7 @@ previous generation.  Return true if there are news to display."
     (and=> (relative-generation profile -1)
            (cut generation-file-name profile <>)))
 
-  (when previous
+  (if previous
     (let ((old-channels (profile-channels previous))
           (new-channels (profile-channels profile)))
       ;; Find the channels present in both PROFILE and PREVIOUS, and print
@@ -405,7 +405,8 @@ previous generation.  Return true if there are news to display."
                                                       #:concise? #t)))
                     channels))
 
-             (any ->bool more?))))))
+             (any ->bool more?))))
+    #f))
 
 (define (display-news profile)
   ;; Display profile news, with the understanding that this process represents
-- 
2.29.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-11-16 13:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-15  1:56 bug#44650: Do not suggest `guix pull --news' after first pull pelzflorian (Florian Pelz)
2020-11-15 15:17 ` pelzflorian (Florian Pelz)
2020-11-16 11:35   ` Ludovic Courtès
2020-11-16 13:55     ` pelzflorian (Florian Pelz)

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.