GNU bug report logs - #37413
[PATCH 0/9] Channel news distribution mechanism

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Ludovic Courtès <ludo@HIDDEN>; Keywords: patch fixed; Done: Ludovic Courtès <ludo@HIDDEN>; Maintainer for guix-patches is guix-patches@HIDDEN.
bug closed, send any further explanations to 37413 <at> debbugs.gnu.org and Ludovic Courtès <ludo@HIDDEN> Request was from Ludovic Courtès <ludo@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Added tag(s) fixed. Request was from Ludovic Courtès <ludo@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 37413 <at> debbugs.gnu.org:


Received: (at 37413) by debbugs.gnu.org; 23 Sep 2019 09:13:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 23 05:13:48 2019
Received: from localhost ([127.0.0.1]:35045 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iCKPk-0004Db-EA
	for submit <at> debbugs.gnu.org; Mon, 23 Sep 2019 05:13:48 -0400
Received: from eggs.gnu.org ([209.51.188.92]:44801)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1iCKPi-0004DO-HI
 for 37413 <at> debbugs.gnu.org; Mon, 23 Sep 2019 05:13:46 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:46782)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1iCKPZ-0004Qu-Gz; Mon, 23 Sep 2019 05:13:37 -0400
Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=41952 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1iCKPY-0008CW-W5; Mon, 23 Sep 2019 05:13:37 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: "pelzflorian \(Florian Pelz\)" <pelzflorian@HIDDEN>
Subject: Re: [bug#37413] [PATCH v2 11/11] DRAFT etc: Add channel news file.
References: <87sgow0w7w.fsf@HIDDEN> <20190921211228.13096-1-ludo@HIDDEN>
 <20190921211228.13096-12-ludo@HIDDEN>
 <20190922111432.hdmcngftxn34nqvp@HIDDEN>
Date: Mon, 23 Sep 2019 11:13:35 +0200
In-Reply-To: <20190922111432.hdmcngftxn34nqvp@HIDDEN>
 (pelzflorian@HIDDEN's message of "Sun, 22 Sep 2019 13:14:33
 +0200")
Message-ID: <87y2yfjry8.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 37413
Cc: 37413 <at> debbugs.gnu.org, guix-i18n@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hi Florian,

Thanks for these comments!  I=E2=80=99ve fixed the issues you reported and =
push
the result as 90ca791ab082f0513cd5e8af7acfd8db63a6e73a.

So hopefully, next time you pull, =E2=80=98guix pull --news=E2=80=99 will s=
how you the
very first news.

I=E2=80=99ve also created the guix-i18n@HIDDEN alias (Cc=E2=80=99d), where=
 I added
yourself, Julien, Miguel, Meiyo, and znavko (see
<https://issues.guix.gnu.org/issue/37413> for context.)

This alias should be low-traffic (one translation request per month
maybe?), but please let me know if you do not want to be there.

Florian, note that I=E2=80=99m still open to a PO-based translation workflo=
w.  I
prefer to leave it to you translators to see whether/how this could be
set up, as discussed earlier.

Thanks,
Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#37413; Package guix-patches. Full text available.

Message received at 37413 <at> debbugs.gnu.org:


Received: (at 37413) by debbugs.gnu.org; 22 Sep 2019 11:14:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 22 07:14:38 2019
Received: from localhost ([127.0.0.1]:33436 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iBzp7-0007DX-Vv
	for submit <at> debbugs.gnu.org; Sun, 22 Sep 2019 07:14:38 -0400
Received: from pelzflorian.de ([5.45.111.108]:49460 helo=mail.pelzflorian.de)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pelzflorian@HIDDEN>) id 1iBzp5-0007DO-3r
 for 37413 <at> debbugs.gnu.org; Sun, 22 Sep 2019 07:14:36 -0400
Received: from pelzflorian.localdomain (unknown [5.45.111.108])
 by mail.pelzflorian.de (Postfix) with ESMTPSA id 09D08360035;
 Sun, 22 Sep 2019 13:14:33 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pelzflorian.de;
 s=mail; t=1569150874;
 bh=7ive0JLZeSaTakfnrVRxGYNdB6OkwaPB43GVuSuXYWU=;
 h=Date:From:To:Cc:Subject:References:In-Reply-To;
 b=oSrbqedAz7Ywi7fcAqpQEOF2aIWV9dQTIYkxmUm43AXtsPl/VBmNEEayBUH4UCPYz
 1JelUpUSZkh4aBuFTcsVRQfiJwIwPy+qB5Ui3Sidq8M4Pnogm4/VD328AE0EPbhMC1
 6LR3ScYWOPov3+nKPIM/4C/JSlDyCfp3CESbLhWk=
Date: Sun, 22 Sep 2019 13:14:33 +0200
From: "pelzflorian (Florian Pelz)" <pelzflorian@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: [bug#37413] [PATCH v2 11/11] DRAFT etc: Add channel news file.
Message-ID: <20190922111432.hdmcngftxn34nqvp@HIDDEN>
References: <87sgow0w7w.fsf@HIDDEN> <20190921211228.13096-1-ludo@HIDDEN>
 <20190921211228.13096-12-ludo@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <20190921211228.13096-12-ludo@HIDDEN>
User-Agent: NeoMutt/20180716
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 37413
Cc: 37413 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

I can only make comments about the text. :D

Patch 1:

On Sat, Sep 21, 2019 at 11:12:18PM +0200, Ludovic Courtès wrote:
> +(define (display-channel-news profile)
> +  "Display new about the channels of PROFILE "

You fixed it in patch 8 anyway, so you can ignore it: Docstring should
be "Display news…" with s.

Patch 4:

On Sat, Sep 21, 2019 at 11:12:21PM +0200, Ludovic Courtès wrote:
> +The @code{title} field should be a one-line summary while @code{body}
> +can be arbitrary long, and both can contain Texinfo markup
> +(@pxref{Overview,,, texinfo, GNU Texinfo}).  Both the title and body are
> +a list of language tag/message tuples, which allows @command{guix pull}
> +to display news in the language that corresponds to the user's locale.

“arbitrarily” with -ly.

Patch 11:

On Sat, Sep 21, 2019 at 11:12:28PM +0200, Ludovic Courtès wrote:
> +(channel-news
> + (version 0)
> + (entry (commit "d17f14c167791b640e49b2b6443d20f9534c62d7")
> +        (title (en "New channel news mechanism")
> +               (fr "Nouveau mécanisme d'information sur les canaux"))

German would be:

(de "Neuer Mechanismus, um Neuigkeiten über Kanäle anzuzeigen.")



> +        (body
> +         (en "You are reading this message through the new channel news
> +mechanism, congratulations!  This mechanism allows channel authors to provide
> +@dfn{news entries} that their users can view with @command{guix pull --news}.
> +Run @command{info \"(guix) Invoking guix pull\"} for more info.")
> +         (fr "Ce message t'arrive à travers le nouveau mécanisme d'information
> +des canaux, bravo !  Ce mécanisme permet aux auteur·rice·s de canaux de
> +fournir des informations qu'on peut visualiser avec @command{guix pull
> +--news}.  Tape @command{info \"(guix.fr) Invoquer guix pull\"} pour plus de
> +détails."))))

German would be:

(de "Sie lesen diese Meldung mit Hilfe des neuen Mechanismus, um
Neuigkeiten über Kanäle anzuzeigen — Glückwunsch! Mit diesem
Mechanismus können Kanalautoren Ihren Nutzern @dfn{Einträge zu
Neuigkeiten} mitteilen, die diese sich mit @command{guix pull --news}
anzeigen lassen können. Führen Sie @command{info \"(guix.de) Aufruf
von guix pull\"} aus, um weitere Informationen zu erhalten.")

(Of course the German manual does not actually contain translated
information yet, but whatever.  It would be nice if the Translation
Project would accept new PO files without marking PO entries as fuzzy
that changed since the old version at the TP.)

Regards,
Florian




Information forwarded to guix-patches@HIDDEN:
bug#37413; Package guix-patches. Full text available.

Message received at 37413 <at> debbugs.gnu.org:


Received: (at 37413) by debbugs.gnu.org; 21 Sep 2019 21:13:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 21 17:13:05 2019
Received: from localhost ([127.0.0.1]:33246 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iBmgi-0000Nw-Ug
	for submit <at> debbugs.gnu.org; Sat, 21 Sep 2019 17:13:05 -0400
Received: from eggs.gnu.org ([209.51.188.92]:32834)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1iBmgd-0000Ln-70
 for 37413 <at> debbugs.gnu.org; Sat, 21 Sep 2019 17:12:59 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:49548)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1iBmgY-0005lL-4e; Sat, 21 Sep 2019 17:12:54 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=53014 helo=gnu.org)
 by fencepost.gnu.org with esmtpsa
 (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82)
 (envelope-from <ludo@HIDDEN>)
 id 1iBmgX-00065A-Lu; Sat, 21 Sep 2019 17:12:53 -0400
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 37413 <at> debbugs.gnu.org
Subject: [PATCH v2 11/11] DRAFT etc: Add channel news file.
Date: Sat, 21 Sep 2019 23:12:28 +0200
Message-Id: <20190921211228.13096-12-ludo@HIDDEN>
X-Mailer: git-send-email 2.23.0
In-Reply-To: <20190921211228.13096-1-ludo@HIDDEN>
References: <87sgow0w7w.fsf@HIDDEN>
 <20190921211228.13096-1-ludo@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 37413
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

DRAFT: Update commit ID before pushing.

* etc/news.scm: New file.
* Makefile.am (EXTRA_DIST): Add it.
---
 Makefile.am  |  1 +
 etc/news.scm | 23 +++++++++++++++++++++++
 2 files changed, 24 insertions(+)
 create mode 100644 etc/news.scm

diff --git a/Makefile.am b/Makefile.am
index 3c27d8ee10..6a4cfcd4a1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -536,6 +536,7 @@ EXTRA_DIST +=						\
   .guix-channel						\
   scripts/guix.in					\
   etc/guix-install.sh					\
+  etc/news.scm						\
   build-aux/build-self.scm				\
   build-aux/compile-all.scm				\
   build-aux/hydra/evaluate.scm				\
diff --git a/etc/news.scm b/etc/news.scm
new file mode 100644
index 0000000000..05241b36e7
--- /dev/null
+++ b/etc/news.scm
@@ -0,0 +1,23 @@
+;; GNU Guix news, for use by 'guix pull'.
+;;
+;; Copyright © 2019 Ludovic Courtès <ludo@HIDDEN>
+;;
+;; Copying and distribution of this file, with or without modification, are
+;; permitted in any medium without royalty provided the copyright notice and
+;; this notice are preserved.
+
+(channel-news
+ (version 0)
+ (entry (commit "d17f14c167791b640e49b2b6443d20f9534c62d7")
+        (title (en "New channel news mechanism")
+               (fr "Nouveau mécanisme d'information sur les canaux"))
+        (body
+         (en "You are reading this message through the new channel news
+mechanism, congratulations!  This mechanism allows channel authors to provide
+@dfn{news entries} that their users can view with @command{guix pull --news}.
+Run @command{info \"(guix) Invoking guix pull\"} for more info.")
+         (fr "Ce message t'arrive à travers le nouveau mécanisme d'information
+des canaux, bravo !  Ce mécanisme permet aux auteur·rice·s de canaux de
+fournir des informations qu'on peut visualiser avec @command{guix pull
+--news}.  Tape @command{info \"(guix.fr) Invoquer guix pull\"} pour plus de
+détails."))))
-- 
2.23.0





Information forwarded to guix-patches@HIDDEN:
bug#37413; Package guix-patches. Full text available.

Message received at 37413 <at> debbugs.gnu.org:


Received: (at 37413) by debbugs.gnu.org; 21 Sep 2019 21:13:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 21 17:13:05 2019
Received: from localhost ([127.0.0.1]:33243 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iBmgg-0000Ne-4M
	for submit <at> debbugs.gnu.org; Sat, 21 Sep 2019 17:13:04 -0400
Received: from eggs.gnu.org ([209.51.188.92]:32832)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1iBmgc-0000Lg-DP
 for 37413 <at> debbugs.gnu.org; Sat, 21 Sep 2019 17:12:58 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:49547)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1iBmgX-0005kk-9i; Sat, 21 Sep 2019 17:12:53 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=53014 helo=gnu.org)
 by fencepost.gnu.org with esmtpsa
 (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82)
 (envelope-from <ludo@HIDDEN>)
 id 1iBmgW-00065A-Q5; Sat, 21 Sep 2019 17:12:53 -0400
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 37413 <at> debbugs.gnu.org
Subject: [PATCH v2 10/11] Add '.guix-channel' file.
Date: Sat, 21 Sep 2019 23:12:27 +0200
Message-Id: <20190921211228.13096-11-ludo@HIDDEN>
X-Mailer: git-send-email 2.23.0
In-Reply-To: <20190921211228.13096-1-ludo@HIDDEN>
References: <87sgow0w7w.fsf@HIDDEN>
 <20190921211228.13096-1-ludo@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 37413
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

* .guix-channel: New file.
* Makefile.am (EXTRA_DIST): Add it.
---
 .guix-channel | 5 +++++
 Makefile.am   | 1 +
 2 files changed, 6 insertions(+)
 create mode 100644 .guix-channel

diff --git a/.guix-channel b/.guix-channel
new file mode 100644
index 0000000000..3e618d79f8
--- /dev/null
+++ b/.guix-channel
@@ -0,0 +1,5 @@
+;; This is a Guix channel.
+
+(channel
+  (version 0)
+  (news-file "etc/news.scm"))
diff --git a/Makefile.am b/Makefile.am
index 658f03bd54..3c27d8ee10 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -533,6 +533,7 @@ EXTRA_DIST +=						\
   TODO							\
   CODE-OF-CONDUCT					\
   .dir-locals.el					\
+  .guix-channel						\
   scripts/guix.in					\
   etc/guix-install.sh					\
   build-aux/build-self.scm				\
-- 
2.23.0





Information forwarded to guix-patches@HIDDEN:
bug#37413; Package guix-patches. Full text available.

Message received at 37413 <at> debbugs.gnu.org:


Received: (at 37413) by debbugs.gnu.org; 21 Sep 2019 21:13:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 21 17:13:02 2019
Received: from localhost ([127.0.0.1]:33241 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iBmgf-0000NO-F3
	for submit <at> debbugs.gnu.org; Sat, 21 Sep 2019 17:13:02 -0400
Received: from eggs.gnu.org ([209.51.188.92]:32830)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1iBmgb-0000LZ-H2
 for 37413 <at> debbugs.gnu.org; Sat, 21 Sep 2019 17:12:58 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:49546)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1iBmgW-0005iC-Du; Sat, 21 Sep 2019 17:12:52 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=53014 helo=gnu.org)
 by fencepost.gnu.org with esmtpsa
 (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82)
 (envelope-from <ludo@HIDDEN>)
 id 1iBmgV-00065A-TX; Sat, 21 Sep 2019 17:12:52 -0400
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 37413 <at> debbugs.gnu.org
Subject: [PATCH v2 09/11] pull: Display news titles directly upon 'pull'.
Date: Sat, 21 Sep 2019 23:12:26 +0200
Message-Id: <20190921211228.13096-10-ludo@HIDDEN>
X-Mailer: git-send-email 2.23.0
In-Reply-To: <20190921211228.13096-1-ludo@HIDDEN>
References: <87sgow0w7w.fsf@HIDDEN>
 <20190921211228.13096-1-ludo@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 37413
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

* guix/scripts/pull.scm (display-profile-news): Return true when there's
more to display.
(display-news-entry-title): New procedure.
(display-news-entry): Use it.
(display-channel-specific-news): Return true when there's more to
display.
(display-channel-news-headlines): New procedure.
(build-and-install): Call it.  When 'display-channel-news-headlines' or
'display-profile-news' returns #t, print a hint to run "pull --news".
(display-new/upgraded-packages): Return true when there's more to display.
---
 guix/scripts/pull.scm | 112 ++++++++++++++++++++++++++++++------------
 1 file changed, 81 insertions(+), 31 deletions(-)

diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm
index 4a4756dc6e..a7fd36fffc 100644
--- a/guix/scripts/pull.scm
+++ b/guix/scripts/pull.scm
@@ -189,7 +189,7 @@ Download and deploy the latest version of Guix.\n"))
                                current-is-newer?)
   "Display what's up in PROFILE--new packages, and all that.  If
 CURRENT-IS-NEWER? is true, assume that the current process represents the
-newest generation of PROFILE."
+newest generation of PROFILE.  Return true when there's more info to display."
   (match (memv (generation-number profile)
                (reverse (profile-generations profile)))
     ((current previous _ ...)
@@ -212,7 +212,7 @@ newest generation of PROFILE."
                                         #:concise? concise?
                                         #:heading
                                         (G_ "New in this revision:\n")))))
-    (_ #t)))
+    (_ #f)))
 
 (define (display-channel channel)
   "Display information about CHANNEL."
@@ -230,33 +230,44 @@ purposes."
   ;; Assume that the URL matters less than the name.
   (eq? (channel-name channel1) (channel-name channel2)))
 
+(define (display-news-entry-title entry language port)
+  "Display the title of ENTRY, a news entry, to PORT."
+  (define title
+    (channel-news-entry-title entry))
+
+  (format port "  ~a~%"
+          (highlight
+           (string-trim-right
+            (texi->plain-text (or (assoc-ref title language)
+                                  (assoc-ref title (%default-message-language))
+                                  ""))))))
+
 (define (display-news-entry entry language port)
   "Display ENTRY, a <channel-news-entry>, in LANGUAGE, a language code, to
 PORT."
-  (let ((title (channel-news-entry-title entry))
-        (body  (channel-news-entry-body entry)))
-    (format port "  ~a~%"
-            (highlight
+  (define body
+    (channel-news-entry-body entry))
+
+  (display-news-entry-title entry language port)
+  (format port (G_ "    commit ~a~%")
+          (channel-news-entry-commit entry))
+  (newline port)
+  (format port "    ~a~%"
+          (indented-string
+           (parameterize ((%text-width (- (%text-width) 4)))
              (string-trim-right
-              (texi->plain-text (or (assoc-ref title language)
-                                    (assoc-ref title (%default-message-language))
-                                    "")))))
-    (format port (G_ "    commit ~a~%")
-            (channel-news-entry-commit entry))
-    (newline port)
-    (format port "    ~a~%"
-            (indented-string
-             (parameterize ((%text-width (- (%text-width) 4)))
-               (string-trim-right
-                (texi->plain-text (or (assoc-ref body language)
-                                      (assoc-ref body (%default-message-language))
-                                      ""))))
-             4))))
+              (texi->plain-text (or (assoc-ref body language)
+                                    (assoc-ref body (%default-message-language))
+                                    ""))))
+           4)))
 
 (define* (display-channel-specific-news new old
-                                        #:key (port (current-output-port)))
+                                        #:key (port (current-output-port))
+                                        concise?)
   "Display channel news applicable the commits between OLD and NEW, where OLD
-and NEW are <channel> records with a proper 'commit' field."
+and NEW are <channel> records with a proper 'commit' field.  When CONCISE? is
+true, display nothing but the news titles.  Return true if there are more news
+to display."
   (let ((channel new)
         (old     (channel-commit old))
         (new     (channel-commit new)))
@@ -264,13 +275,17 @@ and NEW are <channel> records with a proper 'commit' field."
       (let ((language (current-message-language)))
         (match (channel-news-for-commit channel new old)
           (()                                     ;no news is good news
-           #t)
+           #f)
           ((entries ...)
            (newline port)
            (format port (G_ "News for channel '~a'~%")
                    (channel-name channel))
-           (for-each (cut display-news-entry <> language port) entries)
-           (newline port)))))))
+           (for-each (if concise?
+                         (cut display-news-entry-title <> language port)
+                         (cut display-news-entry <> language port))
+                     entries)
+           (newline port)
+           #t))))))
 
 (define* (display-channel-news profile
                                #:optional
@@ -317,6 +332,35 @@ and NEW are <channel> records with a proper 'commit' field."
                                      (and old (list new old)))
                                    new-channels)))))))
 
+(define* (display-channel-news-headlines profile)
+  "Display the titles of news about the channels of PROFILE compared to its
+previous generation.  Return true if there are news to display."
+  (define previous
+    (and=> (relative-generation profile -1)
+           (cut generation-file-name profile <>)))
+
+  (when previous
+    (let ((old-channels (profile-channels previous))
+          (new-channels (profile-channels profile)))
+      ;; Find the channels present in both PROFILE and PREVIOUS, and print
+      ;; their news.
+      (and (pair? old-channels) (pair? new-channels)
+           (let ((channels (filter-map (lambda (new)
+                                         (define old
+                                           (find (cut channel=? new <>)
+                                                 old-channels))
+
+                                         (and old (list new old)))
+                                       new-channels)))
+             (define more?
+               (map (match-lambda
+                      ((new old)
+                       (display-channel-specific-news new old
+                                                      #:concise? #t)))
+                    channels))
+
+             (any ->bool more?))))))
+
 (define (display-news profile)
   ;; Display profile news, with the understanding that this process represents
   ;; the newest generation.
@@ -344,7 +388,12 @@ true, display what would be built without actually building it."
                       #:dry-run? dry-run?)
       (munless dry-run?
         (return (newline))
-        (return (display-profile-news profile #:concise? #t))
+        (return
+         (let ((more? (list (display-profile-news profile #:concise? #t)
+                            (display-channel-news-headlines profile))))
+           (when (any ->bool more?)
+             (display-hint
+              (G_ "Run @command{guix pull --news} to read all the news.")))))
         (if guix-command
             (let ((new (map (cut string-append <> "/bin/guix")
                             (list (user-friendly-profile profile)
@@ -544,7 +593,9 @@ it."
   "Given the two package name/version alists ALIST1 and ALIST2, display the
 list of new and upgraded packages going from ALIST1 to ALIST2.  When ALIST1
 and ALIST2 differ, display HEADING upfront.  When CONCISE? is true, do not
-display long package lists that would fill the user's screen."
+display long package lists that would fill the user's screen.
+
+Return true when there is more package info to display."
   (define (pretty str column)
     (indented-string (fill-paragraph str (- (%text-width) 4)
                                      column)
@@ -587,10 +638,9 @@ display long package lists that would fill the user's screen."
                (pretty (list->enumeration (sort upgraded string<?))
                        35))))
 
-    (when (and concise?
-               (or (> new-count concise/max-item-count)
-                   (> upgraded-count concise/max-item-count)))
-      (display-hint (G_ "Run @command{guix pull --news} to read all the news.")))))
+    (and concise?
+         (or (> new-count concise/max-item-count)
+             (> upgraded-count concise/max-item-count)))))
 
 (define (display-profile-content-diff profile gen1 gen2)
   "Display the changes in PROFILE GEN2 compared to generation GEN1."
-- 
2.23.0





Information forwarded to guix-patches@HIDDEN:
bug#37413; Package guix-patches. Full text available.

Message received at 37413 <at> debbugs.gnu.org:


Received: (at 37413) by debbugs.gnu.org; 21 Sep 2019 21:13:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 21 17:13:01 2019
Received: from localhost ([127.0.0.1]:33239 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iBmgf-0000NH-4q
	for submit <at> debbugs.gnu.org; Sat, 21 Sep 2019 17:13:01 -0400
Received: from eggs.gnu.org ([209.51.188.92]:32828)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1iBmga-0000LL-K0
 for 37413 <at> debbugs.gnu.org; Sat, 21 Sep 2019 17:12:57 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:49545)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1iBmgV-0005fj-HN; Sat, 21 Sep 2019 17:12:51 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=53014 helo=gnu.org)
 by fencepost.gnu.org with esmtpsa
 (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82)
 (envelope-from <ludo@HIDDEN>)
 id 1iBmgV-00065A-2T; Sat, 21 Sep 2019 17:12:51 -0400
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 37413 <at> debbugs.gnu.org
Subject: [PATCH v2 08/11] pull: '-l' displays channel news.
Date: Sat, 21 Sep 2019 23:12:25 +0200
Message-Id: <20190921211228.13096-9-ludo@HIDDEN>
X-Mailer: git-send-email 2.23.0
In-Reply-To: <20190921211228.13096-1-ludo@HIDDEN>
References: <87sgow0w7w.fsf@HIDDEN>
 <20190921211228.13096-1-ludo@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 37413
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

* guix/scripts/pull.scm (display-channel-news): Make 'previous' a
parameter.
(process-query)[list-generations]: Call 'display-channel-news'.
---
 guix/scripts/pull.scm | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm
index 85291c3745..4a4756dc6e 100644
--- a/guix/scripts/pull.scm
+++ b/guix/scripts/pull.scm
@@ -272,12 +272,12 @@ and NEW are <channel> records with a proper 'commit' field."
            (for-each (cut display-news-entry <> language port) entries)
            (newline port)))))))
 
-(define (display-channel-news profile)
-  "Display new about the channels of PROFILE "
-  (define previous
-    (and=> (relative-generation profile -1)
-           (cut generation-file-name profile <>)))
-
+(define* (display-channel-news profile
+                               #:optional
+                               (previous
+                                (and=> (relative-generation profile -1)
+                                       (cut generation-file-name profile <>))))
+  "Display news about the channels of PROFILE compared to PREVIOUS."
   (when previous
     (let ((old-channels (profile-channels previous))
           (new-channels (profile-channels profile)))
@@ -614,6 +614,8 @@ display long package lists that would fill the user's screen."
               ((first second rest ...)
                (display-profile-content-diff profile
                                              first second)
+               (display-channel-news (generation-file-name profile second)
+                                     (generation-file-name profile first))
                (loop (cons second rest)))
               ((_) #t)
               (()  #t))))))
-- 
2.23.0





Information forwarded to guix-patches@HIDDEN:
bug#37413; Package guix-patches. Full text available.

Message received at 37413 <at> debbugs.gnu.org:


Received: (at 37413) by debbugs.gnu.org; 21 Sep 2019 21:13:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 21 17:13:01 2019
Received: from localhost ([127.0.0.1]:33237 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iBmge-0000NA-SH
	for submit <at> debbugs.gnu.org; Sat, 21 Sep 2019 17:13:01 -0400
Received: from eggs.gnu.org ([209.51.188.92]:32823)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1iBmgY-0000L6-Tu
 for 37413 <at> debbugs.gnu.org; Sat, 21 Sep 2019 17:12:57 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:49543)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1iBmgT-0005fN-Rd; Sat, 21 Sep 2019 17:12:49 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=53014 helo=gnu.org)
 by fencepost.gnu.org with esmtpsa
 (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82)
 (envelope-from <ludo@HIDDEN>)
 id 1iBmgT-00065A-C6; Sat, 21 Sep 2019 17:12:49 -0400
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 37413 <at> debbugs.gnu.org
Subject: [PATCH v2 06/11] ui: Add 'current-message-language'.
Date: Sat, 21 Sep 2019 23:12:23 +0200
Message-Id: <20190921211228.13096-7-ludo@HIDDEN>
X-Mailer: git-send-email 2.23.0
In-Reply-To: <20190921211228.13096-1-ludo@HIDDEN>
References: <87sgow0w7w.fsf@HIDDEN>
 <20190921211228.13096-1-ludo@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 37413
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

* guix/ui.scm (%default-message-language): New variable.
(current-message-language): New procedure.
---
 guix/ui.scm | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/guix/ui.scm b/guix/ui.scm
index 4be31db047..069d542131 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -121,6 +121,10 @@
             roll-back*
             switch-to-generation*
             delete-generation*
+
+            %default-message-language
+            current-message-language
+
             run-guix-command
             run-guix
             guix-main))
@@ -428,6 +432,20 @@ exiting.  ARGS is the list of arguments received by the 'throw' handler."
 report them in a user-friendly way."
   (call-with-unbound-variable-handling (lambda () exp ...)))
 
+(define %default-message-language
+  ;; Default language to use for messages.
+  (make-parameter "en"))
+
+(define (current-message-language)
+  "Return the language used for messages according to the current locale.
+Return %DEFAULT-MESSAGE-LANGUAGE if that information could not be obtained.  The
+result is an ISO-639-2 language code such as \"ar\", without the territory
+part."
+  (let ((locale (setlocale LC_MESSAGES)))
+    (match (string-index locale #\_)
+      (#f    locale)
+      (index (string-take locale index)))))
+
 (define (install-locale)
   "Install the current locale settings."
   (catch 'system-error
-- 
2.23.0





Information forwarded to guix-patches@HIDDEN:
bug#37413; Package guix-patches. Full text available.

Message received at 37413 <at> debbugs.gnu.org:


Received: (at 37413) by debbugs.gnu.org; 21 Sep 2019 21:13:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 21 17:13:00 2019
Received: from localhost ([127.0.0.1]:33235 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iBmge-0000N6-F6
	for submit <at> debbugs.gnu.org; Sat, 21 Sep 2019 17:13:00 -0400
Received: from eggs.gnu.org ([209.51.188.92]:32826)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1iBmgZ-0000LF-Ou
 for 37413 <at> debbugs.gnu.org; Sat, 21 Sep 2019 17:12:57 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:49544)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1iBmgU-0005fW-MU; Sat, 21 Sep 2019 17:12:50 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=53014 helo=gnu.org)
 by fencepost.gnu.org with esmtpsa
 (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82)
 (envelope-from <ludo@HIDDEN>)
 id 1iBmgU-00065A-7b; Sat, 21 Sep 2019 17:12:50 -0400
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 37413 <at> debbugs.gnu.org
Subject: [PATCH v2 07/11] pull: Display channel news.
Date: Sat, 21 Sep 2019 23:12:24 +0200
Message-Id: <20190921211228.13096-8-ludo@HIDDEN>
X-Mailer: git-send-email 2.23.0
In-Reply-To: <20190921211228.13096-1-ludo@HIDDEN>
References: <87sgow0w7w.fsf@HIDDEN>
 <20190921211228.13096-1-ludo@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 37413
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

* guix/scripts/pull.scm (display-news-entry)
(display-channel-specific-news): New procedures.
(display-channel-news): Call it.
(display-new/upgraded-packages): Adjust hint message.
* doc/guix.texi (Invoking guix pull): Mention it.
---
 doc/guix.texi         | 11 +++++---
 guix/scripts/pull.scm | 61 ++++++++++++++++++++++++++++++++++++++++---
 2 files changed, 65 insertions(+), 7 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 5addb1f5ee..50adce4dd3 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -3720,13 +3720,16 @@ Read the list of channels from @var{file} instead of
 evaluates to a list of channel objects.  @xref{Channels}, for more
 information.
 
+@cindex channel news
 @item --news
 @itemx -N
-Display the list of packages added or upgraded since the previous generation.
+Display the list of packages added or upgraded since the previous
+generation, as well as, occasionally, news written by channel authors
+for their users (@pxref{Channels, Writing Channel News}).
 
-This is the same information as displayed upon @command{guix pull} completion,
-but without ellipses; it is also similar to the output of @command{guix pull
--l} for the last generation (see below).
+The package information is the same as displayed upon @command{guix
+pull} completion, but without ellipses; it is also similar to the output
+of @command{guix pull -l} for the last generation (see below).
 
 @item --list-generations[=@var{pattern}]
 @itemx -l [@var{pattern}]
diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm
index 4091f926ac..85291c3745 100644
--- a/guix/scripts/pull.scm
+++ b/guix/scripts/pull.scm
@@ -19,6 +19,7 @@
 
 (define-module (guix scripts pull)
   #:use-module (guix ui)
+  #:use-module (guix colors)
   #:use-module (guix utils)
   #:use-module ((guix status) #:select (with-status-verbosity))
   #:use-module (guix scripts)
@@ -229,6 +230,48 @@ purposes."
   ;; Assume that the URL matters less than the name.
   (eq? (channel-name channel1) (channel-name channel2)))
 
+(define (display-news-entry entry language port)
+  "Display ENTRY, a <channel-news-entry>, in LANGUAGE, a language code, to
+PORT."
+  (let ((title (channel-news-entry-title entry))
+        (body  (channel-news-entry-body entry)))
+    (format port "  ~a~%"
+            (highlight
+             (string-trim-right
+              (texi->plain-text (or (assoc-ref title language)
+                                    (assoc-ref title (%default-message-language))
+                                    "")))))
+    (format port (G_ "    commit ~a~%")
+            (channel-news-entry-commit entry))
+    (newline port)
+    (format port "    ~a~%"
+            (indented-string
+             (parameterize ((%text-width (- (%text-width) 4)))
+               (string-trim-right
+                (texi->plain-text (or (assoc-ref body language)
+                                      (assoc-ref body (%default-message-language))
+                                      ""))))
+             4))))
+
+(define* (display-channel-specific-news new old
+                                        #:key (port (current-output-port)))
+  "Display channel news applicable the commits between OLD and NEW, where OLD
+and NEW are <channel> records with a proper 'commit' field."
+  (let ((channel new)
+        (old     (channel-commit old))
+        (new     (channel-commit new)))
+    (when (and old new)
+      (let ((language (current-message-language)))
+        (match (channel-news-for-commit channel new old)
+          (()                                     ;no news is good news
+           #t)
+          ((entries ...)
+           (newline port)
+           (format port (G_ "News for channel '~a'~%")
+                   (channel-name channel))
+           (for-each (cut display-news-entry <> language port) entries)
+           (newline port)))))))
+
 (define (display-channel-news profile)
   "Display new about the channels of PROFILE "
   (define previous
@@ -259,7 +302,20 @@ purposes."
                           (N_ "  ~*One channel removed:~%"
                               "  ~a channels removed:~%" count)
                           count)
-                  (for-each display-channel removed)))))))))
+                  (for-each display-channel removed))))
+
+             ;; Display channel-specific news for those channels that were
+             ;; here before and are still around afterwards.
+             (for-each (match-lambda
+                         ((new old)
+                          (display-channel-specific-news new old)))
+                       (filter-map (lambda (new)
+                                     (define old
+                                       (find (cut channel=? new <>)
+                                             old-channels))
+
+                                     (and old (list new old)))
+                                   new-channels)))))))
 
 (define (display-news profile)
   ;; Display profile news, with the understanding that this process represents
@@ -534,8 +590,7 @@ display long package lists that would fill the user's screen."
     (when (and concise?
                (or (> new-count concise/max-item-count)
                    (> upgraded-count concise/max-item-count)))
-      (display-hint (G_ "Run @command{guix pull --news} to view the complete
-list of package changes.")))))
+      (display-hint (G_ "Run @command{guix pull --news} to read all the news.")))))
 
 (define (display-profile-content-diff profile gen1 gen2)
   "Display the changes in PROFILE GEN2 compared to generation GEN1."
-- 
2.23.0





Information forwarded to guix-patches@HIDDEN:
bug#37413; Package guix-patches. Full text available.

Message received at 37413 <at> debbugs.gnu.org:


Received: (at 37413) by debbugs.gnu.org; 21 Sep 2019 21:13:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 21 17:13:00 2019
Received: from localhost ([127.0.0.1]:33233 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iBmgd-0000Mv-Uj
	for submit <at> debbugs.gnu.org; Sat, 21 Sep 2019 17:13:00 -0400
Received: from eggs.gnu.org ([209.51.188.92]:32822)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1iBmgY-0000L4-2O
 for 37413 <at> debbugs.gnu.org; Sat, 21 Sep 2019 17:12:54 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:49542)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1iBmgS-0005fE-W6; Sat, 21 Sep 2019 17:12:49 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=53014 helo=gnu.org)
 by fencepost.gnu.org with esmtpsa
 (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82)
 (envelope-from <ludo@HIDDEN>)
 id 1iBmgS-00065A-Gv; Sat, 21 Sep 2019 17:12:48 -0400
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 37413 <at> debbugs.gnu.org
Subject: [PATCH v2 05/11] channels: Allow news entries to refer to a tag.
Date: Sat, 21 Sep 2019 23:12:22 +0200
Message-Id: <20190921211228.13096-6-ludo@HIDDEN>
X-Mailer: git-send-email 2.23.0
In-Reply-To: <20190921211228.13096-1-ludo@HIDDEN>
References: <87sgow0w7w.fsf@HIDDEN>
 <20190921211228.13096-1-ludo@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 37413
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Suggested by Ricardo Wurmus <rekado@HIDDEN>.

* guix/channels.scm (<channel-news-entry>)[tag]: New field.
(sexp->channel-news-entry): Accept either 'commit' or 'tag' in 'entry'
forms.
(resolve-channel-news-entry-tag): New procedure.
(channel-news-for-commit): Move 'with-repository' form one level
higher.  Call 'resolve-channel-news-entry-tag' on all the news entries.
* guix/tests/git.scm (populate-git-repository): Add clause for 'tag'.
* tests/channels.scm ("channel-news, one entry"): Create a tag and add
an entry with a tag.  Check that the tag is resolved and also visible in
the <channel-news-entry> record.
* doc/guix.texi (Channels): Mention tags in news entries.
---
 doc/guix.texi      |  8 ++++----
 guix/channels.scm  | 42 ++++++++++++++++++++++++++++++++----------
 guix/tests/git.scm |  3 +++
 tests/channels.scm |  9 +++++++--
 4 files changed, 46 insertions(+), 16 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 712c0811a5..5addb1f5ee 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -4018,7 +4018,7 @@ something like this:
 @lisp
 (channel-news
   (version 0)
-  (entry (commit "d894ab8e9bfabcefa6c49d9ba2e834dd5a73a300")
+  (entry (tag "the-bug-fix")
          (title (en "Fixed terrible bug")
                 (fr "Oh la la"))
          (body (en "@@emph@{Good news@}!  It's fixed!")
@@ -4030,9 +4030,9 @@ something like this:
 @end lisp
 
 The file consists of a list of @dfn{news entries}.  Each entry is
-associated with a commit: it describes changes made in this commit,
-possibly in preceding commits as well.  Users see entries only the first
-time they obtain the commit the entry refers to.
+associated with a commit or tag: it describes changes made in this
+commit, possibly in preceding commits as well.  Users see entries only
+the first time they obtain the commit the entry refers to.
 
 The @code{title} field should be a one-line summary while @code{body}
 can be arbitrary long, and both can contain Texinfo markup
diff --git a/guix/channels.scm b/guix/channels.scm
index 0dadba616f..4e6e7090ac 100644
--- a/guix/channels.scm
+++ b/guix/channels.scm
@@ -40,6 +40,7 @@
   #:use-module (srfi srfi-2)
   #:use-module (srfi srfi-9)
   #:use-module (srfi srfi-11)
+  #:use-module (srfi srfi-26)
   #:use-module (srfi srfi-34)
   #:use-module (srfi srfi-35)
   #:autoload   (guix self) (whole-package make-config.scm)
@@ -73,6 +74,7 @@
 
             channel-news-entry?
             channel-news-entry-commit
+            channel-news-entry-tag
             channel-news-entry-title
             channel-news-entry-body
 
@@ -586,9 +588,10 @@ PROFILE is not a profile created by 'guix pull', return the empty list."
 
 ;; News entry, associated with a specific commit of the channel.
 (define-record-type <channel-news-entry>
-  (channel-news-entry commit title body)
+  (channel-news-entry commit tag title body)
   channel-news-entry?
-  (commit  channel-news-entry-commit)             ;hex string
+  (commit  channel-news-entry-commit)             ;hex string | #f
+  (tag     channel-news-entry-tag)                ;#f | string
   (title   channel-news-entry-title)              ;list of language tag/string pairs
   (body    channel-news-entry-body))              ;list of language tag/string pairs
 
@@ -598,11 +601,12 @@ PROFILE is not a profile created by 'guix pull', return the empty list."
     (cons (symbol->string language) message))
 
   (match entry
-    (('entry ('commit commit)
+    (('entry ((and (or 'commit 'tag) type) commit-or-tag)
              ('title ((? symbol? title-tags) (? string? titles)) ...)
              ('body ((? symbol? body-tags) (? string? bodies)) ...)
              _ ...)
-     (channel-news-entry commit
+     (channel-news-entry (and (eq? type 'commit) commit-or-tag)
+                         (and (eq? type 'tag) commit-or-tag)
                          (map pair title-tags titles)
                          (map pair body-tags bodies)))
     (_
@@ -633,6 +637,20 @@ record."
               (location (source-properties->location
                          (source-properties sexp)))))))))
 
+(define (resolve-channel-news-entry-tag repository entry)
+  "If ENTRY has its 'commit' field set, return ENTRY.  Otherwise, lookup
+ENTRY's 'tag' in REPOSITORY and return ENTRY with its 'commit' field set to
+the field its 'tag' refers to.  A 'git-error' exception is raised if the tag
+cannot be found."
+  (if (channel-news-entry-commit entry)
+      entry
+      (let* ((tag       (channel-news-entry-tag entry))
+             (reference (string-append "refs/tags/" tag))
+             (oid       (reference-name->oid repository reference)))
+        (channel-news-entry (oid->string oid) tag
+                            (channel-news-entry-title entry)
+                            (channel-news-entry-body entry)))))
+
 (define* (channel-news-for-commit channel new #:optional old)
   "Return a list of <channel-news-entry> for CHANNEL between commits OLD and
 NEW.  When OLD is omitted or is #f, return all the news entries of CHANNEL."
@@ -645,10 +663,14 @@ NEW.  When OLD is omitted or is #f, return all the news entries of CHANNEL."
              (news-file (and news-file
                              (string-append checkout "/" news-file))))
         (if (and news-file (file-exists? news-file))
-            (let ((entries (channel-news-entries (call-with-input-file news-file
-                                                   read-channel-news))))
-              (if old
-                  (with-repository checkout repository
+            (with-repository checkout repository
+              (let* ((news    (call-with-input-file news-file
+                                read-channel-news))
+                     (entries (map (lambda (entry)
+                                     (resolve-channel-news-entry-tag repository
+                                                                     entry))
+                                   (channel-news-entries news))))
+                (if old
                     (let* ((new     (commit-lookup repository (string->oid new)))
                            (old     (commit-lookup repository (string->oid old)))
                            (commits (list->set
@@ -657,8 +679,8 @@ NEW.  When OLD is omitted or is #f, return all the news entries of CHANNEL."
                       (filter (lambda (entry)
                                 (set-contains? commits
                                                (channel-news-entry-commit entry)))
-                              entries)))
-                  entries))
+                              entries))
+                    entries)))
             '())))
     (lambda (key error . rest)
       ;; If commit NEW or commit OLD cannot be found, then something must be
diff --git a/guix/tests/git.scm b/guix/tests/git.scm
index 9d5b1ae321..21573ac14e 100644
--- a/guix/tests/git.scm
+++ b/guix/tests/git.scm
@@ -66,6 +66,9 @@ Return DIRECTORY on success."
       ((('commit text) rest ...)
        (git "commit" "-m" text)
        (loop rest))
+      ((('tag name) rest ...)
+       (git "tag" name)
+       (loop rest))
       ((('branch name) rest ...)
        (git "branch" name)
        (loop rest))
diff --git a/tests/channels.scm b/tests/channels.scm
index 58101bcb72..f5a7955483 100644
--- a/tests/channels.scm
+++ b/tests/channels.scm
@@ -272,6 +272,7 @@
         (commit "first commit")
         (add "src/a.txt" "A")
         (commit "second commit")
+        (tag "tag-for-first-news-entry")
         (add "news.scm"
              ,(lambda (repository)
                 (let ((previous
@@ -299,7 +300,7 @@
                      (entry (commit ,(oid->string previous))
                             (title (en "Another file!"))
                             (body (en "Yeah, b.txt.")))
-                     (entry (commit ,(oid->string second))
+                     (entry (tag "tag-for-first-news-entry")
                             (title (en "Old news.")
                                    (eo "Malnovaĵoj."))
                             (body (en "For a.txt"))))))))
@@ -343,6 +344,10 @@
              (lset= string=?
                     (map channel-news-entry-commit
                          (channel-news-for-commit channel commit5 commit1))
-                    (list commit4 commit2)))))))
+                    (list commit4 commit2))
+             (lset= equal?
+                    (map channel-news-entry-tag
+                         (channel-news-for-commit channel commit5 commit1))
+                    '(#f "tag-for-first-news-entry")))))))
 
 (test-end "channels")
-- 
2.23.0





Information forwarded to guix-patches@HIDDEN:
bug#37413; Package guix-patches. Full text available.

Message received at 37413 <at> debbugs.gnu.org:


Received: (at 37413) by debbugs.gnu.org; 21 Sep 2019 21:13:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 21 17:12:59 2019
Received: from localhost ([127.0.0.1]:33230 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iBmgd-0000Mi-6Z
	for submit <at> debbugs.gnu.org; Sat, 21 Sep 2019 17:12:59 -0400
Received: from eggs.gnu.org ([209.51.188.92]:32820)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1iBmgX-0000L2-7m
 for 37413 <at> debbugs.gnu.org; Sat, 21 Sep 2019 17:12:53 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:49541)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1iBmgS-0005f3-4j; Sat, 21 Sep 2019 17:12:48 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=53014 helo=gnu.org)
 by fencepost.gnu.org with esmtpsa
 (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82)
 (envelope-from <ludo@HIDDEN>)
 id 1iBmgR-00065A-Lp; Sat, 21 Sep 2019 17:12:47 -0400
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 37413 <at> debbugs.gnu.org
Subject: [PATCH v2 04/11] channels: Add support for a news file.
Date: Sat, 21 Sep 2019 23:12:21 +0200
Message-Id: <20190921211228.13096-5-ludo@HIDDEN>
X-Mailer: git-send-email 2.23.0
In-Reply-To: <20190921211228.13096-1-ludo@HIDDEN>
References: <87sgow0w7w.fsf@HIDDEN>
 <20190921211228.13096-1-ludo@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 37413
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

* guix/channels.scm (<channel-metadata>)[news-file]: New field.
(read-channel-metadata): Set the 'news-file' field.
(read-channel-metadata-from-source): Likewise.
(<channel-news>, <channel-news-entry>): New record types.
(sexp->channel-news-entry, read-channel-news)
(channel-news-for-commit): New procedures.
* guix/tests/git.scm (populate-git-repository): For 'add', allow
CONTENTS to be a procedure.
* tests/channels.scm ("channel-news, no news")
("channel-news, one entry"): New tests.
* doc/guix.texi (Channels): Document it.
---
 doc/guix.texi      |  62 +++++++++++++++++++++++
 guix/channels.scm  | 123 ++++++++++++++++++++++++++++++++++++++++++---
 guix/tests/git.scm |   7 ++-
 tests/channels.scm |  99 ++++++++++++++++++++++++++++++++++++
 4 files changed, 282 insertions(+), 9 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index af1903f6ff..712c0811a5 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -3991,6 +3991,68 @@ add a meta-data file @file{.guix-channel} that contains:
   (directory "guix"))
 @end lisp
 
+@cindex news, for channels
+@subsection Writing Channel News
+
+Channel authors may occasionally want to communicate to their users
+information about important changes in the channel.  You'd send them all
+an email, but that's not convenient.
+
+Instead, channels can provide a @dfn{news file}; when the channel users
+run @command{guix pull}, that news file is automatically read and
+@command{guix pull --news} can display the announcements that correspond
+to the new commits that have been pulled, if any.
+
+To do that, channel authors must first declare the name of the news file
+in their @file{.guix-channel} file:
+
+@lisp
+(channel
+  (version 0)
+  (news-file "etc/news.txt"))
+@end lisp
+
+The news file itself, @file{etc/news.txt} in this example, must look
+something like this:
+
+@lisp
+(channel-news
+  (version 0)
+  (entry (commit "d894ab8e9bfabcefa6c49d9ba2e834dd5a73a300")
+         (title (en "Fixed terrible bug")
+                (fr "Oh la la"))
+         (body (en "@@emph@{Good news@}!  It's fixed!")
+               (eo "Certe ĝi pli bone funkcias nun!")))
+  (entry (commit "bdcabe815cd28144a2d2b4bc3c5057b051fa9906")
+         (title (en "Added a great package")
+                (ca "Què vol dir guix?"))
+         (body (en "Don't miss the @@code@{hello@} package!"))))
+@end lisp
+
+The file consists of a list of @dfn{news entries}.  Each entry is
+associated with a commit: it describes changes made in this commit,
+possibly in preceding commits as well.  Users see entries only the first
+time they obtain the commit the entry refers to.
+
+The @code{title} field should be a one-line summary while @code{body}
+can be arbitrary long, and both can contain Texinfo markup
+(@pxref{Overview,,, texinfo, GNU Texinfo}).  Both the title and body are
+a list of language tag/message tuples, which allows @command{guix pull}
+to display news in the language that corresponds to the user's locale.
+
+If you want to translate news using a gettext-based workflow, you can
+extract translatable strings with @command{xgettext} (@pxref{xgettext
+Invocation,,, gettext, GNU Gettext Utilities}).  For example, assuming
+you write news entries in English first, the command below creates a PO
+file containing the strings to translate:
+
+@example
+xgettext -o news.po -l scheme -ken etc/news.scm
+@end example
+
+To sum up, yes, you could use your channel as a blog.  But beware, this
+is @emph{not quite} what your users might expect.
+
 @subsection Replicating Guix
 
 @cindex pinning, channels
diff --git a/guix/channels.scm b/guix/channels.scm
index ebb2cacbc7..0dadba616f 100644
--- a/guix/channels.scm
+++ b/guix/channels.scm
@@ -19,6 +19,7 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (guix channels)
+  #:use-module (git)
   #:use-module (guix git)
   #:use-module (guix records)
   #:use-module (guix gexp)
@@ -29,6 +30,7 @@
   #:use-module (guix derivations)
   #:use-module (guix combinators)
   #:use-module (guix diagnostics)
+  #:use-module (guix sets)
   #:use-module (guix store)
   #:use-module (guix i18n)
   #:use-module ((guix utils)
@@ -67,7 +69,14 @@
             %channel-profile-hooks
             channel-instances->derivation
 
-            profile-channels))
+            profile-channels
+
+            channel-news-entry?
+            channel-news-entry-commit
+            channel-news-entry-title
+            channel-news-entry-body
+
+            channel-news-for-commit))
 
 ;;; Commentary:
 ;;;
@@ -110,10 +119,11 @@
   (checkout  channel-instance-checkout))
 
 (define-record-type <channel-metadata>
-  (channel-metadata directory dependencies)
+  (channel-metadata directory dependencies news-file)
   channel-metadata?
   (directory     channel-metadata-directory)      ;string with leading slash
-  (dependencies  channel-metadata-dependencies))  ;list of <channel>
+  (dependencies  channel-metadata-dependencies)   ;list of <channel>
+  (news-file     channel-metadata-news-file))     ;string | #f
 
 (define (channel-reference channel)
   "Return the \"reference\" for CHANNEL, an sexp suitable for
@@ -129,12 +139,13 @@ if valid metadata could not be read from PORT."
   (match (read port)
     (('channel ('version 0) properties ...)
      (let ((directory    (and=> (assoc-ref properties 'directory) first))
-           (dependencies (or (assoc-ref properties 'dependencies) '())))
+           (dependencies (or (assoc-ref properties 'dependencies) '()))
+           (news-file    (and=> (assoc-ref properties 'news-file) first)))
        (channel-metadata
-        (cond ((not directory) "/")
+        (cond ((not directory) "/")               ;directory
               ((string-prefix? "/" directory) directory)
               (else (string-append "/" directory)))
-        (map (lambda (item)
+        (map (lambda (item)                       ;dependencies
                (let ((get (lambda* (key #:optional default)
                             (or (and=> (assoc-ref item key) first) default))))
                  (and-let* ((name (get 'name))
@@ -145,7 +156,8 @@ if valid metadata could not be read from PORT."
                     (branch branch)
                     (url url)
                     (commit (get 'commit))))))
-             dependencies))))
+             dependencies)
+        news-file)))                              ;news-file
     ((and ('channel ('version version) _ ...) sexp)
      (raise (condition
              (&message (message "unsupported '.guix-channel' version"))
@@ -169,7 +181,7 @@ doesn't exist."
         read-channel-metadata))
     (lambda args
       (if (= ENOENT (system-error-errno args))
-          (channel-metadata "/" '())
+          (channel-metadata "/" '() #f)
           (apply throw args)))))
 
 (define (channel-instance-metadata instance)
@@ -560,3 +572,98 @@ PROFILE is not a profile created by 'guix pull', return the empty list."
               ;; Show most recently installed packages last.
               (reverse
                (manifest-entries (profile-manifest profile)))))
+
+
+;;;
+;;; News.
+;;;
+
+;; Channel news.
+(define-record-type <channel-news>
+  (channel-news entries)
+  channel-news?
+  (entries channel-news-entries))                 ;list of <channel-news-entry>
+
+;; News entry, associated with a specific commit of the channel.
+(define-record-type <channel-news-entry>
+  (channel-news-entry commit title body)
+  channel-news-entry?
+  (commit  channel-news-entry-commit)             ;hex string
+  (title   channel-news-entry-title)              ;list of language tag/string pairs
+  (body    channel-news-entry-body))              ;list of language tag/string pairs
+
+(define (sexp->channel-news-entry entry)
+  "Return the <channel-news-entry> record corresponding to ENTRY, an sexp."
+  (define (pair language message)
+    (cons (symbol->string language) message))
+
+  (match entry
+    (('entry ('commit commit)
+             ('title ((? symbol? title-tags) (? string? titles)) ...)
+             ('body ((? symbol? body-tags) (? string? bodies)) ...)
+             _ ...)
+     (channel-news-entry commit
+                         (map pair title-tags titles)
+                         (map pair body-tags bodies)))
+    (_
+     (raise (condition
+             (&message (message "invalid channel news entry"))
+             (&error-location
+              (location (source-properties->location
+                         (source-properties entry)))))))))
+
+(define (read-channel-news port)
+  "Read a channel news feed from PORT and return it as a <channel-news>
+record."
+  (match (false-if-exception (read port))
+    (('channel-news ('version 0) entries ...)
+     (channel-news (map sexp->channel-news-entry entries)))
+    (('channel-news ('version version) _ ...)
+     ;; This is an unsupported version from the future.  There's nothing wrong
+     ;; with that (the user may simply need to upgrade the 'guix' channel to
+     ;; be able to read it), so silently ignore it.
+     (channel-news '()))
+    (#f
+     (raise (condition
+             (&message (message "syntactically invalid channel news file")))))
+    (sexp
+     (raise (condition
+             (&message (message "invalid channel news file"))
+             (&error-location
+              (location (source-properties->location
+                         (source-properties sexp)))))))))
+
+(define* (channel-news-for-commit channel new #:optional old)
+  "Return a list of <channel-news-entry> for CHANNEL between commits OLD and
+NEW.  When OLD is omitted or is #f, return all the news entries of CHANNEL."
+  (catch 'git-error
+    (lambda ()
+      (let* ((checkout  (update-cached-checkout (channel-url channel)
+                                                #:ref `(commit . ,new)))
+             (metadata  (read-channel-metadata-from-source checkout))
+             (news-file (channel-metadata-news-file metadata))
+             (news-file (and news-file
+                             (string-append checkout "/" news-file))))
+        (if (and news-file (file-exists? news-file))
+            (let ((entries (channel-news-entries (call-with-input-file news-file
+                                                   read-channel-news))))
+              (if old
+                  (with-repository checkout repository
+                    (let* ((new     (commit-lookup repository (string->oid new)))
+                           (old     (commit-lookup repository (string->oid old)))
+                           (commits (list->set
+                                     (map (compose oid->string commit-id)
+                                          (commit-difference new old)))))
+                      (filter (lambda (entry)
+                                (set-contains? commits
+                                               (channel-news-entry-commit entry)))
+                              entries)))
+                  entries))
+            '())))
+    (lambda (key error . rest)
+      ;; If commit NEW or commit OLD cannot be found, then something must be
+      ;; wrong (for example, the history of CHANNEL was rewritten and these
+      ;; commits no longer exist upstream), so quietly return the empty list.
+      (if (= GIT_ENOTFOUND (git-error-code error))
+          '()
+          (apply throw key error rest)))))
diff --git a/guix/tests/git.scm b/guix/tests/git.scm
index 52abe77c83..9d5b1ae321 100644
--- a/guix/tests/git.scm
+++ b/guix/tests/git.scm
@@ -18,6 +18,7 @@
 
 (define-module (guix tests git)
   #:use-module (git)
+  #:use-module ((guix git) #:select (with-repository))
   #:use-module (guix utils)
   #:use-module (guix build utils)
   #:use-module (ice-9 match)
@@ -55,7 +56,11 @@ Return DIRECTORY on success."
          (mkdir-p (dirname file))
          (call-with-output-file file
            (lambda (port)
-             (display contents port)))
+             (display (if (string? contents)
+                          contents
+                          (with-repository directory repository
+                            (contents repository)))
+                      port)))
          (git "add" file)
          (loop rest)))
       ((('commit text) rest ...)
diff --git a/tests/channels.scm b/tests/channels.scm
index e83b5437d3..58101bcb72 100644
--- a/tests/channels.scm
+++ b/tests/channels.scm
@@ -28,6 +28,10 @@
   #:use-module (guix gexp)
   #:use-module ((guix utils)
                 #:select (error-location? error-location location-line))
+  #:use-module ((guix build utils) #:select (which))
+  #:use-module (git)
+  #:use-module (guix git)
+  #:use-module (guix tests git)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-26)
   #:use-module (srfi srfi-34)
@@ -246,4 +250,99 @@
                (depends? drv3
                          (list drv2 drv0) (list))))))))
 
+(unless (which (git-command)) (test-skip 1))
+(test-equal "channel-news, no news"
+  '()
+  (with-temporary-git-repository directory
+      '((add "a.txt" "A")
+        (commit "the commit"))
+    (with-repository directory repository
+      (let ((channel (channel (url (string-append "file://" directory))
+                              (name 'foo)))
+            (latest  (reference-name->oid repository "HEAD")))
+        (channel-news-for-commit channel (oid->string latest))))))
+
+(unless (which (git-command)) (test-skip 1))
+(test-assert "channel-news, one entry"
+  (with-temporary-git-repository directory
+      `((add ".guix-channel"
+             ,(object->string
+               '(channel (version 0)
+                         (news-file "news.scm"))))
+        (commit "first commit")
+        (add "src/a.txt" "A")
+        (commit "second commit")
+        (add "news.scm"
+             ,(lambda (repository)
+                (let ((previous
+                       (reference-name->oid repository "HEAD")))
+                  (object->string
+                   `(channel-news
+                     (version 0)
+                     (entry (commit ,(oid->string previous))
+                            (title (en "New file!")
+                                   (eo "Nova dosiero!"))
+                            (body (en "Yeah, a.txt."))))))))
+        (commit "third commit")
+        (add "src/b.txt" "B")
+        (commit "fourth commit")
+        (add "news.scm"
+             ,(lambda (repository)
+                (let ((second
+                       (commit-id
+                        (find-commit repository "second commit")))
+                      (previous
+                       (reference-name->oid repository "HEAD")))
+                  (object->string
+                   `(channel-news
+                     (version 0)
+                     (entry (commit ,(oid->string previous))
+                            (title (en "Another file!"))
+                            (body (en "Yeah, b.txt.")))
+                     (entry (commit ,(oid->string second))
+                            (title (en "Old news.")
+                                   (eo "Malnovaĵoj."))
+                            (body (en "For a.txt"))))))))
+        (commit "fifth commit"))
+    (with-repository directory repository
+      (define (find-commit* message)
+        (oid->string (commit-id (find-commit repository message))))
+
+      (let ((channel (channel (url (string-append "file://" directory))
+                              (name 'foo)))
+            (commit1 (find-commit* "first commit"))
+            (commit2 (find-commit* "second commit"))
+            (commit3 (find-commit* "third commit"))
+            (commit4 (find-commit* "fourth commit"))
+            (commit5 (find-commit* "fifth commit")))
+        ;; First try fetching all the news up to a given commit.
+        (and (null? (channel-news-for-commit channel commit2))
+             (lset= string=?
+                    (map channel-news-entry-commit
+                         (channel-news-for-commit channel commit5))
+                    (list commit2 commit4))
+             (lset= equal?
+                    (map channel-news-entry-title
+                         (channel-news-for-commit channel commit5))
+                    '((("en" . "Another file!"))
+                      (("en" . "Old news.") ("eo" . "Malnovaĵoj."))))
+             (lset= string=?
+                    (map channel-news-entry-commit
+                         (channel-news-for-commit channel commit3))
+                    (list commit2))
+
+             ;; Now fetch news entries that apply to a commit range.
+             (lset= string=?
+                    (map channel-news-entry-commit
+                         (channel-news-for-commit channel commit3 commit1))
+                    (list commit2))
+             (lset= string=?
+                    (map channel-news-entry-commit
+                         (channel-news-for-commit channel commit5 commit3))
+                    (list commit4))
+             (lset= string=?
+                    (map channel-news-entry-commit
+                         (channel-news-for-commit channel commit5 commit1))
+                    (list commit4 commit2)))))))
+
 (test-end "channels")
-- 
2.23.0





Information forwarded to guix-patches@HIDDEN:
bug#37413; Package guix-patches. Full text available.

Message received at 37413 <at> debbugs.gnu.org:


Received: (at 37413) by debbugs.gnu.org; 21 Sep 2019 21:12:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 21 17:12:59 2019
Received: from localhost ([127.0.0.1]:33227 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iBmgc-0000MQ-Ck
	for submit <at> debbugs.gnu.org; Sat, 21 Sep 2019 17:12:59 -0400
Received: from eggs.gnu.org ([209.51.188.92]:32818)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1iBmgW-0000Kz-Cr
 for 37413 <at> debbugs.gnu.org; Sat, 21 Sep 2019 17:12:52 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:49540)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1iBmgR-0005er-9c; Sat, 21 Sep 2019 17:12:47 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=53014 helo=gnu.org)
 by fencepost.gnu.org with esmtpsa
 (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82)
 (envelope-from <ludo@HIDDEN>)
 id 1iBmgQ-00065A-Nk; Sat, 21 Sep 2019 17:12:47 -0400
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 37413 <at> debbugs.gnu.org
Subject: [PATCH v2 03/11] git: Add 'commit-difference'.
Date: Sat, 21 Sep 2019 23:12:20 +0200
Message-Id: <20190921211228.13096-4-ludo@HIDDEN>
X-Mailer: git-send-email 2.23.0
In-Reply-To: <20190921211228.13096-1-ludo@HIDDEN>
References: <87sgow0w7w.fsf@HIDDEN>
 <20190921211228.13096-1-ludo@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 37413
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

* guix/git.scm (commit-closure, commit-difference): New procedures.
* guix/tests/git.scm, tests/git.scm: New files.
* Makefile.am (dist_noinst_DATA): Add guix/tests/git.scm.
(SCM_TESTS): Add tests/git.scm.
---
 .dir-locals.el     |  1 +
 Makefile.am        |  6 ++-
 guix/git.scm       | 40 +++++++++++++++++++
 guix/tests/git.scm | 97 +++++++++++++++++++++++++++++++++++++++++++++
 tests/git.scm      | 99 ++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 242 insertions(+), 1 deletion(-)
 create mode 100644 guix/tests/git.scm
 create mode 100644 tests/git.scm

diff --git a/.dir-locals.el b/.dir-locals.el
index 228685a69f..22aac2c402 100644
--- a/.dir-locals.el
+++ b/.dir-locals.el
@@ -90,6 +90,7 @@
    (eval . (put 'eventually 'scheme-indent-function 1))
 
    (eval . (put 'call-with-progress-reporter 'scheme-indent-function 1))
+   (eval . (put 'with-temporary-git-repository 'scheme-indent-function 2))
 
    ;; This notably allows '(' in Paredit to not insert a space when the
    ;; preceding symbol is one of these.
diff --git a/Makefile.am b/Makefile.am
index f71ea77671..658f03bd54 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -307,7 +307,10 @@ STORE_MODULES =					\
 MODULES += $(STORE_MODULES)
 
 # Internal modules with test suite support.
-dist_noinst_DATA = guix/tests.scm guix/tests/http.scm
+dist_noinst_DATA =				\
+  guix/tests.scm				\
+  guix/tests/http.scm				\
+  guix/tests/git.scm
 
 # Auxiliary files for packages.
 AUX_FILES =						\
@@ -391,6 +394,7 @@ SCM_TESTS =					\
   tests/file-systems.scm			\
   tests/gem.scm				\
   tests/gexp.scm				\
+  tests/git.scm					\
   tests/glob.scm				\
   tests/gnu-maintenance.scm			\
   tests/grafts.scm				\
diff --git a/guix/git.scm b/guix/git.scm
index 92a7353b5a..d7dddde3a7 100644
--- a/guix/git.scm
+++ b/guix/git.scm
@@ -28,6 +28,7 @@
   #:use-module (guix utils)
   #:use-module (guix records)
   #:use-module (guix gexp)
+  #:use-module (guix sets)
   #:use-module (rnrs bytevectors)
   #:use-module (ice-9 match)
   #:use-module (srfi srfi-1)
@@ -37,8 +38,10 @@
   #:export (%repository-cache-directory
             honor-system-x509-certificates!
 
+            with-repository
             update-cached-checkout
             latest-repository-commit
+            commit-difference
 
             git-checkout
             git-checkout?
@@ -339,6 +342,43 @@ Log progress and checkout info to LOG-PORT."
 
 (set-exception-printer! 'git-error print-git-error)
 
+
+;;;
+;;; Commit difference.
+;;;
+
+(define (commit-closure commit)
+  "Return the closure of COMMIT as a set."
+  (let loop ((commits (list commit))
+             (visited (setq)))
+    (match commits
+      (()
+       visited)
+      ((head . tail)
+       (if (set-contains? visited head)
+           (loop tail visited)
+           (loop (append (commit-parents head) tail)
+                 (set-insert head visited)))))))
+
+(define (commit-difference new old)
+  "Return the list of commits between NEW and OLD, where OLD is assumed to be
+an ancestor of NEW.
+
+Essentially, this computes the set difference between the closure of NEW and
+that of OLD."
+  (let loop ((commits (list new))
+             (result '())
+             (visited (commit-closure old)))
+    (match commits
+      (()
+       (reverse result))
+      ((head . tail)
+       (if (set-contains? visited head)
+           (loop tail result visited)
+           (loop (append (commit-parents head) tail)
+                 (cons head result)
+                 (set-insert head visited)))))))
+
 
 ;;;
 ;;; Checkouts.
diff --git a/guix/tests/git.scm b/guix/tests/git.scm
new file mode 100644
index 0000000000..52abe77c83
--- /dev/null
+++ b/guix/tests/git.scm
@@ -0,0 +1,97 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2019 Ludovic Courtès <ludo@HIDDEN>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (guix tests git)
+  #:use-module (git)
+  #:use-module (guix utils)
+  #:use-module (guix build utils)
+  #:use-module (ice-9 match)
+  #:use-module (ice-9 control)
+  #:export (git-command
+            with-temporary-git-repository
+            find-commit))
+
+(define git-command
+  (make-parameter "git"))
+
+(define (populate-git-repository directory directives)
+  "Initialize a new Git checkout and repository in DIRECTORY and apply
+DIRECTIVES.  Each element of DIRECTIVES is an sexp like:
+
+  (add \"foo.txt\" \"hi!\")
+
+Return DIRECTORY on success."
+
+  ;; Note: As of version 0.2.0, Guile-Git lacks the necessary bindings to do
+  ;; all this, so resort to the "git" command.
+  (define (git command . args)
+    (apply invoke (git-command) "-C" directory
+           command args))
+
+  (mkdir-p directory)
+  (git "init")
+
+  (let loop ((directives directives))
+    (match directives
+      (()
+       directory)
+      ((('add file contents) rest ...)
+       (let ((file (string-append directory "/" file)))
+         (mkdir-p (dirname file))
+         (call-with-output-file file
+           (lambda (port)
+             (display contents port)))
+         (git "add" file)
+         (loop rest)))
+      ((('commit text) rest ...)
+       (git "commit" "-m" text)
+       (loop rest))
+      ((('branch name) rest ...)
+       (git "branch" name)
+       (loop rest))
+      ((('checkout branch) rest ...)
+       (git "checkout" branch)
+       (loop rest))
+      ((('merge branch message) rest ...)
+       (git "merge" branch "-m" message)
+       (loop rest)))))
+
+(define (call-with-temporary-git-repository directives proc)
+  (call-with-temporary-directory
+   (lambda (directory)
+     (populate-git-repository directory directives)
+     (proc directory))))
+
+(define-syntax-rule (with-temporary-git-repository directory
+                                                   directives exp ...)
+  "Evaluate EXP in a context where DIRECTORY contains a checkout populated as
+per DIRECTIVES."
+  (call-with-temporary-git-repository directives
+                                      (lambda (directory)
+                                        exp ...)))
+
+(define (find-commit repository message)
+  "Return the commit in REPOSITORY whose message includes MESSAGE, a string."
+  (let/ec return
+    (fold-commits (lambda (commit _)
+                    (and (string-contains (commit-message commit)
+                                          message)
+                         (return commit)))
+                  #f
+                  repository)
+    (error "commit not found" message)))
diff --git a/tests/git.scm b/tests/git.scm
new file mode 100644
index 0000000000..8ba10ece51
--- /dev/null
+++ b/tests/git.scm
@@ -0,0 +1,99 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2019 Ludovic Courtès <ludo@HIDDEN>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (test-git)
+  #:use-module (git)
+  #:use-module (guix git)
+  #:use-module (guix tests git)
+  #:use-module (guix build utils)
+  #:use-module (srfi srfi-1)
+  #:use-module (srfi srfi-64))
+
+;; Test the (guix git) tools.
+
+(test-begin "git")
+
+;; 'with-temporary-git-repository' relies on the 'git' command.
+(unless (which (git-command)) (test-skip 1))
+(test-assert "commit-difference, linear history"
+  (with-temporary-git-repository directory
+      '((add "a.txt" "A")
+        (commit "first commit")
+        (add "b.txt" "B")
+        (commit "second commit")
+        (add "c.txt" "C")
+        (commit "third commit")
+        (add "d.txt" "D")
+        (commit "fourth commit"))
+    (with-repository directory repository
+      (let ((commit1 (find-commit repository "first"))
+            (commit2 (find-commit repository "second"))
+            (commit3 (find-commit repository "third"))
+            (commit4 (find-commit repository "fourth")))
+        (and (lset= eq? (commit-difference commit4 commit1)
+                    (list commit2 commit3 commit4))
+             (lset= eq? (commit-difference commit4 commit2)
+                    (list commit3 commit4))
+             (equal? (commit-difference commit3 commit2)
+                     (list commit3))
+
+             ;; COMMIT4 is not an ancestor of COMMIT1 so we should get the
+             ;; empty list.
+             (null? (commit-difference commit1 commit4)))))))
+
+(unless (which (git-command)) (test-skip 1))
+(test-assert "commit-difference, fork"
+  (with-temporary-git-repository directory
+      '((add "a.txt" "A")
+        (commit "first commit")
+        (branch "devel")
+        (checkout "devel")
+        (add "devel/1.txt" "1")
+        (commit "first devel commit")
+        (add "devel/2.txt" "2")
+        (commit "second devel commit")
+        (checkout "master")
+        (add "b.txt" "B")
+        (commit "second commit")
+        (add "c.txt" "C")
+        (commit "third commit")
+        (merge "devel" "merge")
+        (add "d.txt" "D")
+        (commit "fourth commit"))
+    (with-repository directory repository
+      (let ((master1 (find-commit repository "first commit"))
+            (master2 (find-commit repository "second commit"))
+            (master3 (find-commit repository "third commit"))
+            (master4 (find-commit repository "fourth commit"))
+            (devel1  (find-commit repository "first devel"))
+            (devel2  (find-commit repository "second devel"))
+            (merge   (find-commit repository "merge")))
+        (and (equal? (commit-difference master4 merge)
+                     (list master4))
+             (lset= eq? (commit-difference master3 master1)
+                    (list master3 master2))
+             (lset= eq? (commit-difference devel2 master1)
+                    (list devel2 devel1))
+
+             ;; The merge occurred between MASTER2 and MASTER4 so here we
+             ;; expect to see all the commits from the "devel" branch in
+             ;; addition to those on "master".
+             (lset= eq? (commit-difference master4 master2)
+                    (list master4 merge master3 devel1 devel2)))))))
+
+(test-end "git")
-- 
2.23.0





Information forwarded to guix-patches@HIDDEN:
bug#37413; Package guix-patches. Full text available.

Message received at 37413 <at> debbugs.gnu.org:


Received: (at 37413) by debbugs.gnu.org; 21 Sep 2019 21:12:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 21 17:12:58 2019
Received: from localhost ([127.0.0.1]:33225 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iBmgb-0000MI-VF
	for submit <at> debbugs.gnu.org; Sat, 21 Sep 2019 17:12:58 -0400
Received: from eggs.gnu.org ([209.51.188.92]:32816)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1iBmgV-0000Kv-Dx
 for 37413 <at> debbugs.gnu.org; Sat, 21 Sep 2019 17:12:51 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:49539)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1iBmgQ-0005ef-BW; Sat, 21 Sep 2019 17:12:46 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=53014 helo=gnu.org)
 by fencepost.gnu.org with esmtpsa
 (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82)
 (envelope-from <ludo@HIDDEN>)
 id 1iBmgP-00065A-TD; Sat, 21 Sep 2019 17:12:46 -0400
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 37413 <at> debbugs.gnu.org
Subject: [PATCH v2 02/11] git: 'update-cached-checkout' avoids network access
 when unnecessary.
Date: Sat, 21 Sep 2019 23:12:19 +0200
Message-Id: <20190921211228.13096-3-ludo@HIDDEN>
X-Mailer: git-send-email 2.23.0
In-Reply-To: <20190921211228.13096-1-ludo@HIDDEN>
References: <87sgow0w7w.fsf@HIDDEN>
 <20190921211228.13096-1-ludo@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 37413
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

* guix/git.scm (reference-available?): New procedure.
(update-cached-checkout): Avoid call to 'remote-fetch' when REPOSITORY
already contains REF.
---
 guix/git.scm | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/guix/git.scm b/guix/git.scm
index de98fed40c..92a7353b5a 100644
--- a/guix/git.scm
+++ b/guix/git.scm
@@ -220,6 +220,21 @@ dynamic extent of EXP."
               (G_ "Support for submodules is missing; \
 please upgrade Guile-Git.~%"))))
 
+(define (reference-available? repository ref)
+  "Return true if REF, a reference such as '(commit . \"cabba9e\"), is
+definitely available in REPOSITORY, false otherwise."
+  (match ref
+    (('commit . commit)
+     (catch 'git-error
+       (lambda ()
+         (->bool (commit-lookup repository (string->oid commit))))
+       (lambda (key error . rest)
+         (if (= GIT_ENOTFOUND (git-error-code error))
+             #f
+             (apply throw key error rest)))))
+    (_
+     #f)))
+
 (define* (update-cached-checkout url
                                  #:key
                                  (ref '(branch . "master"))
@@ -254,7 +269,8 @@ When RECURSIVE? is true, check out submodules as well, if any."
                              (repository-open cache-directory)
                              (clone* url cache-directory))))
      ;; Only fetch remote if it has not been cloned just before.
-     (when cache-exists?
+     (when (and cache-exists?
+                (not (reference-available? repository ref)))
        (remote-fetch (remote-lookup repository "origin")))
      (when recursive?
        (update-submodules repository #:log-port log-port))
-- 
2.23.0





Information forwarded to guix-patches@HIDDEN:
bug#37413; Package guix-patches. Full text available.

Message received at 37413 <at> debbugs.gnu.org:


Received: (at 37413) by debbugs.gnu.org; 21 Sep 2019 21:12:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 21 17:12:58 2019
Received: from localhost ([127.0.0.1]:33222 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iBmgb-0000Ly-7R
	for submit <at> debbugs.gnu.org; Sat, 21 Sep 2019 17:12:57 -0400
Received: from eggs.gnu.org ([209.51.188.92]:32814)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1iBmgU-0000Kt-JY
 for 37413 <at> debbugs.gnu.org; Sat, 21 Sep 2019 17:12:50 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:49538)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1iBmgP-0005eT-H8; Sat, 21 Sep 2019 17:12:45 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=53014 helo=gnu.org)
 by fencepost.gnu.org with esmtpsa
 (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82)
 (envelope-from <ludo@HIDDEN>)
 id 1iBmgP-00065A-1B; Sat, 21 Sep 2019 17:12:45 -0400
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 37413 <at> debbugs.gnu.org
Subject: [PATCH v2 01/11] pull: '--news' shows the list of channels added or
 removed.
Date: Sat, 21 Sep 2019 23:12:18 +0200
Message-Id: <20190921211228.13096-2-ludo@HIDDEN>
X-Mailer: git-send-email 2.23.0
In-Reply-To: <20190921211228.13096-1-ludo@HIDDEN>
References: <87sgow0w7w.fsf@HIDDEN>
 <20190921211228.13096-1-ludo@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 37413
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

* guix/scripts/pull.scm (display-channel, channel=?)
(display-channel-news, display-news): New procedures.
(process-query): Call 'display-news' instead of 'display-profile-news'.
---
 guix/scripts/pull.scm | 61 ++++++++++++++++++++++++++++++++++++++++---
 1 file changed, 57 insertions(+), 4 deletions(-)

diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm
index c9835cef34..4091f926ac 100644
--- a/guix/scripts/pull.scm
+++ b/guix/scripts/pull.scm
@@ -213,6 +213,62 @@ newest generation of PROFILE."
                                         (G_ "New in this revision:\n")))))
     (_ #t)))
 
+(define (display-channel channel)
+  "Display information about CHANNEL."
+  (format (current-error-port)
+          ;; TRANSLATORS: This describes a "channel"; the first placeholder is
+          ;; the channel name (e.g., "guix") and the second placeholder is its
+          ;; URL.
+          (G_ "    ~a at ~a~%")
+          (channel-name channel)
+          (channel-url channel)))
+
+(define (channel=? channel1 channel2)
+  "Return true if CHANNEL1 and CHANNEL2 are the same for all practical
+purposes."
+  ;; Assume that the URL matters less than the name.
+  (eq? (channel-name channel1) (channel-name channel2)))
+
+(define (display-channel-news profile)
+  "Display new about the channels of PROFILE "
+  (define previous
+    (and=> (relative-generation profile -1)
+           (cut generation-file-name profile <>)))
+
+  (when previous
+    (let ((old-channels (profile-channels previous))
+          (new-channels (profile-channels profile)))
+      (and (pair? old-channels) (pair? new-channels)
+           (begin
+             (match (lset-difference channel=? new-channels old-channels)
+               (()
+                #t)
+               (new
+                (let ((count (length new)))
+                  (format (current-error-port)
+                          (N_ "  ~*One new channel:~%"
+                              "  ~a new channels:~%" count)
+                          count)
+                  (for-each display-channel new))))
+             (match (lset-difference channel=? old-channels new-channels)
+               (()
+                #t)
+               (removed
+                (let ((count (length removed)))
+                  (format (current-error-port)
+                          (N_ "  ~*One channel removed:~%"
+                              "  ~a channels removed:~%" count)
+                          count)
+                  (for-each display-channel removed)))))))))
+
+(define (display-news profile)
+  ;; Display profile news, with the understanding that this process represents
+  ;; the newest generation.
+  (display-profile-news profile
+                        #:current-is-newer? #t)
+
+  (display-channel-news profile))
+
 (define* (build-and-install instances profile
                             #:key use-substitutes? verbose? dry-run?)
   "Build the tool from SOURCE, and install it in PROFILE.  When DRY-RUN? is
@@ -521,10 +577,7 @@ list of package changes.")))))
                ((numbers ...)
                 (list-generations profile numbers)))))))
     (('display-news)
-     ;; Display profile news, with the understanding that this process
-     ;; represents the newest generation.
-     (display-profile-news profile
-                           #:current-is-newer? #t))))
+     (display-news profile))))
 
 (define (process-generation-change opts profile)
   "Process a request to change the current generation (roll-back, switch, delete)."
-- 
2.23.0





Information forwarded to guix-patches@HIDDEN:
bug#37413; Package guix-patches. Full text available.

Message received at 37413 <at> debbugs.gnu.org:


Received: (at 37413) by debbugs.gnu.org; 21 Sep 2019 21:12:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 21 17:12:52 2019
Received: from localhost ([127.0.0.1]:33214 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iBmgV-0000LP-QF
	for submit <at> debbugs.gnu.org; Sat, 21 Sep 2019 17:12:52 -0400
Received: from eggs.gnu.org ([209.51.188.92]:32812)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1iBmgU-0000Kq-4U
 for 37413 <at> debbugs.gnu.org; Sat, 21 Sep 2019 17:12:50 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:49537)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1iBmgO-0005e5-LR; Sat, 21 Sep 2019 17:12:44 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=53014 helo=gnu.org)
 by fencepost.gnu.org with esmtpsa
 (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82)
 (envelope-from <ludo@HIDDEN>)
 id 1iBmgO-00065A-8Y; Sat, 21 Sep 2019 17:12:44 -0400
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 37413 <at> debbugs.gnu.org
Subject: [PATCH v2 00/11] Channel news distribution mechanism
Date: Sat, 21 Sep 2019 23:12:17 +0200
Message-Id: <20190921211228.13096-1-ludo@HIDDEN>
X-Mailer: git-send-email 2.23.0
In-Reply-To: <87sgow0w7w.fsf@HIDDEN>
References: <87sgow0w7w.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 37413
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hello!

Here’s an updated version that addresses some of the issues that
were raised and some of those that weren’t even raised.

Changes compared to v1:

  • If the news format version is incompatible, silently ignore it
    instead of raising an error.

  • Language tags in the news file are now symbols instead of
    strings.  Thus, xgettext can readily be used:

       xgettext -ken -l scheme etc/news.scm

  • News entries can refer to a tag instead of a commit, as suggested
    by Ricardo.

  • ‘guix pull’ shows news titles when there are news.  (In v1 you’d
    have to explicitly run ‘guix pull --news’ to see if there are
    news.)

Thoughts?

I’ll go with that if there are no objections.

Thanks,
Ludo’.

Ludovic Courtès (11):
  pull: '--news' shows the list of channels added or removed.
  git: 'update-cached-checkout' avoids network access when unnecessary.
  git: Add 'commit-difference'.
  channels: Add support for a news file.
  channels: Allow news entries to refer to a tag.
  ui: Add 'current-message-language'.
  pull: Display channel news.
  pull: '-l' displays channel news.
  pull: Display news titles directly upon 'pull'.
  Add '.guix-channel' file.
  DRAFT etc: Add channel news file.

 .dir-locals.el        |   1 +
 .guix-channel         |   5 ++
 Makefile.am           |   8 +-
 doc/guix.texi         |  73 ++++++++++++++++-
 etc/news.scm          |  23 ++++++
 guix/channels.scm     | 145 ++++++++++++++++++++++++++++++--
 guix/git.scm          |  58 ++++++++++++-
 guix/scripts/pull.scm | 186 +++++++++++++++++++++++++++++++++++++++---
 guix/tests/git.scm    | 105 ++++++++++++++++++++++++
 guix/ui.scm           |  18 ++++
 tests/channels.scm    | 104 +++++++++++++++++++++++
 tests/git.scm         |  99 ++++++++++++++++++++++
 12 files changed, 798 insertions(+), 27 deletions(-)
 create mode 100644 .guix-channel
 create mode 100644 etc/news.scm
 create mode 100644 guix/tests/git.scm
 create mode 100644 tests/git.scm

-- 
2.23.0





Information forwarded to guix-patches@HIDDEN:
bug#37413; Package guix-patches. Full text available.

Message received at 37413 <at> debbugs.gnu.org:


Received: (at 37413) by debbugs.gnu.org; 18 Sep 2019 12:33:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 18 08:33:49 2019
Received: from localhost ([127.0.0.1]:53711 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iAZ9Y-00009Q-NP
	for submit <at> debbugs.gnu.org; Wed, 18 Sep 2019 08:33:49 -0400
Received: from eggs.gnu.org ([209.51.188.92]:46052)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1iAZ9W-00009A-6E
 for 37413 <at> debbugs.gnu.org; Wed, 18 Sep 2019 08:33:46 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:58989)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1iAZ9O-0002m1-Dg; Wed, 18 Sep 2019 08:33:38 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=50704 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1iAZ9N-000248-SK; Wed, 18 Sep 2019 08:33:38 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: "pelzflorian \(Florian Pelz\)" <pelzflorian@HIDDEN>
Subject: Re: [bug#37413] [PATCH 0/9] Channel news distribution mechanism
References: <20190916225258.yd4uzgcm4lyr5zgz@HIDDEN>
 <87improzwm.fsf@HIDDEN>
 <20190917133307.lhsouulr5yynzzrd@HIDDEN>
 <87blvjm485.fsf@HIDDEN>
 <20190917142819.qk6thhoocnci6svn@HIDDEN>
 <87ef0fkknq.fsf@HIDDEN>
 <20190917174102.edmbljhpte5rklsr@HIDDEN>
 <20190917202035.1e2e5515@HIDDEN>
 <20190917194415.ripfxwfmpx337z4d@HIDDEN>
 <87woe5disi.fsf@HIDDEN>
 <20190918114945.elbzrp6sqziylkz2@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: Jour du =?utf-8?Q?G=C3=A9nie?= de =?utf-8?Q?l'Ann?=
 =?utf-8?Q?=C3=A9e?= 227 de la =?utf-8?Q?R=C3=A9volution?=
X-PGP-Key-ID: 0x090B11993D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-pc-linux-gnu
Date: Wed, 18 Sep 2019 14:33:36 +0200
In-Reply-To: <20190918114945.elbzrp6sqziylkz2@HIDDEN>
 (pelzflorian@HIDDEN's message of "Wed, 18 Sep 2019 13:49:46
 +0200")
Message-ID: <87imppbx7j.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 37413
Cc: Julien Lepiller <julien@HIDDEN>, 37413 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

"pelzflorian (Florian Pelz)" <pelzflorian@HIDDEN> skribis:

>> My feeling is that this use case doesn=E2=80=99t correspond to what the =
TP is
>> about, but yeah, you could ask them.
>>
>
> I will ask them, but later after Guix website translation is online.

Oops, thanks for the reminder.  :-)

>> Also, =E2=80=9Curgently=E2=80=9D won=E2=80=99t work because they would h=
ave to be manual
>> intervention by at least two people before the info reaches translators:
>> someone on the Guix side who=E2=80=99d submit a tarball (?) to the TP, a=
nd the
>
> The channel author would submit the tarball.  No Guix team involved.

If it=E2=80=99s the 'guix channel, then the Guix team is definitely involve=
d,
and typically there=E2=80=99s only a couple of people in the group =E2=80=
=9Centitled=E2=80=9D to
do that (so far it=E2=80=99s been Julien or myself.)

Sending a whole tarball seems overkill to me; currently we don=E2=80=99t ev=
en
send them tarballs in between releases, even though that=E2=80=99d be usefu=
l.

Anyway, let=E2=80=99s see what the TP folks think!

Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#37413; Package guix-patches. Full text available.

Message received at 37413 <at> debbugs.gnu.org:


Received: (at 37413) by debbugs.gnu.org; 18 Sep 2019 11:49:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 18 07:49:51 2019
Received: from localhost ([127.0.0.1]:53678 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iAYT1-0007QV-9S
	for submit <at> debbugs.gnu.org; Wed, 18 Sep 2019 07:49:51 -0400
Received: from pelzflorian.de ([5.45.111.108]:40362 helo=mail.pelzflorian.de)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pelzflorian@HIDDEN>) id 1iAYSz-0007QM-Dy
 for 37413 <at> debbugs.gnu.org; Wed, 18 Sep 2019 07:49:50 -0400
Received: from pelzflorian.localdomain (unknown [5.45.111.108])
 by mail.pelzflorian.de (Postfix) with ESMTPSA id 0958F3602A4;
 Wed, 18 Sep 2019 13:49:46 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pelzflorian.de;
 s=mail; t=1568807388;
 bh=qM4yIyKXl9g1b4Amtbk+7qJ2foSch6JB8T+Au+jI0xA=;
 h=Date:From:To:Cc:Subject:References:In-Reply-To;
 b=nKO1350NrqVyTUoAoM/0r9jKvlBf+wCpHu52W5MVDg1N1KzeP7usfjQzO7yYRhwCF
 I1av9peDYnLQ90fd2azRjqO2itruDdez99UutagVdkv/yS5H14ZiW0DU7o6UJXv8Cw
 ZMgJrqu2J3mlcfDkF5OP+7k5m26EWOtfdos5rtqE=
Date: Wed, 18 Sep 2019 13:49:46 +0200
From: "pelzflorian (Florian Pelz)" <pelzflorian@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: [bug#37413] [PATCH 0/9] Channel news distribution mechanism
Message-ID: <20190918114945.elbzrp6sqziylkz2@HIDDEN>
References: <20190916225258.yd4uzgcm4lyr5zgz@HIDDEN>
 <87improzwm.fsf@HIDDEN>
 <20190917133307.lhsouulr5yynzzrd@HIDDEN>
 <87blvjm485.fsf@HIDDEN>
 <20190917142819.qk6thhoocnci6svn@HIDDEN>
 <87ef0fkknq.fsf@HIDDEN>
 <20190917174102.edmbljhpte5rklsr@HIDDEN>
 <20190917202035.1e2e5515@HIDDEN>
 <20190917194415.ripfxwfmpx337z4d@HIDDEN>
 <87woe5disi.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <87woe5disi.fsf@HIDDEN>
User-Agent: NeoMutt/20180716
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 37413
Cc: Julien Lepiller <julien@HIDDEN>, 37413 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Wed, Sep 18, 2019 at 12:02:05PM +0200, Ludovic Courtès wrote:
> Ah OK.  Having an optional add-on process to work with PO files would be
> nice too have.  My concerns were about having PO files at the core of
> the news mechanism.
> 
> If you’re fine with the news format as it is in this patch series, then
> I guess we can go ahead and push the patches?
> 

Yes.



> My feeling is that this use case doesn’t correspond to what the TP is
> about, but yeah, you could ask them.
>

I will ask them, but later after Guix website translation is online.



> Also, “urgently” won’t work because they would have to be manual
> intervention by at least two people before the info reaches translators:
> someone on the Guix side who’d submit a tarball (?) to the TP, and the

The channel author would submit the tarball.  No Guix team involved.



> TP coordinator who’d notify translation teams.  That’s another reason
> why I’m skeptical about the applicability of this workflow for news.
> […]

On Wed, Sep 18, 2019 at 11:12:31AM +0200, Ludovic Courtès wrote:
> > [pelzflorian wrote:]
> >> I do not know what Benno thinks about this.  I would prefer this to be
> >> handled by some Translation Project eventually.
> 
> You mean by some external project focused on translation, not
> necessarily by the Translation Project, right?
> 

Yes, but I still prefer the Translation Project to be where
translators gather.

Regards,
Florian




Information forwarded to guix-patches@HIDDEN:
bug#37413; Package guix-patches. Full text available.

Message received at 37413 <at> debbugs.gnu.org:


Received: (at 37413) by debbugs.gnu.org; 18 Sep 2019 10:02:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 18 06:02:20 2019
Received: from localhost ([127.0.0.1]:53622 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iAWmx-0002fQ-W3
	for submit <at> debbugs.gnu.org; Wed, 18 Sep 2019 06:02:20 -0400
Received: from eggs.gnu.org ([209.51.188.92]:52436)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1iAWmv-0002fC-42
 for 37413 <at> debbugs.gnu.org; Wed, 18 Sep 2019 06:02:18 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:57219)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1iAWmn-0004Vv-3Q; Wed, 18 Sep 2019 06:02:09 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=50122 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1iAWml-0004zw-Ee; Wed, 18 Sep 2019 06:02:08 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: "pelzflorian \(Florian Pelz\)" <pelzflorian@HIDDEN>
Subject: Re: [bug#37413] [PATCH 0/9] Channel news distribution mechanism
References: <87sgow0w7w.fsf@HIDDEN>
 <20190916234941.1c450890@HIDDEN>
 <20190916225258.yd4uzgcm4lyr5zgz@HIDDEN>
 <87improzwm.fsf@HIDDEN>
 <20190917133307.lhsouulr5yynzzrd@HIDDEN>
 <87blvjm485.fsf@HIDDEN>
 <20190917142819.qk6thhoocnci6svn@HIDDEN>
 <87ef0fkknq.fsf@HIDDEN>
 <20190917174102.edmbljhpte5rklsr@HIDDEN>
 <20190917202035.1e2e5515@HIDDEN>
 <20190917194415.ripfxwfmpx337z4d@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: Jour du =?utf-8?Q?G=C3=A9nie?= de =?utf-8?Q?l'Ann?=
 =?utf-8?Q?=C3=A9e?= 227 de la =?utf-8?Q?R=C3=A9volution?=
X-PGP-Key-ID: 0x090B11993D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-pc-linux-gnu
Date: Wed, 18 Sep 2019 12:02:05 +0200
In-Reply-To: <20190917194415.ripfxwfmpx337z4d@HIDDEN>
 (pelzflorian@HIDDEN's message of "Tue, 17 Sep 2019 21:44:16
 +0200")
Message-ID: <87woe5disi.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 37413
Cc: Julien Lepiller <julien@HIDDEN>, 37413 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hello,

"pelzflorian (Florian Pelz)" <pelzflorian@HIDDEN> skribis:

> I did not want to slow down these useful patches; the news file and
> its translations can remain as proposed by Ludo.  How channel authors
> translate their news file is their choice.
>
> I thought we can suggest channel authors to use one gettext PO file
> containing translations for both the news file and package information
> and submit it to the TP.  We can provide scripts to convert to and
> from a news file.  Writing such scripts is not hard because PO files
> use a simple format.  Guix itself should use this process too.

Ah OK.  Having an optional add-on process to work with PO files would be
nice too have.  My concerns were about having PO files at the core of
the news mechanism.

If you=E2=80=99re fine with the news format as it is in this patch series, =
then
I guess we can go ahead and push the patches?

> How about adding a comment to the POT file that we wish for
> translators to prioritize and urgently add translations for news?  Is
> it really necessary to submit the entire Guix tarball to the TP for
> updating news; I thought the tarball is just for convenience of
> translators?  I wonder what Benno or others from the TP think.

My feeling is that this use case doesn=E2=80=99t correspond to what the TP =
is
about, but yeah, you could ask them.

Also, =E2=80=9Curgently=E2=80=9D won=E2=80=99t work because they would have=
 to be manual
intervention by at least two people before the info reaches translators:
someone on the Guix side who=E2=80=99d submit a tarball (?) to the TP, and =
the
TP coordinator who=E2=80=99d notify translation teams.  That=E2=80=99s anot=
her reason
why I=E2=80=99m skeptical about the applicability of this workflow for news.

>> Using a PO file for news items seem a bit drastic too: a news item is
>> not supposed to change, except maybe for a typo.
>>
>
> PO files are simple and what the Translation Project=E2=80=99s translator=
s are
> used to.  I do not understand how another format could be more
> appropriate.

It=E2=80=99s not so much about the format, but rather about the tooling and
workflow.  I do not see how to integrate gettext and everything that
goes with it (PO files, compilation to .gmo, text domains, etc.)
directly into this design.

But like you wrote, we can add tools on top that would allow us to use
PO files if we want to.

Thanks,
Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#37413; Package guix-patches. Full text available.

Message received at 37413 <at> debbugs.gnu.org:


Received: (at 37413) by debbugs.gnu.org; 18 Sep 2019 09:12:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 18 05:12:44 2019
Received: from localhost ([127.0.0.1]:53586 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iAW0y-0001Tt-BR
	for submit <at> debbugs.gnu.org; Wed, 18 Sep 2019 05:12:44 -0400
Received: from eggs.gnu.org ([209.51.188.92]:45863)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1iAW0u-0001Te-1x
 for 37413 <at> debbugs.gnu.org; Wed, 18 Sep 2019 05:12:43 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:56636)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1iAW0o-0001ly-1I; Wed, 18 Sep 2019 05:12:34 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=49940 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1iAW0n-00018j-BP; Wed, 18 Sep 2019 05:12:33 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Julien Lepiller <julien@HIDDEN>
Subject: Re: [bug#37413] [PATCH 0/9] Channel news distribution mechanism
References: <20190915221021.4165-1-ludo@HIDDEN> <87sgow0w7w.fsf@HIDDEN>
 <20190916234941.1c450890@HIDDEN>
 <20190916225258.yd4uzgcm4lyr5zgz@HIDDEN>
 <87improzwm.fsf@HIDDEN>
 <20190917133307.lhsouulr5yynzzrd@HIDDEN>
 <87blvjm485.fsf@HIDDEN>
 <20190917142819.qk6thhoocnci6svn@HIDDEN>
 <87ef0fkknq.fsf@HIDDEN>
 <20190917174102.edmbljhpte5rklsr@HIDDEN>
 <20190917202035.1e2e5515@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: Jour du =?utf-8?Q?G=C3=A9nie?= de =?utf-8?Q?l'Ann?=
 =?utf-8?Q?=C3=A9e?= 227 de la =?utf-8?Q?R=C3=A9volution?=
X-PGP-Key-ID: 0x090B11993D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-pc-linux-gnu
Date: Wed, 18 Sep 2019 11:12:31 +0200
In-Reply-To: <20190917202035.1e2e5515@HIDDEN> (Julien Lepiller's
 message of "Tue, 17 Sep 2019 20:21:18 +0200")
Message-ID: <87o8zidl34.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 37413
Cc: 37413 <at> debbugs.gnu.org,
 "pelzflorian \(Florian Pelz\)" <pelzflorian@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hello,

Julien Lepiller <julien@HIDDEN> skribis:

>> I do not know what Benno thinks about this.  I would prefer this to be
>> handled by some Translation Project eventually.

You mean by some external project focused on translation, not
necessarily by the Translation Project, right?

> I partially agree: on the one hand, having our own translation platform
> only increases fragmentation of the free software translation teams,
> and on the other hand, it means we can have a more reactive and
> customized translation process. I also agree with Ludo that the TP is
> probably not the right place for news translations: even if Benno
> accepts the new translations super fast (and Benno is usually fast,
> I just keep making mistakes when submitting a new version), it's
> going to update all translations (guix, guix-packages and guix-manual),
> and translators might focus on these instead of the news.
>
> Using a PO file for news items seem a bit drastic too: a news item is
> not supposed to change, except maybe for a typo.

Yeah.  Another issue is that you don=E2=80=99t want translators to spend ti=
me
translating news from last year.  News translation is very much
now-or-never.

> Channel translation is another subject, but they could provide their
> own PO file and have them translated separately from the official Guix
> translation process. Guix pull would then concatenate po files from
> every channel and install that. Does it sound good/feasible?

This patch set adds a single mechanism to distribute news alongside a
channel, be it the 'guix channel or another channel, and I think that=E2=80=
=99s
a good thing.

If we want to preserve this property, any solution that special-cases
the 'guix channel won=E2=80=99t work.

Also, when I wrote that switching to PO files would introduce technical
challenges, I really mean it.  :-)  For example, how would
=E2=80=98.guix-channel=E2=80=99 specify where PO files for its news are to =
be found?
Would =E2=80=98.guix-channel=E2=80=99 also have to specify a text domain?  =
How would we
compile PO files to .mo/.gmo such that gettext can actually find these
things at run time?  What if a channel specifies a text domain already
used for something else?  Do we really want to tell channel authors to
fiddle with a workflow as complex as gettext + TP?  And so on.

Thanks,
Ludo=E2=80=99.

PS: Please trim quotes a bit when replying.  :-)




Information forwarded to guix-patches@HIDDEN:
bug#37413; Package guix-patches. Full text available.

Message received at 37413 <at> debbugs.gnu.org:


Received: (at 37413) by debbugs.gnu.org; 17 Sep 2019 22:02:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 17 18:02:52 2019
Received: from localhost ([127.0.0.1]:53393 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iALYi-0000ic-8H
	for submit <at> debbugs.gnu.org; Tue, 17 Sep 2019 18:02:52 -0400
Received: from pelzflorian.de ([5.45.111.108]:39596 helo=mail.pelzflorian.de)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pelzflorian@HIDDEN>) id 1iALYf-0000iR-ES
 for 37413 <at> debbugs.gnu.org; Tue, 17 Sep 2019 18:02:50 -0400
Received: from pelzflorian.localdomain (unknown [5.45.111.108])
 by mail.pelzflorian.de (Postfix) with ESMTPSA id 612AF3604C5;
 Wed, 18 Sep 2019 00:02:47 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pelzflorian.de;
 s=mail; t=1568757767;
 bh=grnz8y3BudLAO027DLmF2h9V17k8ogw0Ea/h3WQ1AOI=;
 h=Date:From:To:Cc:Subject:References:In-Reply-To;
 b=CXN8wl9otxpynQ65cKtxTmOI71tEEOa+Kd3AhH8lzns2K1BrK0JYRSpuLh1FcyblS
 clNrJxeqD+gcPjHyRPGM9T0JGrUd5X2cti16z0cAIC5nrc7GkT5OoKBet5Irxi8egP
 kxwMTLAKfHpQVvP6pZl1B2VqE/KOBNE5Zk9wkrlw=
Date: Wed, 18 Sep 2019 00:02:46 +0200
From: "pelzflorian (Florian Pelz)" <pelzflorian@HIDDEN>
To: Julien Lepiller <julien@HIDDEN>
Subject: Re: [bug#37413] [PATCH 0/9] Channel news distribution mechanism
Message-ID: <20190917220246.qnmbim4pb3qlbgro@HIDDEN>
References: <20190916234941.1c450890@HIDDEN>
 <20190916225258.yd4uzgcm4lyr5zgz@HIDDEN>
 <87improzwm.fsf@HIDDEN>
 <20190917133307.lhsouulr5yynzzrd@HIDDEN>
 <87blvjm485.fsf@HIDDEN>
 <20190917142819.qk6thhoocnci6svn@HIDDEN>
 <87ef0fkknq.fsf@HIDDEN>
 <20190917174102.edmbljhpte5rklsr@HIDDEN>
 <20190917202035.1e2e5515@HIDDEN>
 <20190917194415.ripfxwfmpx337z4d@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <20190917194415.ripfxwfmpx337z4d@HIDDEN>
User-Agent: NeoMutt/20180716
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 37413
Cc: 37413 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Tue, Sep 17, 2019 at 09:44:16PM +0200, pelzflorian (Florian Pelz) wrote:
> On Tue, Sep 17, 2019 at 08:21:18PM +0200, Julien Lepiller wrote:
> > […]
> > Channel translation is another subject, but they could provide their
> > own PO file and have them translated separately from the official Guix
> > translation process. Guix pull would then concatenate po files from
> > every channel and install that. Does it sound good/feasible?
> >
> 
> I did not think about this before, but Julien’s idea how to process a
> channel’s PO files with translations for package descriptions seems
> good.  Just msgcat guix-packages and the other channels’ PO files to
> the PO file for guix-packages and then run msgfmt on the result.
> 

No, concatenation via msgcat is not feasible.  It could fail if
translations clash, e.g. when channel A translates "Hello" as
"Bonjour" and channel B translates "Hello" as "Salut".  To handle this
edge case, PO files would need to remain separate and the textdomain
procedure would need to be called by Guix before looking up package
descriptions from this channel, I think.

Regards,
Florian






> 
> On Tue, Sep 17, 2019 at 08:21:18PM +0200, Julien Lepiller wrote:
> > I partially agree: on the one hand, having our own translation platform
> > only increases fragmentation of the free software translation teams,
> > and on the other hand, it means we can have a more reactive and
> > customized translation process. I also agree with Ludo that the TP is
> > probably not the right place for news translations: even if Benno
> > accepts the new translations super fast (and Benno is usually fast,
> > I just keep making mistakes when submitting a new version), it's
> > going to update all translations (guix, guix-packages and guix-manual),
> > and translators might focus on these instead of the news.
> >
> 
> How about adding a comment to the POT file that we wish for
> translators to prioritize and urgently add translations for news?  Is
> it really necessary to submit the entire Guix tarball to the TP for
> updating news; I thought the tarball is just for convenience of
> translators?  I wonder what Benno or others from the TP think.  I
> think Guix’ goals align well with those of the TP.
> 
> 
> 
> > Using a PO file for news items seem a bit drastic too: a news item is
> > not supposed to change, except maybe for a typo.
> >
> 
> PO files are simple and what the Translation Project’s translators are
> used to.  I do not understand how another format could be more
> appropriate.
> 
> Regards,
> Florian
> 
> 
> 




Information forwarded to guix-patches@HIDDEN:
bug#37413; Package guix-patches. Full text available.

Message received at 37413 <at> debbugs.gnu.org:


Received: (at 37413) by debbugs.gnu.org; 17 Sep 2019 19:44:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 17 15:44:21 2019
Received: from localhost ([127.0.0.1]:53353 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iAJOe-0005H2-Pk
	for submit <at> debbugs.gnu.org; Tue, 17 Sep 2019 15:44:21 -0400
Received: from pelzflorian.de ([5.45.111.108]:39416 helo=mail.pelzflorian.de)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pelzflorian@HIDDEN>) id 1iAJOb-0005Gr-Qu
 for 37413 <at> debbugs.gnu.org; Tue, 17 Sep 2019 15:44:18 -0400
Received: from pelzflorian.localdomain (unknown [5.45.111.108])
 by mail.pelzflorian.de (Postfix) with ESMTPSA id 5AD953604C5;
 Tue, 17 Sep 2019 21:44:16 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pelzflorian.de;
 s=mail; t=1568749456;
 bh=LoL3C4TCV8k8XtaFU3q58WNT+K4M6u+ArB3ZLONpsyY=;
 h=Date:From:To:Cc:Subject:References:In-Reply-To;
 b=H3pa3Npb/3xDfCH+cCcrJWd3s3jrQNgpF7iQZO9BYJgELwyYcX+WZaWc7ou3+1m+5
 hzDG+iVZoKNjJEda6ByZgHcXMWGgPH66UkS/vRv/d8rlm2ocr8yjLELvzw+ksvg19x
 l/NkGKfZ8g0rw2YBuUsx3OtpUiKRgFVixLhRy1zA=
Date: Tue, 17 Sep 2019 21:44:16 +0200
From: "pelzflorian (Florian Pelz)" <pelzflorian@HIDDEN>
To: Julien Lepiller <julien@HIDDEN>
Subject: Re: [bug#37413] [PATCH 0/9] Channel news distribution mechanism
Message-ID: <20190917194415.ripfxwfmpx337z4d@HIDDEN>
References: <87sgow0w7w.fsf@HIDDEN>
 <20190916234941.1c450890@HIDDEN>
 <20190916225258.yd4uzgcm4lyr5zgz@HIDDEN>
 <87improzwm.fsf@HIDDEN>
 <20190917133307.lhsouulr5yynzzrd@HIDDEN>
 <87blvjm485.fsf@HIDDEN>
 <20190917142819.qk6thhoocnci6svn@HIDDEN>
 <87ef0fkknq.fsf@HIDDEN>
 <20190917174102.edmbljhpte5rklsr@HIDDEN>
 <20190917202035.1e2e5515@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <20190917202035.1e2e5515@HIDDEN>
User-Agent: NeoMutt/20180716
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 37413
Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, 37413 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

I did not want to slow down these useful patches; the news file and
its translations can remain as proposed by Ludo.  How channel authors
translate their news file is their choice.

I thought we can suggest channel authors to use one gettext PO file
containing translations for both the news file and package information
and submit it to the TP.  We can provide scripts to convert to and
from a news file.  Writing such scripts is not hard because PO files
use a simple format.  Guix itself should use this process too.


On Tue, Sep 17, 2019 at 08:21:18PM +0200, Julien Lepiller wrote:
> […]
> Channel translation is another subject, but they could provide their
> own PO file and have them translated separately from the official Guix
> translation process. Guix pull would then concatenate po files from
> every channel and install that. Does it sound good/feasible?
>

I did not think about this before, but Julien’s idea how to process a
channel’s PO files with translations for package descriptions seems
good.  Just msgcat guix-packages and the other channels’ PO files to
the PO file for guix-packages and then run msgfmt on the result.


On Tue, Sep 17, 2019 at 08:21:18PM +0200, Julien Lepiller wrote:
> I partially agree: on the one hand, having our own translation platform
> only increases fragmentation of the free software translation teams,
> and on the other hand, it means we can have a more reactive and
> customized translation process. I also agree with Ludo that the TP is
> probably not the right place for news translations: even if Benno
> accepts the new translations super fast (and Benno is usually fast,
> I just keep making mistakes when submitting a new version), it's
> going to update all translations (guix, guix-packages and guix-manual),
> and translators might focus on these instead of the news.
>

How about adding a comment to the POT file that we wish for
translators to prioritize and urgently add translations for news?  Is
it really necessary to submit the entire Guix tarball to the TP for
updating news; I thought the tarball is just for convenience of
translators?  I wonder what Benno or others from the TP think.  I
think Guix’ goals align well with those of the TP.



> Using a PO file for news items seem a bit drastic too: a news item is
> not supposed to change, except maybe for a typo.
>

PO files are simple and what the Translation Project’s translators are
used to.  I do not understand how another format could be more
appropriate.

Regards,
Florian




Information forwarded to guix-patches@HIDDEN:
bug#37413; Package guix-patches. Full text available.

Message received at 37413 <at> debbugs.gnu.org:


Received: (at 37413) by debbugs.gnu.org; 17 Sep 2019 18:21:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 17 14:21:31 2019
Received: from localhost ([127.0.0.1]:53238 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iAI6U-0002r5-RP
	for submit <at> debbugs.gnu.org; Tue, 17 Sep 2019 14:21:31 -0400
Received: from lepiller.eu ([89.234.186.109]:37174)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <julien@HIDDEN>) id 1iAI6R-0002qp-45
 for 37413 <at> debbugs.gnu.org; Tue, 17 Sep 2019 14:21:29 -0400
Received: from lepiller.eu (localhost [127.0.0.1])
 by lepiller.eu (OpenSMTPD) with ESMTP id 4410a407;
 Tue, 17 Sep 2019 18:21:22 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=lepiller.eu; h=date:from
 :to:cc:subject:message-id:in-reply-to:references:mime-version
 :content-type:content-transfer-encoding; s=dkim; bh=mAPE3E5eY9r1
 Id7Bkycl4KYxkIU=; b=Iph5iKMT+JiG2qF1HUpeyfu4A+U40kM3Xvbg7sd7iNmc
 2nNxuEEUJtE9NwzMO3PaiZG8lqnEgipW168+nFUBcYofleLwI13dB8VBcx0U5dpn
 YMIRWqUf9L2elpqZC4G/DQBHsNnAnOfH4zjIVBisO0fj9fObL/75Ku4mESptNQPG
 J3stMK4kQW3GuzCuiPpIVtjC+PeoGYpaGjgww4RHe++FTzP8VPFhugrqUpzEt9ZZ
 desTKmib1kJW3pzts96gantnTXJx584DYyKDeL6eNCccc2w6WzDHIQ+MFds/S2KN
 2S8LBAWECGTrb1S7W83LYjW7kRDQDD+1iucFwh7Utw==
DomainKey-Signature: a=rsa-sha1; c=nofws; d=lepiller.eu; h=date:from:to
 :cc:subject:message-id:in-reply-to:references:mime-version
 :content-type:content-transfer-encoding; q=dns; s=dkim; b=CqWZda
 U6uN2MzZNsvzYKJ0+goPyS52KWN//GfXL45Lj+o+nojGUqVZyDz5UGGheL3hPAPr
 iYvTLIxNah6YaUPen7qkHOfTTVh0aAZ/yk8cbSNiYEEZtjoWePWAo9fAkqijX9pt
 7pTH8CAlt0AZtM3ae1uZx2IKDYQ6xNXGNOR+WCRcx4BfaeGFK2ByC3QPUj2qyBLB
 ASqr/YR3wCsj8XvtIdN9iupThEvJ8VusX11Al3bGIdmLa5Z5CdD6DsnCsF6DQ8Ss
 YIPMxfuNt/EYWSj+DIk/RmGjph4Jc1ejY+WRyjxNV6qnuQBAHQkG3/KdlSgcFes3
 9pgov3iIdpHfWJFw==
Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id bc6b3ed0
 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); 
 Tue, 17 Sep 2019 18:21:22 +0000 (UTC)
Date: Tue, 17 Sep 2019 20:21:18 +0200
From: Julien Lepiller <julien@HIDDEN>
To: 37413 <at> debbugs.gnu.org
Subject: Re: [bug#37413] [PATCH 0/9] Channel news distribution mechanism
Message-ID: <20190917202035.1e2e5515@HIDDEN>
In-Reply-To: <20190917174102.edmbljhpte5rklsr@HIDDEN>
References: <20190915221021.4165-1-ludo@HIDDEN> <87sgow0w7w.fsf@HIDDEN>
 <20190916234941.1c450890@HIDDEN>
 <20190916225258.yd4uzgcm4lyr5zgz@HIDDEN>
 <87improzwm.fsf@HIDDEN>
 <20190917133307.lhsouulr5yynzzrd@HIDDEN>
 <87blvjm485.fsf@HIDDEN>
 <20190917142819.qk6thhoocnci6svn@HIDDEN>
 <87ef0fkknq.fsf@HIDDEN>
 <20190917174102.edmbljhpte5rklsr@HIDDEN>
X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-unknown-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 37413
Cc: Ludovic =?UTF-8?B?Q291cnTDqHM=?= <ludo@HIDDEN>,
 "pelzflorian \(Florian Pelz\)" <pelzflorian@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Le Tue, 17 Sep 2019 19:41:02 +0200,
"pelzflorian (Florian Pelz)" <pelzflorian@HIDDEN> a =C3=A9crit :

> On Tue, Sep 17, 2019 at 05:27:37PM +0200, Ludovic Court=C3=A8s wrote:
> > As you=E2=80=99ve seen, the format I proposed does not rely on PO files=
 and
> > gettext at all:
> >=20
> >   https://issues.guix.gnu.org/issue/37413#5
> > =20
>=20
> I did not read carefully before, but even with this format, a Guile
> script could turn it into a POT file with multiple entries and another
> Guile script could add translations from a PO file into such a news
> file.
>=20
>=20
>=20
>=20
> > Are you suggesting that it should rely on PO files? =20
>=20
>=20
> Yes.  The format need not be changed.  PO file conversion scripts can
> be added later, but should be a goal.
>=20
>=20
>=20
>=20
> > We can discuss it,
> > but that would be a significant change with technical challenges
> > compared to what I propose.
> > (Also keep in mind that the news mechanism
> > aims to be available to third-party channels as well.)
> >  =20
>=20
> 3rd parties would not need to use the PO file conversion scripts.
>=20
>=20
>=20
> > Also, why do you mention =E2=80=9Cthe package info=E2=80=9D?  There=E2=
=80=99s no notion of a
> > package here, so I wonder if there=E2=80=99s a misunderstanding.
> >  =20
>=20
> Channels contain packages whose summaries and descriptions need
> translations as well, or do I misunderstand?  Admittedly, it will take
> some time until guix-packages is translated, but it should be a goal.
>=20
>=20
>=20
>=20
> > >> and (2) I think this is outside
> > >> the scope of the TP.
> > >>=20
> > >> Does that clarify?
> > >>=20
> > >> Ludo=E2=80=99. =20
> > >
> > > I do not see why such translation should be outside the scope of
> > > the TP?  I can only think of the speed of POT file acceptance and
> > > PO file translators. =20
> >=20
> > Speed would be a problem (POT files have to be manually accepted by
> > Benno.)  But also, like I wrote earlier, (1) the TP is geared
> > towards translating releases of software packages, and (2) and
> > those news snippets could arrive anytime, not in sync with a
> > =E2=80=9Crelease.=E2=80=9D=20
> > > I am unsure if setting up Guix=E2=80=99 own translation team would at=
tract
> > > quicker translators than relying on the TP. =20
> >=20
> > Yeah, having a real translation team is best, but in this case I
> > don=E2=80=99t see how that could work.
> >=20
> > Julien mentioned some time ago that we could run our own Pootle
> > instance.  Maybe that could be helpful in this case.
> >=20
> > Thank you,
> > Ludo=E2=80=99. =20
>=20
> I do not know what Benno thinks about this.  I would prefer this to be
> handled by some Translation Project eventually.

I partially agree: on the one hand, having our own translation platform
only increases fragmentation of the free software translation teams,
and on the other hand, it means we can have a more reactive and
customized translation process. I also agree with Ludo that the TP is
probably not the right place for news translations: even if Benno
accepts the new translations super fast (and Benno is usually fast,
I just keep making mistakes when submitting a new version), it's
going to update all translations (guix, guix-packages and guix-manual),
and translators might focus on these instead of the news.

Using a PO file for news items seem a bit drastic too: a news item is
not supposed to change, except maybe for a typo.

Channel translation is another subject, but they could provide their
own PO file and have them translated separately from the official Guix
translation process. Guix pull would then concatenate po files from
every channel and install that. Does it sound good/feasible?

>=20
> Regards,
> Florian





Information forwarded to guix-patches@HIDDEN:
bug#37413; Package guix-patches. Full text available.

Message received at 37413 <at> debbugs.gnu.org:


Received: (at 37413) by debbugs.gnu.org; 17 Sep 2019 17:41:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 17 13:41:08 2019
Received: from localhost ([127.0.0.1]:53216 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iAHTQ-0001TX-Br
	for submit <at> debbugs.gnu.org; Tue, 17 Sep 2019 13:41:08 -0400
Received: from pelzflorian.de ([5.45.111.108]:39306 helo=mail.pelzflorian.de)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pelzflorian@HIDDEN>) id 1iAHTM-0001TK-Mq
 for 37413 <at> debbugs.gnu.org; Tue, 17 Sep 2019 13:41:06 -0400
Received: from pelzflorian.localdomain (unknown [5.45.111.108])
 by mail.pelzflorian.de (Postfix) with ESMTPSA id 1359D3604C5;
 Tue, 17 Sep 2019 19:41:02 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pelzflorian.de;
 s=mail; t=1568742063;
 bh=n8i+H+G5wvb1wi/K2Vvxh1rFKFIHOls4YBXH1J8ijgc=;
 h=Date:From:To:Cc:Subject:References:In-Reply-To;
 b=skP81WKVMfEYrEZvXhJY8nmGt515JcdJooubAWBboVdkDAxr5JiUAOoYOlhyegCcA
 WHhRCUdUYgp5OEX2xG9VcnIhu/7qFykXvM2rY9mb9DxEllsulq5KAh52o6LM1ENbB0
 q3cKjCpRo+G9Ybm0ViI/eYBbf62ME0ymlAdlpEFc=
Date: Tue, 17 Sep 2019 19:41:02 +0200
From: "pelzflorian (Florian Pelz)" <pelzflorian@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: [bug#37413] [PATCH 0/9] Channel news distribution mechanism
Message-ID: <20190917174102.edmbljhpte5rklsr@HIDDEN>
References: <20190915221021.4165-1-ludo@HIDDEN> <87sgow0w7w.fsf@HIDDEN>
 <20190916234941.1c450890@HIDDEN>
 <20190916225258.yd4uzgcm4lyr5zgz@HIDDEN>
 <87improzwm.fsf@HIDDEN>
 <20190917133307.lhsouulr5yynzzrd@HIDDEN>
 <87blvjm485.fsf@HIDDEN>
 <20190917142819.qk6thhoocnci6svn@HIDDEN>
 <87ef0fkknq.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <87ef0fkknq.fsf@HIDDEN>
User-Agent: NeoMutt/20180716
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 37413
Cc: Julien Lepiller <julien@HIDDEN>, 37413 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Tue, Sep 17, 2019 at 05:27:37PM +0200, Ludovic Courtès wrote:
> As you’ve seen, the format I proposed does not rely on PO files and
> gettext at all:
> 
>   https://issues.guix.gnu.org/issue/37413#5
>

I did not read carefully before, but even with this format, a Guile
script could turn it into a POT file with multiple entries and another
Guile script could add translations from a PO file into such a news
file.




> Are you suggesting that it should rely on PO files?


Yes.  The format need not be changed.  PO file conversion scripts can
be added later, but should be a goal.




> We can discuss it,
> but that would be a significant change with technical challenges
> compared to what I propose.
> (Also keep in mind that the news mechanism
> aims to be available to third-party channels as well.)
> 

3rd parties would not need to use the PO file conversion scripts.



> Also, why do you mention “the package info”?  There’s no notion of a
> package here, so I wonder if there’s a misunderstanding.
> 

Channels contain packages whose summaries and descriptions need
translations as well, or do I misunderstand?  Admittedly, it will take
some time until guix-packages is translated, but it should be a goal.




> >> and (2) I think this is outside
> >> the scope of the TP.
> >> 
> >> Does that clarify?
> >> 
> >> Ludo’.
> >
> > I do not see why such translation should be outside the scope of the
> > TP?  I can only think of the speed of POT file acceptance and PO file
> > translators.
> 
> Speed would be a problem (POT files have to be manually accepted by
> Benno.)  But also, like I wrote earlier, (1) the TP is geared towards
> translating releases of software packages, and (2) and those news
> snippets could arrive anytime, not in sync with a “release.”
>
> > I am unsure if setting up Guix’ own translation team would attract
> > quicker translators than relying on the TP.
> 
> Yeah, having a real translation team is best, but in this case I don’t
> see how that could work.
> 
> Julien mentioned some time ago that we could run our own Pootle
> instance.  Maybe that could be helpful in this case.
> 
> Thank you,
> Ludo’.

I do not know what Benno thinks about this.  I would prefer this to be
handled by some Translation Project eventually.

Regards,
Florian




Information forwarded to guix-patches@HIDDEN:
bug#37413; Package guix-patches. Full text available.

Message received at 37413 <at> debbugs.gnu.org:


Received: (at 37413) by debbugs.gnu.org; 17 Sep 2019 15:27:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 17 11:27:51 2019
Received: from localhost ([127.0.0.1]:53149 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iAFOR-000624-5k
	for submit <at> debbugs.gnu.org; Tue, 17 Sep 2019 11:27:51 -0400
Received: from eggs.gnu.org ([209.51.188.92]:54101)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1iAFOP-00061r-8E
 for 37413 <at> debbugs.gnu.org; Tue, 17 Sep 2019 11:27:50 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:43240)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1iAFOH-00079i-PY; Tue, 17 Sep 2019 11:27:43 -0400
Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=41914 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1iAFOG-0002nY-RZ; Tue, 17 Sep 2019 11:27:41 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: "pelzflorian \(Florian Pelz\)" <pelzflorian@HIDDEN>
Subject: Re: [bug#37413] [PATCH 0/9] Channel news distribution mechanism
References: <20190915221021.4165-1-ludo@HIDDEN> <87sgow0w7w.fsf@HIDDEN>
 <20190916234941.1c450890@HIDDEN>
 <20190916225258.yd4uzgcm4lyr5zgz@HIDDEN>
 <87improzwm.fsf@HIDDEN>
 <20190917133307.lhsouulr5yynzzrd@HIDDEN>
 <87blvjm485.fsf@HIDDEN>
 <20190917142819.qk6thhoocnci6svn@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: Jour de la Vertu de =?utf-8?Q?l'Ann=C3=A9e?= 227 de la
 =?utf-8?Q?R=C3=A9volution?=
X-PGP-Key-ID: 0x090B11993D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-pc-linux-gnu
Date: Tue, 17 Sep 2019 17:27:37 +0200
In-Reply-To: <20190917142819.qk6thhoocnci6svn@HIDDEN>
 (pelzflorian@HIDDEN's message of "Tue, 17 Sep 2019 16:28:19
 +0200")
Message-ID: <87ef0fkknq.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 37413
Cc: Julien Lepiller <julien@HIDDEN>, 37413 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hello,

"pelzflorian (Florian Pelz)" <pelzflorian@HIDDEN> skribis:

> On Tue, Sep 17, 2019 at 03:39:38PM +0200, Ludovic Court=C3=A8s wrote:
>> "pelzflorian (Florian Pelz)" <pelzflorian@HIDDEN> skribis:
>> > You mean it takes too long for the TP coordinator to accept new
>> > versions of PO files?
>>=20
>> I mean two things: (1) there will not be PO files (see the format of
>> news entries proposed in this issue),
>
> It is easy to write a Guile script that prints a PO file with the news
> file content inserted as the msgid of a single entry, if xgettext does
> not support this already.  Then there would be two PO files, one for
> the news file and one for the package info, that could be concatenated
> by msgcat to a single file.  Guix could ship with this tooling for
> channel authors and an explanation for how to submit the resulting POT
> file to the Translation Project.
>
> I think a single file is easier for translators to manage than two
> files and typically we=E2=80=99d want news files and packages to be trans=
lated
> by the same (group of) translator(s).

As you=E2=80=99ve seen, the format I proposed does not rely on PO files and
gettext at all:

  https://issues.guix.gnu.org/issue/37413#5

Are you suggesting that it should rely on PO files?  We can discuss it,
but that would be a significant change with technical challenges
compared to what I propose.  (Also keep in mind that the news mechanism
aims to be available to third-party channels as well.)

Also, why do you mention =E2=80=9Cthe package info=E2=80=9D?  There=E2=80=
=99s no notion of a
package here, so I wonder if there=E2=80=99s a misunderstanding.

>> and (2) I think this is outside
>> the scope of the TP.
>>=20
>> Does that clarify?
>>=20
>> Ludo=E2=80=99.
>
> I do not see why such translation should be outside the scope of the
> TP?  I can only think of the speed of POT file acceptance and PO file
> translators.

Speed would be a problem (POT files have to be manually accepted by
Benno.)  But also, like I wrote earlier, (1) the TP is geared towards
translating releases of software packages, and (2) and those news
snippets could arrive anytime, not in sync with a =E2=80=9Crelease.=E2=80=9D

> I am unsure if setting up Guix=E2=80=99 own translation team would attract
> quicker translators than relying on the TP.

Yeah, having a real translation team is best, but in this case I don=E2=80=
=99t
see how that could work.

Julien mentioned some time ago that we could run our own Pootle
instance.  Maybe that could be helpful in this case.

Thank you,
Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#37413; Package guix-patches. Full text available.

Message received at 37413 <at> debbugs.gnu.org:


Received: (at 37413) by debbugs.gnu.org; 17 Sep 2019 14:28:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 17 10:28:23 2019
Received: from localhost ([127.0.0.1]:53117 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iAESt-0004eO-8q
	for submit <at> debbugs.gnu.org; Tue, 17 Sep 2019 10:28:23 -0400
Received: from pelzflorian.de ([5.45.111.108]:39110 helo=mail.pelzflorian.de)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pelzflorian@HIDDEN>) id 1iAESr-0004eF-1Z
 for 37413 <at> debbugs.gnu.org; Tue, 17 Sep 2019 10:28:21 -0400
Received: from pelzflorian.localdomain (unknown [5.45.111.108])
 by mail.pelzflorian.de (Postfix) with ESMTPSA id A30863604C5;
 Tue, 17 Sep 2019 16:28:19 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pelzflorian.de;
 s=mail; t=1568730499;
 bh=bGiNZAxnYylK2KVITL4PJ9Qiwa49AbuW/WWjOZjo4h0=;
 h=Date:From:To:Cc:Subject:References:In-Reply-To;
 b=S4vK1/dsM6U2wK9ysMpYd4qwdRJzCrFxKD2vurj+Y0cXvDFXEX5+iUEWPoi15mX52
 2urua83fTjQHJeQArE6hswhD7kLn50ThdXZ3kZH90h7h1u8lFfZ7QdSF7/jGgTWosZ
 g9waSSm4XpUo6Rxk+uYUJ802sA4lbt4SzMEymidw=
Date: Tue, 17 Sep 2019 16:28:19 +0200
From: "pelzflorian (Florian Pelz)" <pelzflorian@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: [bug#37413] [PATCH 0/9] Channel news distribution mechanism
Message-ID: <20190917142819.qk6thhoocnci6svn@HIDDEN>
References: <20190915221021.4165-1-ludo@HIDDEN> <87sgow0w7w.fsf@HIDDEN>
 <20190916234941.1c450890@HIDDEN>
 <20190916225258.yd4uzgcm4lyr5zgz@HIDDEN>
 <87improzwm.fsf@HIDDEN>
 <20190917133307.lhsouulr5yynzzrd@HIDDEN>
 <87blvjm485.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <87blvjm485.fsf@HIDDEN>
User-Agent: NeoMutt/20180716
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 37413
Cc: Julien Lepiller <julien@HIDDEN>, 37413 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Tue, Sep 17, 2019 at 03:39:38PM +0200, Ludovic Courtès wrote:
> "pelzflorian (Florian Pelz)" <pelzflorian@HIDDEN> skribis:
> > You mean it takes too long for the TP coordinator to accept new
> > versions of PO files?
> 
> I mean two things: (1) there will not be PO files (see the format of
> news entries proposed in this issue),

It is easy to write a Guile script that prints a PO file with the news
file content inserted as the msgid of a single entry, if xgettext does
not support this already.  Then there would be two PO files, one for
the news file and one for the package info, that could be concatenated
by msgcat to a single file.  Guix could ship with this tooling for
channel authors and an explanation for how to submit the resulting POT
file to the Translation Project.

I think a single file is easier for translators to manage than two
files and typically we’d want news files and packages to be translated
by the same (group of) translator(s).


> and (2) I think this is outside
> the scope of the TP.
> 
> Does that clarify?
> 
> Ludo’.

I do not see why such translation should be outside the scope of the
TP?  I can only think of the speed of POT file acceptance and PO file
translators.  I am unsure if setting up Guix’ own translation team
would attract quicker translators than relying on the TP.

Regards,
Florian




Information forwarded to guix-patches@HIDDEN:
bug#37413; Package guix-patches. Full text available.

Message received at 37413 <at> debbugs.gnu.org:


Received: (at 37413) by debbugs.gnu.org; 17 Sep 2019 13:39:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 17 09:39:56 2019
Received: from localhost ([127.0.0.1]:51856 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iADi0-0003Et-Cj
	for submit <at> debbugs.gnu.org; Tue, 17 Sep 2019 09:39:56 -0400
Received: from eggs.gnu.org ([209.51.188.92]:37764)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1iADhy-0003Ec-MN
 for 37413 <at> debbugs.gnu.org; Tue, 17 Sep 2019 09:39:55 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:41712)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1iADhp-0007L4-Kn; Tue, 17 Sep 2019 09:39:45 -0400
Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=39792 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1iADho-0000qV-RQ; Tue, 17 Sep 2019 09:39:45 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: "pelzflorian \(Florian Pelz\)" <pelzflorian@HIDDEN>
Subject: Re: [bug#37413] [PATCH 0/9] Channel news distribution mechanism
References: <20190915221021.4165-1-ludo@HIDDEN> <87sgow0w7w.fsf@HIDDEN>
 <20190916234941.1c450890@HIDDEN>
 <20190916225258.yd4uzgcm4lyr5zgz@HIDDEN>
 <87improzwm.fsf@HIDDEN>
 <20190917133307.lhsouulr5yynzzrd@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: Jour de la Vertu de =?utf-8?Q?l'Ann=C3=A9e?= 227 de la
 =?utf-8?Q?R=C3=A9volution?=
X-PGP-Key-ID: 0x090B11993D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-pc-linux-gnu
Date: Tue, 17 Sep 2019 15:39:38 +0200
In-Reply-To: <20190917133307.lhsouulr5yynzzrd@HIDDEN>
 (pelzflorian@HIDDEN's message of "Tue, 17 Sep 2019 15:33:07
 +0200")
Message-ID: <87blvjm485.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 37413
Cc: Julien Lepiller <julien@HIDDEN>, 37413 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hi,

"pelzflorian (Florian Pelz)" <pelzflorian@HIDDEN> skribis:

>> but I
>> don=E2=80=99t see how this relates to news entries.  What do you have in=
 mind?
>>
>
> I thought everything about translating the channel should be in a
> single location, so translators can ensure the same terminology is
> used in news file and package information.

What do you mean by =E2=80=9Ceverything about translating the channel=E2=80=
=9D?  You
mean instructions on how to do it?

I agree that using consistent terminology is important, but I think it=E2=
=80=99s
up to translators to do the right thing here.

>> The reasons I think the TP is inadequate for news entries is that the TP
>> is geared towards translating releases of software packages, and those
>> tiny snippets could come anytime and there would be no PO file for them.
>>=20
>> Thanks,
>> Ludo=E2=80=99.
>
> You mean it takes too long for the TP coordinator to accept new
> versions of PO files?

I mean two things: (1) there will not be PO files (see the format of
news entries proposed in this issue), and (2) I think this is outside
the scope of the TP.

Does that clarify?

Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#37413; Package guix-patches. Full text available.

Message received at 37413 <at> debbugs.gnu.org:


Received: (at 37413) by debbugs.gnu.org; 17 Sep 2019 13:33:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 17 09:33:11 2019
Received: from localhost ([127.0.0.1]:51843 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iADbT-00035E-Ii
	for submit <at> debbugs.gnu.org; Tue, 17 Sep 2019 09:33:11 -0400
Received: from pelzflorian.de ([5.45.111.108]:39056 helo=mail.pelzflorian.de)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pelzflorian@HIDDEN>) id 1iADbR-000355-Af
 for 37413 <at> debbugs.gnu.org; Tue, 17 Sep 2019 09:33:10 -0400
Received: from pelzflorian.localdomain (unknown [5.45.111.108])
 by mail.pelzflorian.de (Postfix) with ESMTPSA id C9D2A3604C5;
 Tue, 17 Sep 2019 15:33:07 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pelzflorian.de;
 s=mail; t=1568727188;
 bh=rCmUaripfSlDBcUGKbg0QikDHZ/GQGmoYhJjzhGk2L4=;
 h=Date:From:To:Cc:Subject:References:In-Reply-To;
 b=Y13W5o1VkP1xBCUtqExRp5cc5rGQRCdWjq05AXuCHDHyn40kgPEWs5MZAjtx6xfS9
 kwQrB449Bet1t9bHasO+LqaA1gFtB0MlmJP73sN67LXBiLbOQ8kd+T3Km5Ct1bMfy+
 zbHbFVo31RLxz5mJEpqC1YPdSkLCtydgO1O4OwpU=
Date: Tue, 17 Sep 2019 15:33:07 +0200
From: "pelzflorian (Florian Pelz)" <pelzflorian@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: [bug#37413] [PATCH 0/9] Channel news distribution mechanism
Message-ID: <20190917133307.lhsouulr5yynzzrd@HIDDEN>
References: <20190915221021.4165-1-ludo@HIDDEN> <87sgow0w7w.fsf@HIDDEN>
 <20190916234941.1c450890@HIDDEN>
 <20190916225258.yd4uzgcm4lyr5zgz@HIDDEN>
 <87improzwm.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <87improzwm.fsf@HIDDEN>
User-Agent: NeoMutt/20180716
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 37413
Cc: Julien Lepiller <julien@HIDDEN>, 37413 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Tue, Sep 17, 2019 at 02:44:41PM +0200, Ludovic Courtès wrote:
> "pelzflorian (Florian Pelz)" <pelzflorian@HIDDEN> skribis:
> > Yes, I want to provide such a service, but package names and
> > descriptions should be translated too.
> 
> <https://translationproject.org/domain/guix-packages.html> is about
> translating packages and descriptions (but not package names),

Yes, I was confused. :)


> but I
> don’t see how this relates to news entries.  What do you have in mind?
>

I thought everything about translating the channel should be in a
single location, so translators can ensure the same terminology is
used in news file and package information.


> The reasons I think the TP is inadequate for news entries is that the TP
> is geared towards translating releases of software packages, and those
> tiny snippets could come anytime and there would be no PO file for them.
> 
> Thanks,
> Ludo’.

You mean it takes too long for the TP coordinator to accept new
versions of PO files?

Regards,
Florian




Information forwarded to guix-patches@HIDDEN:
bug#37413; Package guix-patches. Full text available.

Message received at 37413 <at> debbugs.gnu.org:


Received: (at 37413) by debbugs.gnu.org; 17 Sep 2019 12:45:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 17 08:45:00 2019
Received: from localhost ([127.0.0.1]:51816 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iACqo-0008Jh-7Z
	for submit <at> debbugs.gnu.org; Tue, 17 Sep 2019 08:45:00 -0400
Received: from eggs.gnu.org ([209.51.188.92]:57843)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1iACqm-0008JV-Cs
 for 37413 <at> debbugs.gnu.org; Tue, 17 Sep 2019 08:44:56 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:40996)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1iACqd-0006xy-Bv; Tue, 17 Sep 2019 08:44:47 -0400
Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=39504 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1iACqc-0004gj-Fk; Tue, 17 Sep 2019 08:44:47 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: "pelzflorian \(Florian Pelz\)" <pelzflorian@HIDDEN>
Subject: Re: [bug#37413] [PATCH 0/9] Channel news distribution mechanism
References: <20190915221021.4165-1-ludo@HIDDEN> <87sgow0w7w.fsf@HIDDEN>
 <20190916234941.1c450890@HIDDEN>
 <20190916225258.yd4uzgcm4lyr5zgz@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: Jour de la Vertu de =?utf-8?Q?l'Ann=C3=A9e?= 227 de la
 =?utf-8?Q?R=C3=A9volution?=
X-PGP-Key-ID: 0x090B11993D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-pc-linux-gnu
Date: Tue, 17 Sep 2019 14:44:41 +0200
In-Reply-To: <20190916225258.yd4uzgcm4lyr5zgz@HIDDEN>
 (pelzflorian@HIDDEN's message of "Tue, 17 Sep 2019 00:52:58
 +0200")
Message-ID: <87improzwm.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 37413
Cc: Julien Lepiller <julien@HIDDEN>, 37413 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hi Florian,

"pelzflorian (Florian Pelz)" <pelzflorian@HIDDEN> skribis:

> On Mon, Sep 16, 2019 at 11:49:50PM +0200, Julien Lepiller wrote:
>> Le Mon, 16 Sep 2019 23:25:55 +0200,
>> Ludovic Court=C3=A8s <ludo@HIDDEN> a =C3=A9crit :
>> > I=E2=80=99m thinking we could have an alias with volunteer translators=
 who
>> > would provide text fragments by email to the developer who wrote the
>> > news?  Does that sound reasonable?
>> >=20
>> > Thanks,
>> > Ludo=E2=80=99.
>>=20
>> As long as the volume is low, I think it's reasonable, but it should be
>> documented.

For Guix proper, I think the volume would be quite low (once per
month?).  Translators may have to react within a couple of days though,
basically while the change in question is under review.  It=E2=80=99s OK to
translate later, after the initial news has been pushed, but fewer
people will see it.

> Yes, I want to provide such a service, but package names and
> descriptions should be translated too.

<https://translationproject.org/domain/guix-packages.html> is about
translating packages and descriptions (but not package names), but I
don=E2=80=99t see how this relates to news entries.  What do you have in mi=
nd?

The reasons I think the TP is inadequate for news entries is that the TP
is geared towards translating releases of software packages, and those
tiny snippets could come anytime and there would be no PO file for them.

Thanks,
Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#37413; Package guix-patches. Full text available.

Message received at 37413 <at> debbugs.gnu.org:


Received: (at 37413) by debbugs.gnu.org; 16 Sep 2019 22:53:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 16 18:53:03 2019
Received: from localhost ([127.0.0.1]:51310 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1i9zri-0004Bu-Oz
	for submit <at> debbugs.gnu.org; Mon, 16 Sep 2019 18:53:03 -0400
Received: from pelzflorian.de ([5.45.111.108]:38258 helo=mail.pelzflorian.de)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pelzflorian@HIDDEN>) id 1i9zrg-0004BT-Jd
 for 37413 <at> debbugs.gnu.org; Mon, 16 Sep 2019 18:53:01 -0400
Received: from pelzflorian.localdomain (unknown [5.45.111.108])
 by mail.pelzflorian.de (Postfix) with ESMTPSA id 221723602A4;
 Tue, 17 Sep 2019 00:52:59 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pelzflorian.de;
 s=mail; t=1568674379;
 bh=aPzpQv2XpOMuH9ivQBTLI1XmoOa2v465sImeQGUzPg8=;
 h=Date:From:To:Cc:Subject:References:In-Reply-To;
 b=2eEIBuOQ+nArPj/wWTGKVqzOqzj7LZ7O7iPdL6ey0/BhlEQuNVK4tWpwumAK/chGy
 AuQIQEoseiG/E1czGavb0PtZe9fAPXJ/3OXuiq0ZzKs1cR/QBNCDjG4sl+1bFsZaGn
 R/ajuUI+q8oViNmHENVjgvOEBmFfBGrUiisPFwL4=
Date: Tue, 17 Sep 2019 00:52:58 +0200
From: "pelzflorian (Florian Pelz)" <pelzflorian@HIDDEN>
To: Julien Lepiller <julien@HIDDEN>
Subject: Re: [bug#37413] [PATCH 0/9] Channel news distribution mechanism
Message-ID: <20190916225258.yd4uzgcm4lyr5zgz@HIDDEN>
References: <20190915221021.4165-1-ludo@HIDDEN> <87sgow0w7w.fsf@HIDDEN>
 <20190916234941.1c450890@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <20190916234941.1c450890@HIDDEN>
User-Agent: NeoMutt/20180716
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 37413
Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, 37413 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Mon, Sep 16, 2019 at 11:49:50PM +0200, Julien Lepiller wrote:
> Le Mon, 16 Sep 2019 23:25:55 +0200,
> Ludovic Courtès <ludo@HIDDEN> a écrit :
> > I’m thinking we could have an alias with volunteer translators who
> > would provide text fragments by email to the developer who wrote the
> > news?  Does that sound reasonable?
> > 
> > Thanks,
> > Ludo’.
> 
> As long as the volume is low, I think it's reasonable, but it should be
> documented.

Yes, I want to provide such a service, but package names and
descriptions should be translated too.  I think best practice would be
if channel authors marked their news file along with the package names
and descriptions and submit those to the Translation Project instead.
I do not know if it is possible to tell xgettext (or maybe
intltool-extract) to mark an entire file for translation, maybe it is.
If not, we could provide tooling that formats a file’s contents as a
PO entry though.  The PO entry could then be prepended to the
extracted package name and description strings with the msgcat
program.  The resulting POT file should be submitted to the
Translation Project.

Regards,
Florian




Information forwarded to guix-patches@HIDDEN:
bug#37413; Package guix-patches. Full text available.

Message received at 37413 <at> debbugs.gnu.org:


Received: (at 37413) by debbugs.gnu.org; 16 Sep 2019 21:50:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 16 17:50:10 2019
Received: from localhost ([127.0.0.1]:51240 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1i9ysr-0006sb-Ve
	for submit <at> debbugs.gnu.org; Mon, 16 Sep 2019 17:50:10 -0400
Received: from lepiller.eu ([89.234.186.109]:37150)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <julien@HIDDEN>) id 1i9ysn-0006rk-UC
 for 37413 <at> debbugs.gnu.org; Mon, 16 Sep 2019 17:50:08 -0400
Received: from lepiller.eu (localhost [127.0.0.1])
 by lepiller.eu (OpenSMTPD) with ESMTP id 75d45ea0;
 Mon, 16 Sep 2019 21:50:01 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=lepiller.eu; h=date:from
 :to:cc:subject:message-id:in-reply-to:references:mime-version
 :content-type:content-transfer-encoding; s=dkim; bh=4xobRow7fw+2
 ow0jxpeCKb5GAjE=; b=FRSPchJYkRf/7sFHfHoHKP6KyVyZ+kddluGgOJIZLeQD
 6pHmEOCkizgDEzHnfIO16wr4dDebxjM/DJ/Gp9nVl2/z4JLz/a/AYummzjmuQQBZ
 Ml43539QKOmtZwZjs5d2TjztENcOBHA7M72A7Vg8D2Ww4a/PzL8pCjWzRrukc86E
 ppCL1OYGYpAUHQjzaUtzTRVDwIt3M8JNZ1yJR50GrdWzphe12+XpCQwZWiwAg7+w
 I4R+h6lOQboXgN4nNzEdeDCJA7JYraXXZAmwcX/IVc8PuV6WViquiJUw8vhnb42+
 haYklGqp0tRHAU4+PXdP2CO+3nyEcNtizklFfAT/uQ==
DomainKey-Signature: a=rsa-sha1; c=nofws; d=lepiller.eu; h=date:from:to
 :cc:subject:message-id:in-reply-to:references:mime-version
 :content-type:content-transfer-encoding; q=dns; s=dkim; b=ICNMj4
 CnrbIoKO7iFdOf4p3Zzos/XiA6jUxUKZX3DQXQ0ofh/G9rYSWWa+rHfcJMVUZHAE
 RuQE+CNYgpLLVoOo8jY9tIHOU92a5XOv4pYK2SWWjznOTeye/KklLKYjEqE2pz1B
 MOVrZS58CosiS6Z4/l2sNsQMMg7Z0r65T4URABKQS7evaPwSvEyjLpP+fJnNJ0QD
 uAARTse91vlnnGNcgnzOqeWlzbe014rrjbla683eNzRrWe1aBE927QNBfV63tKpc
 XsQ5bOyk8GA9ijgvTgljAImGZHqYt9JdNx3Fdu8+hmHtA4GjnitfjhGlNh7KzYpo
 Ynp7tlhoSPgFBQwg==
Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id 54beb298
 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); 
 Mon, 16 Sep 2019 21:50:01 +0000 (UTC)
Date: Mon, 16 Sep 2019 23:49:50 +0200
From: Julien Lepiller <julien@HIDDEN>
To: Ludovic =?UTF-8?B?Q291cnTDqHM=?= <ludo@HIDDEN>
Subject: Re: [bug#37413] [PATCH 0/9] Channel news distribution mechanism
Message-ID: <20190916234941.1c450890@HIDDEN>
In-Reply-To: <87sgow0w7w.fsf@HIDDEN>
References: <20190915221021.4165-1-ludo@HIDDEN>
	<87sgow0w7w.fsf@HIDDEN>
X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-unknown-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 37413
Cc: 37413 <at> debbugs.gnu.org,
 "\"pelzflorian \(Florian Pelz\)\"" <pelzflorian@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Le Mon, 16 Sep 2019 23:25:55 +0200,
Ludovic Court=C3=A8s <ludo@HIDDEN> a =C3=A9crit :

> Howdy,
>=20
> Ludovic Court=C3=A8s <ludo@HIDDEN> skribis:
>=20
> > This patch series adds a mechanism for channel authors to distribute
> > =E2=80=9Cnews entries=E2=80=9D alongside their channels.  The goal is t=
o provide a
> > way for channel authors (including authors of the 'guix channel!)
> > to inform their users about important changes.
> >
> > For example, you=E2=80=99d tell people about package upgrades that requ=
ire
> > manual intervention, about important new features, bug fixes, etc. =20
>=20
> [...]
>=20
> > Regarding i18n, the title and body of an entry can be provided in
> > several languages.  I wonder what workflow we should adopt;
> > obviously the TP wouldn=E2=80=99t be appropriate, and there=E2=80=99s n=
o gettext
> > involved. =20
>=20
> Julien, Florian: any thoughts on how we could organize to translate
> these news entries?  (See <https://issues.guix.gnu.org/issue/37413>.)
>=20
> I=E2=80=99m thinking we could have an alias with volunteer translators who
> would provide text fragments by email to the developer who wrote the
> news?  Does that sound reasonable?
>=20
> Thanks,
> Ludo=E2=80=99.

As long as the volume is low, I think it's reasonable, but it should be
documented.




Information forwarded to guix-patches@HIDDEN:
bug#37413; Package guix-patches. Full text available.

Message received at 37413 <at> debbugs.gnu.org:


Received: (at 37413) by debbugs.gnu.org; 16 Sep 2019 21:26:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 16 17:26:09 2019
Received: from localhost ([127.0.0.1]:51216 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1i9yVb-00068A-I0
	for submit <at> debbugs.gnu.org; Mon, 16 Sep 2019 17:26:07 -0400
Received: from eggs.gnu.org ([209.51.188.92]:53023)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1i9yVa-00067i-GQ
 for 37413 <at> debbugs.gnu.org; Mon, 16 Sep 2019 17:26:06 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:57311)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1i9yVT-0002Ck-Ix; Mon, 16 Sep 2019 17:25:59 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=60286 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1i9yVQ-0007G3-UY; Mon, 16 Sep 2019 17:25:58 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: 37413 <at> debbugs.gnu.org, Julien Lepiller <julien@HIDDEN>,
 "\"pelzflorian \(Florian Pelz\)\"" <pelzflorian@HIDDEN>
Subject: Re: [bug#37413] [PATCH 0/9] Channel news distribution mechanism
References: <20190915221021.4165-1-ludo@HIDDEN>
Date: Mon, 16 Sep 2019 23:25:55 +0200
In-Reply-To: <20190915221021.4165-1-ludo@HIDDEN> ("Ludovic
 \=\?utf-8\?Q\?Cour\?\= \=\?utf-8\?Q\?t\=C3\=A8s\=22's\?\= message
 of "Mon, 16 Sep 2019 00:10:21 +0200")
Message-ID: <87sgow0w7w.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 37413
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Howdy,

Ludovic Court=C3=A8s <ludo@HIDDEN> skribis:

> This patch series adds a mechanism for channel authors to distribute
> =E2=80=9Cnews entries=E2=80=9D alongside their channels.  The goal is to =
provide a
> way for channel authors (including authors of the 'guix channel!)
> to inform their users about important changes.
>
> For example, you=E2=80=99d tell people about package upgrades that require
> manual intervention, about important new features, bug fixes, etc.

[...]

> Regarding i18n, the title and body of an entry can be provided in
> several languages.  I wonder what workflow we should adopt;
> obviously the TP wouldn=E2=80=99t be appropriate, and there=E2=80=99s no =
gettext
> involved.

Julien, Florian: any thoughts on how we could organize to translate
these news entries?  (See <https://issues.guix.gnu.org/issue/37413>.)

I=E2=80=99m thinking we could have an alias with volunteer translators who
would provide text fragments by email to the developer who wrote the
news?  Does that sound reasonable?

Thanks,
Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#37413; Package guix-patches. Full text available.

Message received at 37413 <at> debbugs.gnu.org:


Received: (at 37413) by debbugs.gnu.org; 16 Sep 2019 17:17:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 16 13:17:07 2019
Received: from localhost ([127.0.0.1]:50975 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1i9ucc-0007lu-3Q
	for submit <at> debbugs.gnu.org; Mon, 16 Sep 2019 13:17:07 -0400
Received: from sender4-of-o53.zoho.com ([136.143.188.53]:21327)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rekado@HIDDEN>) id 1i9uca-0007ll-9S
 for 37413 <at> debbugs.gnu.org; Mon, 16 Sep 2019 13:17:04 -0400
ARC-Seal: i=1; a=rsa-sha256; t=1568654216; cv=none; d=zoho.com; s=zohoarc; 
 b=QX/s0LwCfQB6iA11AmnDRy50qazfpg7ve+acIm2O7muhVkYV+NVGx3ACyVKL0gr+0/DMxpQHzb3YrNT0JFYhz3phdbBj2ZjXs0CB+GPOySzQsNTjdajJS/SnWo0JA3/mJ46BvVW6X/Jpm43CCX68AumjhBLxut7EvZwIo0MhnRk=
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com;
 s=zohoarc; t=1568654216;
 h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To:ARC-Authentication-Results;
 bh=AozbmLX/qPh3hc8pI9CNrLWxACGgI/CoAP7yBu6Hhvg=; 
 b=PNGZQzb9f8IVqMwYtGtiAIAzJoJ6gCIRpEh7bkwce0VFkS6iWyh2rKhvx/WoyLNsP83OaYWpOt84b8Tv6Uub9TpMpd8p7PrEL1uIjbbk+N7jRKsac/g+IC8Po7RJ3bQmXHKpa3L72iFrgyfxzmMrvbxCo8Yw8Sm2Jv0bq/q5JEk=
ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass  header.i=elephly.net;
 spf=pass  smtp.mailfrom=rekado@HIDDEN;
 dmarc=pass header.from=<rekado@HIDDEN> header.from=<rekado@HIDDEN>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1568654216; 
 s=zoho; d=elephly.net; i=rekado@HIDDEN;
 h=References:From:To:Cc:Subject:In-reply-to:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding;
 l=1746; bh=AozbmLX/qPh3hc8pI9CNrLWxACGgI/CoAP7yBu6Hhvg=;
 b=ZMgqGUC0HFy4nvqosicOB/USquZhoL3MhMHWd9MBDXwRpN4g9bQ5zNldcYRKQZfG
 zhF2E+N1yrESBcKnwIQVvVTriCxrwp/CjDjPq4B4/bex74bIZmWtgm8AG9wqrdD6KgC
 0pUTKmWTbkdviA9at+wL7/QuZqYRoixFDuPF4Scc=
Received: from localhost (p54AD4E8B.dip0.t-ipconnect.de [84.173.78.139]) by
 mx.zohomail.com with SMTPS id 156865421393580.9138088524287;
 Mon, 16 Sep 2019 10:16:53 -0700 (PDT)
References: <20190915221021.4165-1-ludo@HIDDEN> <871rwgr3ib.fsf@HIDDEN>
 <87r24g8khp.fsf@HIDDEN> <87woe8pej6.fsf@HIDDEN>
 <87k1a86zvd.fsf@HIDDEN>
User-agent: mu4e 1.2.0; emacs 26.2
From: Ricardo Wurmus <rekado@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: [bug#37413] [PATCH 0/9] Channel news distribution mechanism
In-reply-to: <87k1a86zvd.fsf@HIDDEN>
X-URL: https://elephly.net
X-PGP-Key: https://elephly.net/rekado.pubkey
X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
Date: Mon, 16 Sep 2019 19:16:50 +0200
Message-ID: <87pnk0p3el.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-ZohoMailClient: External
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 37413
Cc: 37413 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


Ludovic Court=C3=A8s <ludo@HIDDEN> writes:

> Hi,
>
> Ricardo Wurmus <rekado@HIDDEN> skribis:
>
>>> Ricardo Wurmus <rekado@HIDDEN> skribis:
>>>
>>>> Ludovic Court=C3=A8s <ludo@HIDDEN> writes:
>>>>
>>>>> It=E2=80=99s a bit weird to refer to commits from within a file in th=
e repo
>>>>> because it almost forces you to push so that you know the commit ID
>>>>> that your news entry should refer to.  News entries become obsolete
>>>>> if you rebase, too.  I think it=E2=80=99s acceptable, though.
>>>>
>>>> Would tags be acceptable instead of commit IDs?  I think version tags
>>>> would be easier to deal with than commit IDs and it wouldn=E2=80=99t r=
equire
>>>> time travel as you can just make up a new version and refer to that in
>>>> the news file.
>>>
>>> So you would add a Git tag like =E2=80=9Cnews-xyz=E2=80=9D on the commi=
t of interest and
>>> then refer to it in the news entry?
>>
>> No, I actually meant for releases.  For a channel it seems to me that a
>> release would make sense whenever information must be displayed to the
>> users (presumably to announce breaking changes).
>
> The way I see it, we could use it in between release.  I=E2=80=99d have u=
sed it
> to announce lzip support (and then explain how users can migrate, which
> I think many haven=E2=80=99t done because they=E2=80=99re unaware), impro=
vements to
> =E2=80=98guix pack=E2=80=99, the addition of =E2=80=98guix deploy=E2=80=
=99, things like that.
>
> Does that make sense?

I see.  Well, I think there=E2=80=99s no harm in pushing the changes first =
and
then pushing a follow-up commit with the news entry referencing the
commit.

This all looks good to me.  Sure seems useful!

--
Ricardo





Information forwarded to guix-patches@HIDDEN:
bug#37413; Package guix-patches. Full text available.

Message received at 37413 <at> debbugs.gnu.org:


Received: (at 37413) by debbugs.gnu.org; 16 Sep 2019 15:10:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 16 11:10:40 2019
Received: from localhost ([127.0.0.1]:50814 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1i9seG-00024n-CU
	for submit <at> debbugs.gnu.org; Mon, 16 Sep 2019 11:10:40 -0400
Received: from eggs.gnu.org ([209.51.188.92]:49725)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1i9seE-00024a-8r
 for 37413 <at> debbugs.gnu.org; Mon, 16 Sep 2019 11:10:39 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:52088)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1i9se9-0002OW-5W; Mon, 16 Sep 2019 11:10:33 -0400
Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=49254 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1i9se7-0007ZK-RV; Mon, 16 Sep 2019 11:10:32 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Ricardo Wurmus <rekado@HIDDEN>
Subject: Re: [bug#37413] [PATCH 0/9] Channel news distribution mechanism
References: <20190915221021.4165-1-ludo@HIDDEN> <871rwgr3ib.fsf@HIDDEN>
 <87r24g8khp.fsf@HIDDEN> <87woe8pej6.fsf@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 30 Fructidor an 227 de la =?utf-8?Q?R=C3=A9volution?=
X-PGP-Key-ID: 0x090B11993D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-pc-linux-gnu
Date: Mon, 16 Sep 2019 17:10:30 +0200
In-Reply-To: <87woe8pej6.fsf@HIDDEN> (Ricardo Wurmus's message of "Mon,
 16 Sep 2019 15:16:29 +0200")
Message-ID: <87k1a86zvd.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 37413
Cc: 37413 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hi,

Ricardo Wurmus <rekado@HIDDEN> skribis:

>> Ricardo Wurmus <rekado@HIDDEN> skribis:
>>
>>> Ludovic Court=C3=A8s <ludo@HIDDEN> writes:
>>>
>>>> It=E2=80=99s a bit weird to refer to commits from within a file in the=
 repo
>>>> because it almost forces you to push so that you know the commit ID
>>>> that your news entry should refer to.  News entries become obsolete
>>>> if you rebase, too.  I think it=E2=80=99s acceptable, though.
>>>
>>> Would tags be acceptable instead of commit IDs?  I think version tags
>>> would be easier to deal with than commit IDs and it wouldn=E2=80=99t re=
quire
>>> time travel as you can just make up a new version and refer to that in
>>> the news file.
>>
>> So you would add a Git tag like =E2=80=9Cnews-xyz=E2=80=9D on the commit=
 of interest and
>> then refer to it in the news entry?
>
> No, I actually meant for releases.  For a channel it seems to me that a
> release would make sense whenever information must be displayed to the
> users (presumably to announce breaking changes).

The way I see it, we could use it in between release.  I=E2=80=99d have use=
d it
to announce lzip support (and then explain how users can migrate, which
I think many haven=E2=80=99t done because they=E2=80=99re unaware), improve=
ments to
=E2=80=98guix pack=E2=80=99, the addition of =E2=80=98guix deploy=E2=80=99,=
 things like that.

Does that make sense?

Authors of third-party channels may also want to use it anytime.

Thanks,
Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#37413; Package guix-patches. Full text available.

Message received at 37413 <at> debbugs.gnu.org:


Received: (at 37413) by debbugs.gnu.org; 16 Sep 2019 13:16:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 16 09:16:45 2019
Received: from localhost ([127.0.0.1]:49412 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1i9qs0-000349-Rp
	for submit <at> debbugs.gnu.org; Mon, 16 Sep 2019 09:16:45 -0400
Received: from sender4-of-o53.zoho.com ([136.143.188.53]:21302)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rekado@HIDDEN>) id 1i9qrx-000340-W2
 for 37413 <at> debbugs.gnu.org; Mon, 16 Sep 2019 09:16:42 -0400
ARC-Seal: i=1; a=rsa-sha256; t=1568639795; cv=none; d=zoho.com; s=zohoarc; 
 b=RXY/z8leXNzCHNeQHdRjCbOwES0aQkCVDDH3d0yQ5jZ/+D2zDebmXHbzKpWEcnpoDRpQeCZF2KVeOOFUT7UdUKWbi7OBzGWjsht871Wn/E/8m9zO+bqQSVPJnIy5MxjLOQ8H/qCPlBGSQIkxDKYMNRIHRuMjqt+W3nAc3Zd6Okk=
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com;
 s=zohoarc; t=1568639795;
 h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To:ARC-Authentication-Results;
 bh=Mm+mgbpEXyi7ftFD16H9ryvS8uR3sB5bSMoatfWiKtY=; 
 b=DvE1dvl22s8ZEMwW6JdEN5LOPVqj4Z6vuLVCIdfHUsZ0R9nHXyGSnCeVxbh6Ox1xcesiVglqWvIrHfpHDnynNE/vymASPsi3FOWC+MB/ivWYZvkQgRKqbad7prI7ScOLggj5ZIfF7gf1j7gUJfUg1Mc7mlE16KigKPmJt4CTfJk=
ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass  header.i=elephly.net;
 spf=pass  smtp.mailfrom=rekado@HIDDEN;
 dmarc=pass header.from=<rekado@HIDDEN> header.from=<rekado@HIDDEN>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1568639795; 
 s=zoho; d=elephly.net; i=rekado@HIDDEN;
 h=References:From:To:Cc:Subject:In-reply-to:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding;
 l=1015; bh=Mm+mgbpEXyi7ftFD16H9ryvS8uR3sB5bSMoatfWiKtY=;
 b=JqVDWzFyaRozEMIWwQIVL9leGtPeZKOEXjvXTX9oaGNWmDr6M32CVH0SzDU9Zpyz
 l66XT5INz21MDyeV5SguRxfbA95e1dCQkBN4U/83HH1YGa331ATqJ9BX4N7/f9iANin
 xUY2d6/xVGcXVdqjv7BQWqoH14dv6Dgh8R/SGC2g=
Received: from localhost (p54AD4E8B.dip0.t-ipconnect.de [84.173.78.139]) by
 mx.zohomail.com with SMTPS id 1568639793188456.1210044841466;
 Mon, 16 Sep 2019 06:16:33 -0700 (PDT)
References: <20190915221021.4165-1-ludo@HIDDEN> <871rwgr3ib.fsf@HIDDEN>
 <87r24g8khp.fsf@HIDDEN>
User-agent: mu4e 1.2.0; emacs 26.2
From: Ricardo Wurmus <rekado@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: [bug#37413] [PATCH 0/9] Channel news distribution mechanism
In-reply-to: <87r24g8khp.fsf@HIDDEN>
X-URL: https://elephly.net
X-PGP-Key: https://elephly.net/rekado.pubkey
X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
Date: Mon, 16 Sep 2019 15:16:29 +0200
Message-ID: <87woe8pej6.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-ZohoMailClient: External
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 37413
Cc: 37413 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


Hi Ludo,

> Ricardo Wurmus <rekado@HIDDEN> skribis:
>
>> Ludovic Court=C3=A8s <ludo@HIDDEN> writes:
>>
>>> It=E2=80=99s a bit weird to refer to commits from within a file in the =
repo
>>> because it almost forces you to push so that you know the commit ID
>>> that your news entry should refer to.  News entries become obsolete
>>> if you rebase, too.  I think it=E2=80=99s acceptable, though.
>>
>> Would tags be acceptable instead of commit IDs?  I think version tags
>> would be easier to deal with than commit IDs and it wouldn=E2=80=99t req=
uire
>> time travel as you can just make up a new version and refer to that in
>> the news file.
>
> So you would add a Git tag like =E2=80=9Cnews-xyz=E2=80=9D on the commit =
of interest and
> then refer to it in the news entry?

No, I actually meant for releases.  For a channel it seems to me that a
release would make sense whenever information must be displayed to the
users (presumably to announce breaking changes).

--
Ricardo





Information forwarded to guix-patches@HIDDEN:
bug#37413; Package guix-patches. Full text available.

Message received at 37413 <at> debbugs.gnu.org:


Received: (at 37413) by debbugs.gnu.org; 16 Sep 2019 12:59:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 16 08:59:56 2019
Received: from localhost ([127.0.0.1]:49390 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1i9qbj-0002dE-Vb
	for submit <at> debbugs.gnu.org; Mon, 16 Sep 2019 08:59:56 -0400
Received: from eggs.gnu.org ([209.51.188.92]:57044)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1i9qbi-0002cy-6a
 for 37413 <at> debbugs.gnu.org; Mon, 16 Sep 2019 08:59:55 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:50458)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1i9qbc-0007HD-Px; Mon, 16 Sep 2019 08:59:48 -0400
Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=48094 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1i9qbb-0005ET-U6; Mon, 16 Sep 2019 08:59:48 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Ricardo Wurmus <rekado@HIDDEN>
Subject: Re: [bug#37413] [PATCH 0/9] Channel news distribution mechanism
References: <20190915221021.4165-1-ludo@HIDDEN> <871rwgr3ib.fsf@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 30 Fructidor an 227 de la =?utf-8?Q?R=C3=A9volution?=
X-PGP-Key-ID: 0x090B11993D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-pc-linux-gnu
Date: Mon, 16 Sep 2019 14:59:46 +0200
In-Reply-To: <871rwgr3ib.fsf@HIDDEN> (Ricardo Wurmus's message of "Mon,
 16 Sep 2019 11:31:40 +0200")
Message-ID: <87r24g8khp.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 37413
Cc: 37413 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hello,

Ricardo Wurmus <rekado@HIDDEN> skribis:

> Ludovic Court=C3=A8s <ludo@HIDDEN> writes:
>
>> It=E2=80=99s a bit weird to refer to commits from within a file in the r=
epo
>> because it almost forces you to push so that you know the commit ID
>> that your news entry should refer to.  News entries become obsolete
>> if you rebase, too.  I think it=E2=80=99s acceptable, though.
>
> Would tags be acceptable instead of commit IDs?  I think version tags
> would be easier to deal with than commit IDs and it wouldn=E2=80=99t requ=
ire
> time travel as you can just make up a new version and refer to that in
> the news file.

So you would add a Git tag like =E2=80=9Cnews-xyz=E2=80=9D on the commit of=
 interest and
then refer to it in the news entry?

I guess that would work.  Compared to this patch set, we=E2=80=99d just nee=
d to
check whether the entry=E2=80=99s commit is a commit or a tag, and in the l=
atter
case resolve it.  How does that sound?

I tend to use tags sparsely, almost exclusively for releases, so I would
not naturally propose to use them for this purpose, but maybe it=E2=80=99s =
not a
problem to have many tags in the repo after all?

Thanks,
Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#37413; Package guix-patches. Full text available.

Message received at 37413 <at> debbugs.gnu.org:


Received: (at 37413) by debbugs.gnu.org; 16 Sep 2019 09:31:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 16 05:31:53 2019
Received: from localhost ([127.0.0.1]:49201 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1i9nMO-00086m-Ui
	for submit <at> debbugs.gnu.org; Mon, 16 Sep 2019 05:31:53 -0400
Received: from sender4-of-o53.zoho.com ([136.143.188.53]:21316)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rekado@HIDDEN>) id 1i9nMM-00086e-NA
 for 37413 <at> debbugs.gnu.org; Mon, 16 Sep 2019 05:31:51 -0400
ARC-Seal: i=1; a=rsa-sha256; t=1568626305; cv=none; d=zoho.com; s=zohoarc; 
 b=iGacjIlnx36wXBOTL1fXLYwgSbrmpZWJ2IuRyY4fKg8DQ96GI8X1E+w6ho477JUQIWjBO8J444LJ5qJUWF8+hpYkU87yZW1kJ9Hx2r9piUirxUaHZQUaVXDPOMkBybRA9qwcL/PBiIfZlwQ6wsUC/fjaIpTscF/VQHmIA6+bxq4=
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com;
 s=zohoarc; t=1568626305;
 h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To:ARC-Authentication-Results;
 bh=PAp3rcPUDBwr/rNFdo7FJnfIZrkLC4ECvIiDZlUCkS4=; 
 b=jviS/4qyfaJjxmsTtuPQibI977Y0mrsUcTIM+XUpq6elcAvee7aKyMLp/CJ+cF4tAbDORmnEBtWIxFrcBokkqUAKMbz4yZ3k9LS7GN4czAFRwCvycYM95ltsLQpnYktEPgaHy1EgjoPBXtlJ2Lghe5myRiE1xjMGynfY8RivCoc=
ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass  header.i=elephly.net;
 spf=pass  smtp.mailfrom=rekado@HIDDEN;
 dmarc=pass header.from=<rekado@HIDDEN> header.from=<rekado@HIDDEN>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1568626305; 
 s=zoho; d=elephly.net; i=rekado@HIDDEN;
 h=References:From:To:Cc:Subject:In-reply-to:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding;
 l=589; bh=PAp3rcPUDBwr/rNFdo7FJnfIZrkLC4ECvIiDZlUCkS4=;
 b=Q1byAej4FAoOb3V9sETOt6fB/62qOzfEVQZSN0YgxvHDWEEQlecQ8Uc7dPYmhkTl
 6YK4UqfaH8+69ctgRLsu1ss0n3e8LPavg7h7JlShtiMlO3CITOamrqi9Nn1uVwaNwkv
 pxarNSZiyYSGl/USMDFkZhLiTqpope6k+fAHkGCM=
Received: from localhost (p54AD4E8B.dip0.t-ipconnect.de [84.173.78.139]) by
 mx.zohomail.com with SMTPS id 1568626304123853.6302722752387;
 Mon, 16 Sep 2019 02:31:44 -0700 (PDT)
References: <20190915221021.4165-1-ludo@HIDDEN>
User-agent: mu4e 1.2.0; emacs 26.2
From: Ricardo Wurmus <rekado@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: [bug#37413] [PATCH 0/9] Channel news distribution mechanism
In-reply-to: <20190915221021.4165-1-ludo@HIDDEN>
X-URL: https://elephly.net
X-PGP-Key: https://elephly.net/rekado.pubkey
X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
Date: Mon, 16 Sep 2019 11:31:40 +0200
Message-ID: <871rwgr3ib.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-ZohoMailClient: External
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 37413
Cc: 37413 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


Ludovic Court=C3=A8s <ludo@HIDDEN> writes:

> It=E2=80=99s a bit weird to refer to commits from within a file in the re=
po
> because it almost forces you to push so that you know the commit ID
> that your news entry should refer to.  News entries become obsolete
> if you rebase, too.  I think it=E2=80=99s acceptable, though.

Would tags be acceptable instead of commit IDs?  I think version tags
would be easier to deal with than commit IDs and it wouldn=E2=80=99t require
time travel as you can just make up a new version and refer to that in
the news file.

--
Ricardo





Information forwarded to guix-patches@HIDDEN:
bug#37413; Package guix-patches. Full text available.

Message received at 37413 <at> debbugs.gnu.org:


Received: (at 37413) by debbugs.gnu.org; 15 Sep 2019 22:21:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 15 18:21:29 2019
Received: from localhost ([127.0.0.1]:48842 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1i9ctd-0007fT-GQ
	for submit <at> debbugs.gnu.org; Sun, 15 Sep 2019 18:21:29 -0400
Received: from eggs.gnu.org ([209.51.188.92]:49380)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1i9ctY-0007dm-HN
 for 37413 <at> debbugs.gnu.org; Sun, 15 Sep 2019 18:21:24 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:40774)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1i9ctT-0006y6-Eb; Sun, 15 Sep 2019 18:21:19 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=60368 helo=gnu.org)
 by fencepost.gnu.org with esmtpsa
 (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82)
 (envelope-from <ludo@HIDDEN>)
 id 1i9ctS-00007t-TP; Sun, 15 Sep 2019 18:21:19 -0400
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 37413 <at> debbugs.gnu.org
Subject: [PATCH 9/9] DRAFT etc: Add channel news file.
Date: Mon, 16 Sep 2019 00:21:06 +0200
Message-Id: <20190915222106.4463-9-ludo@HIDDEN>
X-Mailer: git-send-email 2.23.0
In-Reply-To: <20190915222106.4463-1-ludo@HIDDEN>
References: <20190915222106.4463-1-ludo@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 37413
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

DRAFT: Update commit ID before pushing.

* etc/news.scm: New file.
* Makefile.am (EXTRA_DIST): Add it.
---
 Makefile.am  |  1 +
 etc/news.scm | 13 +++++++++++++
 2 files changed, 14 insertions(+)
 create mode 100644 etc/news.scm

diff --git a/Makefile.am b/Makefile.am
index fe8aa3f52b..6fcd367d63 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -535,6 +535,7 @@ EXTRA_DIST +=						\
   .guix-channel						\
   scripts/guix.in					\
   etc/guix-install.sh					\
+  etc/news.scm						\
   build-aux/build-self.scm				\
   build-aux/compile-all.scm				\
   build-aux/hydra/evaluate.scm				\
diff --git a/etc/news.scm b/etc/news.scm
new file mode 100644
index 0000000000..a0a5e15766
--- /dev/null
+++ b/etc/news.scm
@@ -0,0 +1,13 @@
+;; GNU Guix news, for use by 'guix pull'.
+
+(channel-news
+ (version 0)
+ (entry (commit "ddbc4977068ac273127f98321956c807ae030cf1")
+        (title ("en" "New channel news mechanism")
+               ("fr" "Nouveau mécanisme d'information sur les canaux"))
+        (body
+         ("en" "You are reading this message through the new channel news
+mechanism, congratulations!  This mechanism allows channel authors to provide
+@dfn{news entries} that their users can view with @command{guix pull}.  Run
+@command{info \"(guix) Invoking guix pull\"} for more info.")
+         ("fr" "Vous lisez ce message à travers bla bla bla FIXME"))))
-- 
2.23.0





Information forwarded to guix-patches@HIDDEN:
bug#37413; Package guix-patches. Full text available.

Message received at 37413 <at> debbugs.gnu.org:


Received: (at 37413) by debbugs.gnu.org; 15 Sep 2019 22:21:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 15 18:21:29 2019
Received: from localhost ([127.0.0.1]:48840 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1i9ctd-0007fL-5h
	for submit <at> debbugs.gnu.org; Sun, 15 Sep 2019 18:21:29 -0400
Received: from eggs.gnu.org ([209.51.188.92]:49378)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1i9ctX-0007dj-K8
 for 37413 <at> debbugs.gnu.org; Sun, 15 Sep 2019 18:21:24 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:40773)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1i9ctS-0006xv-HW; Sun, 15 Sep 2019 18:21:18 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=60368 helo=gnu.org)
 by fencepost.gnu.org with esmtpsa
 (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82)
 (envelope-from <ludo@HIDDEN>)
 id 1i9ctS-00007t-2I; Sun, 15 Sep 2019 18:21:18 -0400
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 37413 <at> debbugs.gnu.org
Subject: [PATCH 8/9] Add '.guix-channel' file.
Date: Mon, 16 Sep 2019 00:21:05 +0200
Message-Id: <20190915222106.4463-8-ludo@HIDDEN>
X-Mailer: git-send-email 2.23.0
In-Reply-To: <20190915222106.4463-1-ludo@HIDDEN>
References: <20190915222106.4463-1-ludo@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 37413
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

* .guix-channel: New file.
* Makefile.am (EXTRA_DIST): Add it.
---
 .guix-channel | 5 +++++
 Makefile.am   | 1 +
 2 files changed, 6 insertions(+)
 create mode 100644 .guix-channel

diff --git a/.guix-channel b/.guix-channel
new file mode 100644
index 0000000000..3e618d79f8
--- /dev/null
+++ b/.guix-channel
@@ -0,0 +1,5 @@
+;; This is a Guix channel.
+
+(channel
+  (version 0)
+  (news-file "etc/news.scm"))
diff --git a/Makefile.am b/Makefile.am
index 8683622a3a..fe8aa3f52b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -532,6 +532,7 @@ EXTRA_DIST +=						\
   TODO							\
   CODE-OF-CONDUCT					\
   .dir-locals.el					\
+  .guix-channel						\
   scripts/guix.in					\
   etc/guix-install.sh					\
   build-aux/build-self.scm				\
-- 
2.23.0





Information forwarded to guix-patches@HIDDEN:
bug#37413; Package guix-patches. Full text available.

Message received at 37413 <at> debbugs.gnu.org:


Received: (at 37413) by debbugs.gnu.org; 15 Sep 2019 22:21:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 15 18:21:29 2019
Received: from localhost ([127.0.0.1]:48838 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1i9ctc-0007fI-Pd
	for submit <at> debbugs.gnu.org; Sun, 15 Sep 2019 18:21:29 -0400
Received: from eggs.gnu.org ([209.51.188.92]:49376)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1i9ctW-0007dX-PK
 for 37413 <at> debbugs.gnu.org; Sun, 15 Sep 2019 18:21:23 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:40772)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1i9ctR-0006xg-Mh; Sun, 15 Sep 2019 18:21:17 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=60368 helo=gnu.org)
 by fencepost.gnu.org with esmtpsa
 (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82)
 (envelope-from <ludo@HIDDEN>)
 id 1i9ctR-00007t-7A; Sun, 15 Sep 2019 18:21:17 -0400
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 37413 <at> debbugs.gnu.org
Subject: [PATCH 7/9] pull: '-l' displays channel news.
Date: Mon, 16 Sep 2019 00:21:04 +0200
Message-Id: <20190915222106.4463-7-ludo@HIDDEN>
X-Mailer: git-send-email 2.23.0
In-Reply-To: <20190915222106.4463-1-ludo@HIDDEN>
References: <20190915222106.4463-1-ludo@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 37413
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

* guix/scripts/pull.scm (display-channel-news): Make 'previous' a
parameter.
(process-query)[list-generations]: Call 'display-channel-news'.
---
 guix/scripts/pull.scm | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm
index 8edff1a502..91ffd0ab98 100644
--- a/guix/scripts/pull.scm
+++ b/guix/scripts/pull.scm
@@ -251,12 +251,12 @@ and NEW are <channel> records with a proper 'commit' field."
            (for-each (cut display-news-entry <> language port) entries)
            (newline port)))))))
 
-(define (display-channel-news profile)
-  "Display new about the channels of PROFILE "
-  (define previous
-    (and=> (relative-generation profile -1)
-           (cut generation-file-name profile <>)))
-
+(define* (display-channel-news profile
+                               #:optional
+                               (previous
+                                (and=> (relative-generation profile -1)
+                                       (cut generation-file-name profile <>))))
+  "Display news about the channels of PROFILE compared to PREVIOUS."
   (when previous
     (let ((old-channels (profile-channels previous))
           (new-channels (profile-channels profile)))
@@ -586,6 +586,8 @@ display long package lists that would fill the user's screen."
               ((first second rest ...)
                (display-profile-content-diff profile
                                              first second)
+               (display-channel-news (generation-file-name profile second)
+                                     (generation-file-name profile first))
                (loop (cons second rest)))
               ((_) #t)
               (()  #t))))))
-- 
2.23.0





Information forwarded to guix-patches@HIDDEN:
bug#37413; Package guix-patches. Full text available.

Message received at 37413 <at> debbugs.gnu.org:


Received: (at 37413) by debbugs.gnu.org; 15 Sep 2019 22:21:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 15 18:21:25 2019
Received: from localhost ([127.0.0.1]:48836 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1i9ctZ-0007f1-Ao
	for submit <at> debbugs.gnu.org; Sun, 15 Sep 2019 18:21:25 -0400
Received: from eggs.gnu.org ([209.51.188.92]:49374)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1i9ctV-0007dV-Um
 for 37413 <at> debbugs.gnu.org; Sun, 15 Sep 2019 18:21:22 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:40771)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1i9ctQ-0006xR-Ri; Sun, 15 Sep 2019 18:21:16 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=60368 helo=gnu.org)
 by fencepost.gnu.org with esmtpsa
 (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82)
 (envelope-from <ludo@HIDDEN>)
 id 1i9ctQ-00007t-C1; Sun, 15 Sep 2019 18:21:16 -0400
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 37413 <at> debbugs.gnu.org
Subject: [PATCH 6/9] pull: Display channel news.
Date: Mon, 16 Sep 2019 00:21:03 +0200
Message-Id: <20190915222106.4463-6-ludo@HIDDEN>
X-Mailer: git-send-email 2.23.0
In-Reply-To: <20190915222106.4463-1-ludo@HIDDEN>
References: <20190915222106.4463-1-ludo@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 37413
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

* guix/scripts/pull.scm (display-news-entry)
(display-channel-specific-news): New procedures.
(display-channel-news): Call it.
(display-new/upgraded-packages): Adjust hint message.
* doc/guix.texi (Invoking guix pull): Mention it.
---
 doc/guix.texi         | 11 +++++---
 guix/scripts/pull.scm | 61 ++++++++++++++++++++++++++++++++++++++++---
 2 files changed, 65 insertions(+), 7 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index c7fe9f3907..f6e5e919db 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -3709,13 +3709,16 @@ Read the list of channels from @var{file} instead of
 evaluates to a list of channel objects.  @xref{Channels}, for more
 information.
 
+@cindex channel news
 @item --news
 @itemx -N
-Display the list of packages added or upgraded since the previous generation.
+Display the list of packages added or upgraded since the previous
+generation, as well as, occasionally, news written by channel authors
+for their users (@pxref{Channels, Writing Channel News}).
 
-This is the same information as displayed upon @command{guix pull} completion,
-but without ellipses; it is also similar to the output of @command{guix pull
--l} for the last generation (see below).
+The package information is the same as displayed upon @command{guix
+pull} completion, but without ellipses; it is also similar to the output
+of @command{guix pull -l} for the last generation (see below).
 
 @item --list-generations[=@var{pattern}]
 @itemx -l [@var{pattern}]
diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm
index ca3b36f98c..8edff1a502 100644
--- a/guix/scripts/pull.scm
+++ b/guix/scripts/pull.scm
@@ -19,6 +19,7 @@
 
 (define-module (guix scripts pull)
   #:use-module (guix ui)
+  #:use-module (guix colors)
   #:use-module (guix utils)
   #:use-module ((guix status) #:select (with-status-verbosity))
   #:use-module (guix scripts)
@@ -208,6 +209,48 @@ purposes."
   ;; Assume that the URL matters less than the name.
   (eq? (channel-name channel1) (channel-name channel2)))
 
+(define (display-news-entry entry language port)
+  "Display ENTRY, a <channel-news-entry>, in LANGUAGE, a language code, to
+PORT."
+  (let ((title (channel-news-entry-title entry))
+        (body  (channel-news-entry-body entry)))
+    (format port "  ~a~%"
+            (highlight
+             (string-trim-right
+              (texi->plain-text (or (assoc-ref title language)
+                                    (assoc-ref title (%default-message-language))
+                                    "")))))
+    (format port (G_ "    commit ~a~%")
+            (channel-news-entry-commit entry))
+    (newline port)
+    (format port "    ~a~%"
+            (indented-string
+             (parameterize ((%text-width (- (%text-width) 4)))
+               (string-trim-right
+                (texi->plain-text (or (assoc-ref body language)
+                                      (assoc-ref body (%default-message-language))
+                                      ""))))
+             4))))
+
+(define* (display-channel-specific-news new old
+                                        #:key (port (current-output-port)))
+  "Display channel news applicable the commits between OLD and NEW, where OLD
+and NEW are <channel> records with a proper 'commit' field."
+  (let ((channel new)
+        (old     (channel-commit old))
+        (new     (channel-commit new)))
+    (when (and old new)
+      (let ((language (current-message-language)))
+        (match (channel-news-for-commit channel new old)
+          (()                                     ;no news is good news
+           #t)
+          ((entries ...)
+           (newline port)
+           (format port (G_ "News for channel '~a'~%")
+                   (channel-name channel))
+           (for-each (cut display-news-entry <> language port) entries)
+           (newline port)))))))
+
 (define (display-channel-news profile)
   "Display new about the channels of PROFILE "
   (define previous
@@ -238,7 +281,20 @@ purposes."
                           (N_ "  ~*One channel removed:~%"
                               "  ~a channels removed:~%" count)
                           count)
-                  (for-each display-channel removed)))))))))
+                  (for-each display-channel removed))))
+
+             ;; Display channel-specific news for those channels that were
+             ;; here before and are still around afterwards.
+             (for-each (match-lambda
+                         ((new old)
+                          (display-channel-specific-news new old)))
+                       (filter-map (lambda (new)
+                                     (define old
+                                       (find (cut channel=? new <>)
+                                             old-channels))
+
+                                     (and old (list new old)))
+                                   new-channels)))))))
 
 (define (display-news profile)
   ;; Display profile news, with the understanding that this process represents
@@ -506,8 +562,7 @@ display long package lists that would fill the user's screen."
     (when (and concise?
                (or (> new-count concise/max-item-count)
                    (> upgraded-count concise/max-item-count)))
-      (display-hint (G_ "Run @command{guix pull --news} to view the complete
-list of package changes.")))))
+      (display-hint (G_ "Run @command{guix pull --news} to read all the news.")))))
 
 (define (display-profile-content-diff profile gen1 gen2)
   "Display the changes in PROFILE GEN2 compared to generation GEN1."
-- 
2.23.0





Information forwarded to guix-patches@HIDDEN:
bug#37413; Package guix-patches. Full text available.

Message received at 37413 <at> debbugs.gnu.org:


Received: (at 37413) by debbugs.gnu.org; 15 Sep 2019 22:21:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 15 18:21:25 2019
Received: from localhost ([127.0.0.1]:48833 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1i9ctY-0007eo-Et
	for submit <at> debbugs.gnu.org; Sun, 15 Sep 2019 18:21:25 -0400
Received: from eggs.gnu.org ([209.51.188.92]:49369)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1i9ctU-0007dR-8d
 for 37413 <at> debbugs.gnu.org; Sun, 15 Sep 2019 18:21:21 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:40769)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1i9ctP-0006ws-51; Sun, 15 Sep 2019 18:21:15 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=60368 helo=gnu.org)
 by fencepost.gnu.org with esmtpsa
 (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82)
 (envelope-from <ludo@HIDDEN>)
 id 1i9ctO-00007t-IN; Sun, 15 Sep 2019 18:21:14 -0400
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 37413 <at> debbugs.gnu.org
Subject: [PATCH 4/9] channels: Add support for a news file.
Date: Mon, 16 Sep 2019 00:21:01 +0200
Message-Id: <20190915222106.4463-4-ludo@HIDDEN>
X-Mailer: git-send-email 2.23.0
In-Reply-To: <20190915222106.4463-1-ludo@HIDDEN>
References: <20190915222106.4463-1-ludo@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 37413
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

* guix/channels.scm (<channel-metadata>)[news-file]: New field.
(read-channel-metadata): Set the 'news-file' field.
(read-channel-metadata-from-source): Likewise.
(<channel-news>, <channel-news-entry>): New record types.
(sexp->channel-news-entry, read-channel-news)
(channel-news-for-commit): New procedures.
* guix/tests/git.scm (populate-git-repository): For 'add', allow
CONTENTS to be a procedure.
* tests/channels.scm ("channel-news, no news")
("channel-news, one entry"): New tests.
* doc/guix.texi (Channels): Document it.
---
 doc/guix.texi      |  51 +++++++++++++++++++
 guix/channels.scm  | 121 ++++++++++++++++++++++++++++++++++++++++++---
 guix/tests/git.scm |   7 ++-
 tests/channels.scm |  96 +++++++++++++++++++++++++++++++++++
 4 files changed, 266 insertions(+), 9 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 39d4b865f6..c7fe9f3907 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -3946,6 +3946,57 @@ add a meta-data file @file{.guix-channel} that contains:
   (directory "guix"))
 @end lisp
 
+@cindex news, for channels
+@subsection Writing Channel News
+
+Channel authors may occasionally want to communicate to their users
+information about important changes in the channel.  You'd send them all
+an email, but that's not convenient.
+
+Instead, channels can provide a @dfn{news file}; when the channel users
+run @command{guix pull}, that news file is automatically read and
+@command{guix pull --news} can display the announcements that correspond
+to the new commits that have been pulled, if any.
+
+To do that, channel authors must first declare the name of the news file
+in their @file{.guix-channel} file:
+
+@lisp
+(channel
+  (version 0)
+  (news-file "etc/news.txt"))
+@end lisp
+
+The news file itself, @file{etc/news.txt} in this example, must look
+something like this:
+
+@lisp
+(channel-news
+  (version 0)
+  (entry (commit "d894ab8e9bfabcefa6c49d9ba2e834dd5a73a300")
+         (title ("en" "Fixed terrible bug")
+                ("fr" "Oh la la"))
+         (body ("en" "@@emph@{Good news@}!  It's fixed!")))
+  (entry (commit "bdcabe815cd28144a2d2b4bc3c5057b051fa9906")
+         (title ("en" "Added a great package")
+                ("ca" "Què vol dir guix?"))
+         (body ("en" "Don't miss the @@code@{hello@} package!"))))
+@end lisp
+
+The file consists of a list of @dfn{news entries}.  Each entry is
+associated with a commit: it describes changes made in this commit,
+possibly in preceding commits as well.  Users see entries only the first
+time they obtain the commit the entry refers to.
+
+The @code{title} field should be a one-line summary while @code{body}
+can be arbitrary long, and both can contain Texinfo markup
+(@pxref{Overview,,, texinfo, GNU Texinfo}).  Both the title and body are
+a list of language tag/message tuples, which allows @command{guix pull}
+to display news in the language that corresponds to the user's locale.
+
+So yes, you could use your channel as a blog.  But beware, this is
+@emph{not quite} what your users might expect.
+
 @subsection Replicating Guix
 
 @cindex pinning, channels
diff --git a/guix/channels.scm b/guix/channels.scm
index ebb2cacbc7..63e3e2f49e 100644
--- a/guix/channels.scm
+++ b/guix/channels.scm
@@ -19,6 +19,7 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (guix channels)
+  #:use-module (git)
   #:use-module (guix git)
   #:use-module (guix records)
   #:use-module (guix gexp)
@@ -29,6 +30,7 @@
   #:use-module (guix derivations)
   #:use-module (guix combinators)
   #:use-module (guix diagnostics)
+  #:use-module (guix sets)
   #:use-module (guix store)
   #:use-module (guix i18n)
   #:use-module ((guix utils)
@@ -67,7 +69,14 @@
             %channel-profile-hooks
             channel-instances->derivation
 
-            profile-channels))
+            profile-channels
+
+            channel-news-entry?
+            channel-news-entry-commit
+            channel-news-entry-title
+            channel-news-entry-body
+
+            channel-news-for-commit))
 
 ;;; Commentary:
 ;;;
@@ -110,10 +119,11 @@
   (checkout  channel-instance-checkout))
 
 (define-record-type <channel-metadata>
-  (channel-metadata directory dependencies)
+  (channel-metadata directory dependencies news-file)
   channel-metadata?
   (directory     channel-metadata-directory)      ;string with leading slash
-  (dependencies  channel-metadata-dependencies))  ;list of <channel>
+  (dependencies  channel-metadata-dependencies)   ;list of <channel>
+  (news-file     channel-metadata-news-file))     ;string | #f
 
 (define (channel-reference channel)
   "Return the \"reference\" for CHANNEL, an sexp suitable for
@@ -129,12 +139,13 @@ if valid metadata could not be read from PORT."
   (match (read port)
     (('channel ('version 0) properties ...)
      (let ((directory    (and=> (assoc-ref properties 'directory) first))
-           (dependencies (or (assoc-ref properties 'dependencies) '())))
+           (dependencies (or (assoc-ref properties 'dependencies) '()))
+           (news-file    (and=> (assoc-ref properties 'news-file) first)))
        (channel-metadata
-        (cond ((not directory) "/")
+        (cond ((not directory) "/")               ;directory
               ((string-prefix? "/" directory) directory)
               (else (string-append "/" directory)))
-        (map (lambda (item)
+        (map (lambda (item)                       ;dependencies
                (let ((get (lambda* (key #:optional default)
                             (or (and=> (assoc-ref item key) first) default))))
                  (and-let* ((name (get 'name))
@@ -145,7 +156,8 @@ if valid metadata could not be read from PORT."
                     (branch branch)
                     (url url)
                     (commit (get 'commit))))))
-             dependencies))))
+             dependencies)
+        news-file)))                              ;news-file
     ((and ('channel ('version version) _ ...) sexp)
      (raise (condition
              (&message (message "unsupported '.guix-channel' version"))
@@ -169,7 +181,7 @@ doesn't exist."
         read-channel-metadata))
     (lambda args
       (if (= ENOENT (system-error-errno args))
-          (channel-metadata "/" '())
+          (channel-metadata "/" '() #f)
           (apply throw args)))))
 
 (define (channel-instance-metadata instance)
@@ -560,3 +572,96 @@ PROFILE is not a profile created by 'guix pull', return the empty list."
               ;; Show most recently installed packages last.
               (reverse
                (manifest-entries (profile-manifest profile)))))
+
+
+;;;
+;;; News.
+;;;
+
+;; Channel news.
+(define-record-type <channel-news>
+  (channel-news entries)
+  channel-news?
+  (entries channel-news-entries))                 ;list of <channel-news-entry>
+
+;; News entry, associated with a specific commit of the channel.
+(define-record-type <channel-news-entry>
+  (channel-news-entry commit title body)
+  channel-news-entry?
+  (commit  channel-news-entry-commit)             ;hex string
+  (title   channel-news-entry-title)              ;list of language tag/string pairs
+  (body    channel-news-entry-body))              ;list of language tag/string pairs
+
+(define (sexp->channel-news-entry entry)
+  "Return the <channel-news-entry> record corresponding to ENTRY, an sexp."
+  (match entry
+    (('entry ('commit commit)
+             ('title (title-tags titles) ...)
+             ('body (body-tags bodies) ...)
+             _ ...)
+     (channel-news-entry commit
+                         (map cons title-tags titles)
+                         (map cons body-tags bodies)))
+    (_
+     (raise (condition
+             (&message (message "invalid channel news entry"))
+             (&error-location
+              (location (source-properties->location
+                         (source-properties entry)))))))))
+
+(define (read-channel-news port)
+  "Read a channel news feed from PORT and return it as a <channel-news>
+record."
+  (match (false-if-exception (read port))
+    (('channel-news ('version 0) entries ...)
+     (channel-news (map sexp->channel-news-entry entries)))
+    ((and ('channel-news ('version version) _ ...) sexp)
+     (raise (condition
+             (&message (message "unsupported channel news file"))
+             (&error-location
+              (location (source-properties->location
+                         (source-properties sexp)))))))
+    (#f
+     (raise (condition
+             (&message (message "syntactically invalid channel news file")))))
+    (sexp
+     (raise (condition
+             (&message (message "invalid channel news file"))
+             (&error-location
+              (location (source-properties->location
+                         (source-properties sexp)))))))))
+
+(define* (channel-news-for-commit channel new #:optional old)
+  "Return a list of <channel-news-entry> for CHANNEL between commits OLD and
+NEW.  When OLD is omitted or is #f, return all the news entries of CHANNEL."
+  (catch 'git-error
+    (lambda ()
+      (let* ((checkout  (update-cached-checkout (channel-url channel)
+                                                #:ref `(commit . ,new)))
+             (metadata  (read-channel-metadata-from-source checkout))
+             (news-file (channel-metadata-news-file metadata))
+             (news-file (and news-file
+                             (string-append checkout "/" news-file))))
+        (if (and news-file (file-exists? news-file))
+            (let ((entries (channel-news-entries (call-with-input-file news-file
+                                                   read-channel-news))))
+              (if old
+                  (with-repository checkout repository
+                    (let* ((new     (commit-lookup repository (string->oid new)))
+                           (old     (commit-lookup repository (string->oid old)))
+                           (commits (list->set
+                                     (map (compose oid->string commit-id)
+                                          (commit-difference new old)))))
+                      (filter (lambda (entry)
+                                (set-contains? commits
+                                               (channel-news-entry-commit entry)))
+                              entries)))
+                  entries))
+            '())))
+    (lambda (key error . rest)
+      ;; If commit NEW or commit OLD cannot be found, then something must be
+      ;; wrong (for example, the history of CHANNEL was rewritten and these
+      ;; commits no longer exist upstream), so quietly return the empty list.
+      (if (= GIT_ENOTFOUND (git-error-code error))
+          '()
+          (apply throw key error rest)))))
diff --git a/guix/tests/git.scm b/guix/tests/git.scm
index 52abe77c83..9d5b1ae321 100644
--- a/guix/tests/git.scm
+++ b/guix/tests/git.scm
@@ -18,6 +18,7 @@
 
 (define-module (guix tests git)
   #:use-module (git)
+  #:use-module ((guix git) #:select (with-repository))
   #:use-module (guix utils)
   #:use-module (guix build utils)
   #:use-module (ice-9 match)
@@ -55,7 +56,11 @@ Return DIRECTORY on success."
          (mkdir-p (dirname file))
          (call-with-output-file file
            (lambda (port)
-             (display contents port)))
+             (display (if (string? contents)
+                          contents
+                          (with-repository directory repository
+                            (contents repository)))
+                      port)))
          (git "add" file)
          (loop rest)))
       ((('commit text) rest ...)
diff --git a/tests/channels.scm b/tests/channels.scm
index e83b5437d3..686bd3acee 100644
--- a/tests/channels.scm
+++ b/tests/channels.scm
@@ -28,6 +28,10 @@
   #:use-module (guix gexp)
   #:use-module ((guix utils)
                 #:select (error-location? error-location location-line))
+  #:use-module ((guix build utils) #:select (which))
+  #:use-module (git)
+  #:use-module (guix git)
+  #:use-module (guix tests git)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-26)
   #:use-module (srfi srfi-34)
@@ -246,4 +250,96 @@
                (depends? drv3
                          (list drv2 drv0) (list))))))))
 
+(unless (which (git-command)) (test-skip 1))
+(test-equal "channel-news, no news"
+  '()
+  (with-temporary-git-repository directory
+      '((add "a.txt" "A")
+        (commit "the commit"))
+    (with-repository directory repository
+      (let ((channel (channel (url (string-append "file://" directory))
+                              (name 'foo)))
+            (latest  (reference-name->oid repository "HEAD")))
+        (channel-news-for-commit channel (oid->string latest))))))
+
+(unless (which (git-command)) (test-skip 1))
+(test-assert "channel-news, one entry"
+  (with-temporary-git-repository directory
+      `((add ".guix-channel"
+             ,(object->string
+               '(channel (version 0)
+                         (news-file "news.scm"))))
+        (commit "first commit")
+        (add "src/a.txt" "A")
+        (commit "second commit")
+        (add "news.scm"
+             ,(lambda (repository)
+                (let ((previous
+                       (reference-name->oid repository "HEAD")))
+                  (object->string
+                   `(channel-news
+                     (version 0)
+                     (entry (commit ,(oid->string previous))
+                            (title ("en" "New file!"))
+                            (body ("en" "Yeah, a.txt."))))))))
+        (commit "third commit")
+        (add "src/b.txt" "B")
+        (commit "fourth commit")
+        (add "news.scm"
+             ,(lambda (repository)
+                (let ((second
+                       (commit-id
+                        (find-commit repository "second commit")))
+                      (previous
+                       (reference-name->oid repository "HEAD")))
+                  (object->string
+                   `(channel-news
+                     (version 0)
+                     (entry (commit ,(oid->string previous))
+                            (title ("en" "Another file!"))
+                            (body ("en" "Yeah, b.txt.")))
+                     (entry (commit ,(oid->string second))
+                            (title ("en" "Old news."))
+                            (body ("en" "For a.txt"))))))))
+        (commit "fifth commit"))
+    (with-repository directory repository
+      (define (find-commit* message)
+        (oid->string (commit-id (find-commit repository message))))
+
+      (let ((channel (channel (url (string-append "file://" directory))
+                              (name 'foo)))
+            (commit1 (find-commit* "first commit"))
+            (commit2 (find-commit* "second commit"))
+            (commit3 (find-commit* "third commit"))
+            (commit4 (find-commit* "fourth commit"))
+            (commit5 (find-commit* "fifth commit")))
+        ;; First try fetching all the news up to a given commit.
+        (and (null? (channel-news-for-commit channel commit2))
+             (lset= string=?
+                    (map channel-news-entry-commit
+                         (channel-news-for-commit channel commit5))
+                    (list commit2 commit4))
+             (lset= equal?
+                    (map channel-news-entry-title
+                         (channel-news-for-commit channel commit5))
+                    '((("en" . "Another file!")) (("en" . "Old news."))))
+             (lset= string=?
+                    (map channel-news-entry-commit
+                         (channel-news-for-commit channel commit3))
+                    (list commit2))
+
+             ;; Now fetch news entries that apply to a commit range.
+             (lset= string=?
+                    (map channel-news-entry-commit
+                         (channel-news-for-commit channel commit3 commit1))
+                    (list commit2))
+             (lset= string=?
+                    (map channel-news-entry-commit
+                         (channel-news-for-commit channel commit5 commit3))
+                    (list commit4))
+             (lset= string=?
+                    (map channel-news-entry-commit
+                         (channel-news-for-commit channel commit5 commit1))
+                    (list commit4 commit2)))))))
+
 (test-end "channels")
-- 
2.23.0





Information forwarded to guix-patches@HIDDEN:
bug#37413; Package guix-patches. Full text available.

Message received at 37413 <at> debbugs.gnu.org:


Received: (at 37413) by debbugs.gnu.org; 15 Sep 2019 22:21:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 15 18:21:24 2019
Received: from localhost ([127.0.0.1]:48831 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1i9ctX-0007eb-VW
	for submit <at> debbugs.gnu.org; Sun, 15 Sep 2019 18:21:24 -0400
Received: from eggs.gnu.org ([209.51.188.92]:49371)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1i9ctV-0007dT-2p
 for 37413 <at> debbugs.gnu.org; Sun, 15 Sep 2019 18:21:21 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:40770)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1i9ctQ-0006xD-04; Sun, 15 Sep 2019 18:21:16 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=60368 helo=gnu.org)
 by fencepost.gnu.org with esmtpsa
 (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82)
 (envelope-from <ludo@HIDDEN>)
 id 1i9ctP-00007t-Go; Sun, 15 Sep 2019 18:21:15 -0400
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 37413 <at> debbugs.gnu.org
Subject: [PATCH 5/9] ui: Add 'current-message-language'.
Date: Mon, 16 Sep 2019 00:21:02 +0200
Message-Id: <20190915222106.4463-5-ludo@HIDDEN>
X-Mailer: git-send-email 2.23.0
In-Reply-To: <20190915222106.4463-1-ludo@HIDDEN>
References: <20190915222106.4463-1-ludo@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 37413
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

* guix/ui.scm (%default-message-language): New variable.
(current-message-language): New procedure.
---
 guix/ui.scm | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/guix/ui.scm b/guix/ui.scm
index 7920335928..42043b546c 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -120,6 +120,10 @@
             roll-back*
             switch-to-generation*
             delete-generation*
+
+            %default-message-language
+            current-message-language
+
             run-guix-command
             run-guix
             guix-main))
@@ -427,6 +431,20 @@ exiting.  ARGS is the list of arguments received by the 'throw' handler."
 report them in a user-friendly way."
   (call-with-unbound-variable-handling (lambda () exp ...)))
 
+(define %default-message-language
+  ;; Default language to use for messages.
+  (make-parameter "en"))
+
+(define (current-message-language)
+  "Return the language used for messages according to the current locale.
+Return %DEFAULT-MESSAGE-LANGUAGE if that information could not be obtained.  The
+result is an ISO-639-2 language code such as \"ar\", without the territory
+part."
+  (let ((locale (setlocale LC_MESSAGES)))
+    (match (string-index locale #\_)
+      (#f    locale)
+      (index (string-take locale index)))))
+
 (define (install-locale)
   "Install the current locale settings."
   (catch 'system-error
-- 
2.23.0





Information forwarded to guix-patches@HIDDEN:
bug#37413; Package guix-patches. Full text available.

Message received at 37413 <at> debbugs.gnu.org:


Received: (at 37413) by debbugs.gnu.org; 15 Sep 2019 22:21:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 15 18:21:24 2019
Received: from localhost ([127.0.0.1]:48828 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1i9ctX-0007eY-8O
	for submit <at> debbugs.gnu.org; Sun, 15 Sep 2019 18:21:23 -0400
Received: from eggs.gnu.org ([209.51.188.92]:49367)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1i9ctT-0007dN-9w
 for 37413 <at> debbugs.gnu.org; Sun, 15 Sep 2019 18:21:20 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:40768)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1i9ctO-0006wi-6Y; Sun, 15 Sep 2019 18:21:14 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=60368 helo=gnu.org)
 by fencepost.gnu.org with esmtpsa
 (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82)
 (envelope-from <ludo@HIDDEN>)
 id 1i9ctN-00007t-H8; Sun, 15 Sep 2019 18:21:14 -0400
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 37413 <at> debbugs.gnu.org
Subject: [PATCH 3/9] git: Add 'commit-difference'.
Date: Mon, 16 Sep 2019 00:21:00 +0200
Message-Id: <20190915222106.4463-3-ludo@HIDDEN>
X-Mailer: git-send-email 2.23.0
In-Reply-To: <20190915222106.4463-1-ludo@HIDDEN>
References: <20190915222106.4463-1-ludo@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 37413
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

* guix/git.scm (commit-closure, commit-difference): New procedures.
* guix/tests/git.scm, tests/git.scm: New files.
* Makefile.am (dist_noinst_DATA): Add guix/tests/git.scm.
(SCM_TESTS): Add tests/git.scm.
---
 .dir-locals.el     |  1 +
 Makefile.am        |  6 ++-
 guix/git.scm       | 40 +++++++++++++++++++
 guix/tests/git.scm | 97 +++++++++++++++++++++++++++++++++++++++++++++
 tests/git.scm      | 99 ++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 242 insertions(+), 1 deletion(-)
 create mode 100644 guix/tests/git.scm
 create mode 100644 tests/git.scm

diff --git a/.dir-locals.el b/.dir-locals.el
index 228685a69f..22aac2c402 100644
--- a/.dir-locals.el
+++ b/.dir-locals.el
@@ -90,6 +90,7 @@
    (eval . (put 'eventually 'scheme-indent-function 1))
 
    (eval . (put 'call-with-progress-reporter 'scheme-indent-function 1))
+   (eval . (put 'with-temporary-git-repository 'scheme-indent-function 2))
 
    ;; This notably allows '(' in Paredit to not insert a space when the
    ;; preceding symbol is one of these.
diff --git a/Makefile.am b/Makefile.am
index 7e3b5c1070..8683622a3a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -306,7 +306,10 @@ STORE_MODULES =					\
 MODULES += $(STORE_MODULES)
 
 # Internal modules with test suite support.
-dist_noinst_DATA = guix/tests.scm guix/tests/http.scm
+dist_noinst_DATA =				\
+  guix/tests.scm				\
+  guix/tests/http.scm				\
+  guix/tests/git.scm
 
 # Auxiliary files for packages.
 AUX_FILES =						\
@@ -390,6 +393,7 @@ SCM_TESTS =					\
   tests/file-systems.scm			\
   tests/gem.scm				\
   tests/gexp.scm				\
+  tests/git.scm					\
   tests/glob.scm				\
   tests/gnu-maintenance.scm			\
   tests/grafts.scm				\
diff --git a/guix/git.scm b/guix/git.scm
index 92a7353b5a..d7dddde3a7 100644
--- a/guix/git.scm
+++ b/guix/git.scm
@@ -28,6 +28,7 @@
   #:use-module (guix utils)
   #:use-module (guix records)
   #:use-module (guix gexp)
+  #:use-module (guix sets)
   #:use-module (rnrs bytevectors)
   #:use-module (ice-9 match)
   #:use-module (srfi srfi-1)
@@ -37,8 +38,10 @@
   #:export (%repository-cache-directory
             honor-system-x509-certificates!
 
+            with-repository
             update-cached-checkout
             latest-repository-commit
+            commit-difference
 
             git-checkout
             git-checkout?
@@ -339,6 +342,43 @@ Log progress and checkout info to LOG-PORT."
 
 (set-exception-printer! 'git-error print-git-error)
 
+
+;;;
+;;; Commit difference.
+;;;
+
+(define (commit-closure commit)
+  "Return the closure of COMMIT as a set."
+  (let loop ((commits (list commit))
+             (visited (setq)))
+    (match commits
+      (()
+       visited)
+      ((head . tail)
+       (if (set-contains? visited head)
+           (loop tail visited)
+           (loop (append (commit-parents head) tail)
+                 (set-insert head visited)))))))
+
+(define (commit-difference new old)
+  "Return the list of commits between NEW and OLD, where OLD is assumed to be
+an ancestor of NEW.
+
+Essentially, this computes the set difference between the closure of NEW and
+that of OLD."
+  (let loop ((commits (list new))
+             (result '())
+             (visited (commit-closure old)))
+    (match commits
+      (()
+       (reverse result))
+      ((head . tail)
+       (if (set-contains? visited head)
+           (loop tail result visited)
+           (loop (append (commit-parents head) tail)
+                 (cons head result)
+                 (set-insert head visited)))))))
+
 
 ;;;
 ;;; Checkouts.
diff --git a/guix/tests/git.scm b/guix/tests/git.scm
new file mode 100644
index 0000000000..52abe77c83
--- /dev/null
+++ b/guix/tests/git.scm
@@ -0,0 +1,97 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2019 Ludovic Courtès <ludo@HIDDEN>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (guix tests git)
+  #:use-module (git)
+  #:use-module (guix utils)
+  #:use-module (guix build utils)
+  #:use-module (ice-9 match)
+  #:use-module (ice-9 control)
+  #:export (git-command
+            with-temporary-git-repository
+            find-commit))
+
+(define git-command
+  (make-parameter "git"))
+
+(define (populate-git-repository directory directives)
+  "Initialize a new Git checkout and repository in DIRECTORY and apply
+DIRECTIVES.  Each element of DIRECTIVES is an sexp like:
+
+  (add \"foo.txt\" \"hi!\")
+
+Return DIRECTORY on success."
+
+  ;; Note: As of version 0.2.0, Guile-Git lacks the necessary bindings to do
+  ;; all this, so resort to the "git" command.
+  (define (git command . args)
+    (apply invoke (git-command) "-C" directory
+           command args))
+
+  (mkdir-p directory)
+  (git "init")
+
+  (let loop ((directives directives))
+    (match directives
+      (()
+       directory)
+      ((('add file contents) rest ...)
+       (let ((file (string-append directory "/" file)))
+         (mkdir-p (dirname file))
+         (call-with-output-file file
+           (lambda (port)
+             (display contents port)))
+         (git "add" file)
+         (loop rest)))
+      ((('commit text) rest ...)
+       (git "commit" "-m" text)
+       (loop rest))
+      ((('branch name) rest ...)
+       (git "branch" name)
+       (loop rest))
+      ((('checkout branch) rest ...)
+       (git "checkout" branch)
+       (loop rest))
+      ((('merge branch message) rest ...)
+       (git "merge" branch "-m" message)
+       (loop rest)))))
+
+(define (call-with-temporary-git-repository directives proc)
+  (call-with-temporary-directory
+   (lambda (directory)
+     (populate-git-repository directory directives)
+     (proc directory))))
+
+(define-syntax-rule (with-temporary-git-repository directory
+                                                   directives exp ...)
+  "Evaluate EXP in a context where DIRECTORY contains a checkout populated as
+per DIRECTIVES."
+  (call-with-temporary-git-repository directives
+                                      (lambda (directory)
+                                        exp ...)))
+
+(define (find-commit repository message)
+  "Return the commit in REPOSITORY whose message includes MESSAGE, a string."
+  (let/ec return
+    (fold-commits (lambda (commit _)
+                    (and (string-contains (commit-message commit)
+                                          message)
+                         (return commit)))
+                  #f
+                  repository)
+    (error "commit not found" message)))
diff --git a/tests/git.scm b/tests/git.scm
new file mode 100644
index 0000000000..8ba10ece51
--- /dev/null
+++ b/tests/git.scm
@@ -0,0 +1,99 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2019 Ludovic Courtès <ludo@HIDDEN>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (test-git)
+  #:use-module (git)
+  #:use-module (guix git)
+  #:use-module (guix tests git)
+  #:use-module (guix build utils)
+  #:use-module (srfi srfi-1)
+  #:use-module (srfi srfi-64))
+
+;; Test the (guix git) tools.
+
+(test-begin "git")
+
+;; 'with-temporary-git-repository' relies on the 'git' command.
+(unless (which (git-command)) (test-skip 1))
+(test-assert "commit-difference, linear history"
+  (with-temporary-git-repository directory
+      '((add "a.txt" "A")
+        (commit "first commit")
+        (add "b.txt" "B")
+        (commit "second commit")
+        (add "c.txt" "C")
+        (commit "third commit")
+        (add "d.txt" "D")
+        (commit "fourth commit"))
+    (with-repository directory repository
+      (let ((commit1 (find-commit repository "first"))
+            (commit2 (find-commit repository "second"))
+            (commit3 (find-commit repository "third"))
+            (commit4 (find-commit repository "fourth")))
+        (and (lset= eq? (commit-difference commit4 commit1)
+                    (list commit2 commit3 commit4))
+             (lset= eq? (commit-difference commit4 commit2)
+                    (list commit3 commit4))
+             (equal? (commit-difference commit3 commit2)
+                     (list commit3))
+
+             ;; COMMIT4 is not an ancestor of COMMIT1 so we should get the
+             ;; empty list.
+             (null? (commit-difference commit1 commit4)))))))
+
+(unless (which (git-command)) (test-skip 1))
+(test-assert "commit-difference, fork"
+  (with-temporary-git-repository directory
+      '((add "a.txt" "A")
+        (commit "first commit")
+        (branch "devel")
+        (checkout "devel")
+        (add "devel/1.txt" "1")
+        (commit "first devel commit")
+        (add "devel/2.txt" "2")
+        (commit "second devel commit")
+        (checkout "master")
+        (add "b.txt" "B")
+        (commit "second commit")
+        (add "c.txt" "C")
+        (commit "third commit")
+        (merge "devel" "merge")
+        (add "d.txt" "D")
+        (commit "fourth commit"))
+    (with-repository directory repository
+      (let ((master1 (find-commit repository "first commit"))
+            (master2 (find-commit repository "second commit"))
+            (master3 (find-commit repository "third commit"))
+            (master4 (find-commit repository "fourth commit"))
+            (devel1  (find-commit repository "first devel"))
+            (devel2  (find-commit repository "second devel"))
+            (merge   (find-commit repository "merge")))
+        (and (equal? (commit-difference master4 merge)
+                     (list master4))
+             (lset= eq? (commit-difference master3 master1)
+                    (list master3 master2))
+             (lset= eq? (commit-difference devel2 master1)
+                    (list devel2 devel1))
+
+             ;; The merge occurred between MASTER2 and MASTER4 so here we
+             ;; expect to see all the commits from the "devel" branch in
+             ;; addition to those on "master".
+             (lset= eq? (commit-difference master4 master2)
+                    (list master4 merge master3 devel1 devel2)))))))
+
+(test-end "git")
-- 
2.23.0





Information forwarded to guix-patches@HIDDEN:
bug#37413; Package guix-patches. Full text available.

Message received at 37413 <at> debbugs.gnu.org:


Received: (at 37413) by debbugs.gnu.org; 15 Sep 2019 22:21:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 15 18:21:21 2019
Received: from localhost ([127.0.0.1]:48823 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1i9ctU-0007dq-CI
	for submit <at> debbugs.gnu.org; Sun, 15 Sep 2019 18:21:21 -0400
Received: from eggs.gnu.org ([209.51.188.92]:49365)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1i9ctS-0007dL-7v
 for 37413 <at> debbugs.gnu.org; Sun, 15 Sep 2019 18:21:18 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:40767)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1i9ctN-0006wX-5H; Sun, 15 Sep 2019 18:21:13 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=60368 helo=gnu.org)
 by fencepost.gnu.org with esmtpsa
 (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82)
 (envelope-from <ludo@HIDDEN>)
 id 1i9ctM-00007t-LK; Sun, 15 Sep 2019 18:21:12 -0400
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 37413 <at> debbugs.gnu.org
Subject: [PATCH 2/9] git: 'update-cached-checkout' avoids network access when
 unnecessary.
Date: Mon, 16 Sep 2019 00:20:59 +0200
Message-Id: <20190915222106.4463-2-ludo@HIDDEN>
X-Mailer: git-send-email 2.23.0
In-Reply-To: <20190915222106.4463-1-ludo@HIDDEN>
References: <20190915222106.4463-1-ludo@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 37413
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

* guix/git.scm (reference-available?): New procedure.
(update-cached-checkout): Avoid call to 'remote-fetch' when REPOSITORY
already contains REF.
---
 guix/git.scm | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/guix/git.scm b/guix/git.scm
index de98fed40c..92a7353b5a 100644
--- a/guix/git.scm
+++ b/guix/git.scm
@@ -220,6 +220,21 @@ dynamic extent of EXP."
               (G_ "Support for submodules is missing; \
 please upgrade Guile-Git.~%"))))
 
+(define (reference-available? repository ref)
+  "Return true if REF, a reference such as '(commit . \"cabba9e\"), is
+definitely available in REPOSITORY, false otherwise."
+  (match ref
+    (('commit . commit)
+     (catch 'git-error
+       (lambda ()
+         (->bool (commit-lookup repository (string->oid commit))))
+       (lambda (key error . rest)
+         (if (= GIT_ENOTFOUND (git-error-code error))
+             #f
+             (apply throw key error rest)))))
+    (_
+     #f)))
+
 (define* (update-cached-checkout url
                                  #:key
                                  (ref '(branch . "master"))
@@ -254,7 +269,8 @@ When RECURSIVE? is true, check out submodules as well, if any."
                              (repository-open cache-directory)
                              (clone* url cache-directory))))
      ;; Only fetch remote if it has not been cloned just before.
-     (when cache-exists?
+     (when (and cache-exists?
+                (not (reference-available? repository ref)))
        (remote-fetch (remote-lookup repository "origin")))
      (when recursive?
        (update-submodules repository #:log-port log-port))
-- 
2.23.0





Information forwarded to guix-patches@HIDDEN:
bug#37413; Package guix-patches. Full text available.

Message received at 37413 <at> debbugs.gnu.org:


Received: (at 37413) by debbugs.gnu.org; 15 Sep 2019 22:21:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 15 18:21:20 2019
Received: from localhost ([127.0.0.1]:48820 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1i9ctT-0007do-Op
	for submit <at> debbugs.gnu.org; Sun, 15 Sep 2019 18:21:20 -0400
Received: from eggs.gnu.org ([209.51.188.92]:49363)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1i9ctR-0007dK-Se
 for 37413 <at> debbugs.gnu.org; Sun, 15 Sep 2019 18:21:18 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:40766)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1i9ctM-0006wM-9V; Sun, 15 Sep 2019 18:21:12 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=60368 helo=gnu.org)
 by fencepost.gnu.org with esmtpsa
 (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82)
 (envelope-from <ludo@HIDDEN>)
 id 1i9ctL-00007t-TJ; Sun, 15 Sep 2019 18:21:12 -0400
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 37413 <at> debbugs.gnu.org
Subject: [PATCH 1/9] pull: '--news' shows the list of channels added or
 removed.
Date: Mon, 16 Sep 2019 00:20:58 +0200
Message-Id: <20190915222106.4463-1-ludo@HIDDEN>
X-Mailer: git-send-email 2.23.0
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 37413
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

* guix/scripts/pull.scm (display-channel, channel=?)
(display-channel-news, display-news): New procedures.
(process-query): Call 'display-news' instead of 'display-profile-news'.
---
 guix/scripts/pull.scm | 61 ++++++++++++++++++++++++++++++++++++++++---
 1 file changed, 57 insertions(+), 4 deletions(-)

diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm
index 54bbaddf30..ca3b36f98c 100644
--- a/guix/scripts/pull.scm
+++ b/guix/scripts/pull.scm
@@ -192,6 +192,62 @@ newest generation of PROFILE."
                                         (G_ "New in this revision:\n")))))
     (_ #t)))
 
+(define (display-channel channel)
+  "Display information about CHANNEL."
+  (format (current-error-port)
+          ;; TRANSLATORS: This describes a "channel"; the first placeholder is
+          ;; the channel name (e.g., "guix") and the second placeholder is its
+          ;; URL.
+          (G_ "    ~a at ~a~%")
+          (channel-name channel)
+          (channel-url channel)))
+
+(define (channel=? channel1 channel2)
+  "Return true if CHANNEL1 and CHANNEL2 are the same for all practical
+purposes."
+  ;; Assume that the URL matters less than the name.
+  (eq? (channel-name channel1) (channel-name channel2)))
+
+(define (display-channel-news profile)
+  "Display new about the channels of PROFILE "
+  (define previous
+    (and=> (relative-generation profile -1)
+           (cut generation-file-name profile <>)))
+
+  (when previous
+    (let ((old-channels (profile-channels previous))
+          (new-channels (profile-channels profile)))
+      (and (pair? old-channels) (pair? new-channels)
+           (begin
+             (match (lset-difference channel=? new-channels old-channels)
+               (()
+                #t)
+               (new
+                (let ((count (length new)))
+                  (format (current-error-port)
+                          (N_ "  ~*One new channel:~%"
+                              "  ~a new channels:~%" count)
+                          count)
+                  (for-each display-channel new))))
+             (match (lset-difference channel=? old-channels new-channels)
+               (()
+                #t)
+               (removed
+                (let ((count (length removed)))
+                  (format (current-error-port)
+                          (N_ "  ~*One channel removed:~%"
+                              "  ~a channels removed:~%" count)
+                          count)
+                  (for-each display-channel removed)))))))))
+
+(define (display-news profile)
+  ;; Display profile news, with the understanding that this process represents
+  ;; the newest generation.
+  (display-profile-news profile
+                        #:current-is-newer? #t)
+
+  (display-channel-news profile))
+
 (define* (build-and-install instances profile
                             #:key use-substitutes? verbose? dry-run?)
   "Build the tool from SOURCE, and install it in PROFILE.  When DRY-RUN? is
@@ -493,10 +549,7 @@ list of package changes.")))))
                ((numbers ...)
                 (list-generations profile numbers)))))))
     (('display-news)
-     ;; Display profile news, with the understanding that this process
-     ;; represents the newest generation.
-     (display-profile-news profile
-                           #:current-is-newer? #t))))
+     (display-news profile))))
 
 (define (channel-list opts)
   "Return the list of channels to use.  If OPTS specify a channel file,
-- 
2.23.0





Information forwarded to guix-patches@HIDDEN:
bug#37413; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 15 Sep 2019 22:10:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 15 18:10:33 2019
Received: from localhost ([127.0.0.1]:48796 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1i9cj2-0007IZ-Tr
	for submit <at> debbugs.gnu.org; Sun, 15 Sep 2019 18:10:33 -0400
Received: from lists.gnu.org ([209.51.188.17]:49678)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1i9cj1-0007IQ-8m
 for submit <at> debbugs.gnu.org; Sun, 15 Sep 2019 18:10:31 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:56447)
 by lists.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>) id 1i9cj0-0005LZ-8u
 for guix-patches@HIDDEN; Sun, 15 Sep 2019 18:10:31 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.2 required=5.0 tests=ALL_TRUSTED,BAYES_50,
 URIBL_BLOCKED autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:470:142:3::e]:40631)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1i9cj0-0003PO-5c; Sun, 15 Sep 2019 18:10:30 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=60346 helo=gnu.org)
 by fencepost.gnu.org with esmtpsa
 (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82)
 (envelope-from <ludo@HIDDEN>)
 id 1i9ciz-0007l1-6C; Sun, 15 Sep 2019 18:10:29 -0400
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH 0/9] Channel news distribution mechanism
Date: Mon, 16 Sep 2019 00:10:21 +0200
Message-Id: <20190915221021.4165-1-ludo@HIDDEN>
X-Mailer: git-send-email 2.23.0
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: submit
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hello Guix!

This patch series adds a mechanism for channel authors to distribute
“news entries” alongside their channels.  The goal is to provide a
way for channel authors (including authors of the 'guix channel!)
to inform their users about important changes.

For example, you’d tell people about package upgrades that require
manual intervention, about important new features, bug fixes, etc.

This is done by adding a “news file” to the channel.  Each entry in
that file is associated with a commit, meaning that the entry
describes changes related to that commit.  This information is what
allows ‘guix pull --news’ to determine whether a news entry is
relevant or not for the user: only entries corresponding to commits
that were just pulled are displayed.

It’s a bit weird to refer to commits from within a file in the repo
because it almost forces you to push so that you know the commit ID
that your news entry should refer to.  News entries become obsolete
if you rebase, too.  I think it’s acceptable, though.

Regarding i18n, the title and body of an entry can be provided in
several languages.  I wonder what workflow we should adopt;
obviously the TP wouldn’t be appropriate, and there’s no gettext
involved.

Anyway, this is it.  Feedback welcome!

Ludo’.

Ludovic Courtès (9):
  pull: '--news' shows the list of channels added or removed.
  git: 'update-cached-checkout' avoids network access when unnecessary.
  git: Add 'commit-difference'.
  channels: Add support for a news file.
  ui: Add 'current-message-language'.
  pull: Display channel news.
  pull: '-l' displays channel news.
  Add '.guix-channel' file.
  DRAFT etc: Add channel news file.

 .dir-locals.el        |   1 +
 .guix-channel         |   5 ++
 Makefile.am           |   8 ++-
 doc/guix.texi         |  62 +++++++++++++++++++--
 etc/news.scm          |  13 +++++
 guix/channels.scm     | 121 ++++++++++++++++++++++++++++++++++++++---
 guix/git.scm          |  58 +++++++++++++++++++-
 guix/scripts/pull.scm | 122 +++++++++++++++++++++++++++++++++++++++---
 guix/tests/git.scm    | 102 +++++++++++++++++++++++++++++++++++
 guix/ui.scm           |  18 +++++++
 tests/channels.scm    |  96 +++++++++++++++++++++++++++++++++
 tests/git.scm         |  99 ++++++++++++++++++++++++++++++++++
 12 files changed, 685 insertions(+), 20 deletions(-)
 create mode 100644 .guix-channel
 create mode 100644 etc/news.scm
 create mode 100644 guix/tests/git.scm
 create mode 100644 tests/git.scm

-- 
2.23.0





Acknowledgement sent to Ludovic Courtès <ludo@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#37413; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Thu, 26 Sep 2019 21:30:02 UTC

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