GNU bug report logs - #34040
Suggest input changes when updating packages

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: Ricardo Wurmus <rekado@HIDDEN>; Keywords: fixed; Done: Ludovic Courtès <ludo@HIDDEN>; Maintainer for guix-patches is guix-patches@HIDDEN.
bug closed, send any further explanations to 34040 <at> debbugs.gnu.org and Ricardo Wurmus <rekado@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 34040 <at> debbugs.gnu.org:


Received: (at 34040) by debbugs.gnu.org; 12 Jan 2019 21:11:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 12 16:11:59 2019
Received: from localhost ([127.0.0.1]:57178 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1giQZS-0004Fp-RX
	for submit <at> debbugs.gnu.org; Sat, 12 Jan 2019 16:11:59 -0500
Received: from sender-of-o53.zoho.com ([135.84.80.218]:21837)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rekado@HIDDEN>) id 1giQZQ-0004Fh-Mm
 for 34040 <at> debbugs.gnu.org; Sat, 12 Jan 2019 16:11:57 -0500
ARC-Seal: i=1; a=rsa-sha256; t=1547327492; cv=none; d=zoho.com; s=zohoarc; 
 b=KcBFNVpwGEEORf8QUXMgxW8Qf0tJ+W4sEEXysNGW9S8Cnin1afycN718PkbIEtiUR+9W4euxpJBI5eoMLcUC2l8zQUPBU3c5ZZ4Fd3FNkbTzCAf3+nZ7UPBIbvUT3yey3qmxiWtj1jFtmhZ5TFVDM7zBTk1syh0NM2BRCXulqGY=
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com;
 s=zohoarc; t=1547327492;
 h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To:ARC-Authentication-Results;
 bh=7kG7ZHTztodnccYrVsXozED+KE53JQkYmK1p3mmbc0w=; 
 b=A6LoGNvfbymF6+XUSmVVsSHMhZgbaNmA4cOBQqXy5qmc5Oc1tcojH15ZAPmg1qgjVb+lGRs4+da+EryiP5Ujv5q8pAzJEab0lmfxhDX0hFOmulhAmltcuD6qSa8WUENJWIgXzteqbL+ofQ72GGhuIxnzvpvV2nKGwpatMhIYGdw=
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=1547327492; 
 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=1493; bh=7kG7ZHTztodnccYrVsXozED+KE53JQkYmK1p3mmbc0w=;
 b=g3g8vLz7rY7I9b4DF/3mJmILZBmFQnPRmoOHaLEaAqqEmHuqISZalclZGsqI8RUO
 mR+1f4FCwPlC0aasWGuIPoDWFzmLg5PXXYZm080BH/0hFMA+yaHTbSy5YatR/VvRxkS
 qaJzB83y9gTJL1EKNblKMRwkTPMw0Ptl+Pi+KXWM=
Received: from localhost (p578E6F8F.dip0.t-ipconnect.de [87.142.111.143]) by
 mx.zohomail.com with SMTPS id 1547327490672783.0836291619123;
 Sat, 12 Jan 2019 13:11:30 -0800 (PST)
References: <20190111094208.28327-1-rekado@HIDDEN>
 <20190111094208.28327-2-rekado@HIDDEN> <87y37q56wy.fsf@HIDDEN>
User-agent: mu4e 1.0; emacs 26.1
From: Ricardo Wurmus <rekado@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: [bug#34040] [PATCH 2/2] import: cran: Suggest input changes.
In-reply-to: <87y37q56wy.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: Sat, 12 Jan 2019 22:11:25 +0100
Message-ID: <87ef9hoa2q.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: 34040
Cc: 34040 <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,

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

> Ricardo Wurmus <rekado@HIDDEN> skribis:
>
>> * guix/import/cran.scm (latest-cran-release, latest-bioconductor-release=
):
>> Return input-changes.
>
> LGTM!

Thank you for taking the time to review this!

>> -(define (latest-cran-release package)
>> -  "Return an <upstream-source> for the latest release of PACKAGE."
>> +(define (latest-cran-release pkg)
>
> Unless there=E2=80=99s a name clash I think it=E2=80=99s OK to keep =E2=
=80=98package=E2=80=99.

There is a name clash, which I found very surprising.  Take this procedure:

--8<---------------cut here---------------start------------->8---
(define (latest-cran-release package)
  "Return an <upstream-source> for the latest release of the package PKG."

  (define upstream-name
    (package->upstream-name package))

  (define meta
    (fetch-description 'cran upstream-name))

  (and meta
       (let ((version (assoc-ref meta "Version")))
         ;; CRAN does not provide signatures.
         (upstream-source
          (package (package-name package))
          (version version)
          (urls (cran-uri upstream-name version))
          (input-changes
           (changed-inputs
            package ; <=E2=80=93 this is the value of the =E2=80=9Cpackage=
=E2=80=9D field,
                    ;    not the value of the procedure argument.
            (description->package 'cran meta)))))))
--8<---------------cut here---------------end--------------->8---

That=E2=80=99s why I renamed the argument to =E2=80=9Cpkg=E2=80=9D.

--=20
Ricardo





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

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


Received: (at 34040) by debbugs.gnu.org; 12 Jan 2019 13:42:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 12 08:42:25 2019
Received: from localhost ([127.0.0.1]:56624 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1giJYP-0000Ci-NX
	for submit <at> debbugs.gnu.org; Sat, 12 Jan 2019 08:42:25 -0500
Received: from hera.aquilenet.fr ([185.233.100.1]:43074)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1giJYN-0000Ca-VB
 for 34040 <at> debbugs.gnu.org; Sat, 12 Jan 2019 08:42:24 -0500
Received: from localhost (localhost [127.0.0.1])
 by hera.aquilenet.fr (Postfix) with ESMTP id 6264D1A2B;
 Sat, 12 Jan 2019 14:42:23 +0100 (CET)
X-Virus-Scanned: Debian amavisd-new at aquilenet.fr
Received: from hera.aquilenet.fr ([127.0.0.1])
 by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id o9XKRTyAzLKf; Sat, 12 Jan 2019 14:42:22 +0100 (CET)
Received: from ribbon (unknown [IPv6:2a01:e0a:1d:7270:af76:b9b:ca24:c465])
 by hera.aquilenet.fr (Postfix) with ESMTPSA id 8AF00C34;
 Sat, 12 Jan 2019 14:42:22 +0100 (CET)
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Ricardo Wurmus <rekado@HIDDEN>
Subject: Re: [bug#34040] [PATCH 2/2] import: cran: Suggest input changes.
References: <20190111094208.28327-1-rekado@HIDDEN>
 <20190111094208.28327-2-rekado@HIDDEN>
Date: Sat, 12 Jan 2019 14:42:21 +0100
In-Reply-To: <20190111094208.28327-2-rekado@HIDDEN> (Ricardo Wurmus's
 message of "Fri, 11 Jan 2019 10:42:08 +0100")
Message-ID: <87y37q56wy.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 34040
Cc: 34040 <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: -0.0 (/)

Ricardo Wurmus <rekado@HIDDEN> skribis:

> * guix/import/cran.scm (latest-cran-release, latest-bioconductor-release):
> Return input-changes.

LGTM!

> -(define (latest-cran-release package)
> -  "Return an <upstream-source> for the latest release of PACKAGE."
> +(define (latest-cran-release pkg)

Unless there=E2=80=99s a name clash I think it=E2=80=99s OK to keep =E2=80=
=98package=E2=80=99.

Thanks!

Ludo=E2=80=99.




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

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


Received: (at 34040) by debbugs.gnu.org; 12 Jan 2019 13:40:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 12 08:40:55 2019
Received: from localhost ([127.0.0.1]:56620 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1giJWx-0000AK-Av
	for submit <at> debbugs.gnu.org; Sat, 12 Jan 2019 08:40:55 -0500
Received: from hera.aquilenet.fr ([185.233.100.1]:43060)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1giJWt-0000A9-Th
 for 34040 <at> debbugs.gnu.org; Sat, 12 Jan 2019 08:40:54 -0500
Received: from localhost (localhost [127.0.0.1])
 by hera.aquilenet.fr (Postfix) with ESMTP id 475501A2B;
 Sat, 12 Jan 2019 14:40:49 +0100 (CET)
X-Virus-Scanned: Debian amavisd-new at aquilenet.fr
Received: from hera.aquilenet.fr ([127.0.0.1])
 by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id Q0BXmngQxuQ0; Sat, 12 Jan 2019 14:40:48 +0100 (CET)
Received: from ribbon (unknown [IPv6:2a01:e0a:1d:7270:af76:b9b:ca24:c465])
 by hera.aquilenet.fr (Postfix) with ESMTPSA id 1B928C34;
 Sat, 12 Jan 2019 14:40:47 +0100 (CET)
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Ricardo Wurmus <rekado@HIDDEN>
Subject: Re: [bug#34040] [PATCH 1/2] refresh: Suggest input changes when
 updating.
References: <8736pzpnhg.fsf@HIDDEN>
 <20190111094208.28327-1-rekado@HIDDEN>
Date: Sat, 12 Jan 2019 14:40:47 +0100
In-Reply-To: <20190111094208.28327-1-rekado@HIDDEN> (Ricardo Wurmus's
 message of "Fri, 11 Jan 2019 10:42:07 +0100")
Message-ID: <8736py6lk0.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 34040
Cc: 34040 <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: -0.0 (/)

Hello,

Ricardo Wurmus <rekado@HIDDEN> skribis:

> * guix/upstream.scm (<upstream-source>)[input-changes]: New field.
> (<upstream-input-change>): New record.
> (upstream-input-change?, upstream-input-change-name,
> upstream-input-change-type, upstream-input-change-action, changed-inputs)=
: New
> procedures.
> (package-update): Pass along input changes.
> * guix/script/refresh.scm (update-package): Process input changes.

Really cool!

> +;; Representation of an upstream input change.
> +(define-record-type* <upstream-input-change>
> +  upstream-input-change make-upstream-input-change
> +  upstream-input-change?
> +  (name    upstream-input-change-name)    ;string
> +  (type    upstream-input-change-type)    ;symbol: regular | native | pr=
opagated
> +  (action  upstream-input-change-action)) ;symbol: add | remove

Perhaps in some cases in action could be, say, (upgrade "1.2").  Though
that=E2=80=99s of course something we can add later.

>  (define* (package-update store package updaters
>                           #:key (key-download 'interactive))
> -  "Return the new version and the file name of the new version tarball f=
or
> -PACKAGE, or #f and #f when PACKAGE is up-to-date.  KEY-DOWNLOAD specifie=
s a
> -download policy for missing OpenPGP keys; allowed values: 'always', 'nev=
er',
> -and 'interactive' (default)."
> +  "Return the new version, the file name of the new version tarball and =
input
                                                                      ^
Missing comma.  :-)

> +changes for PACKAGE, or #f and #f when PACKAGE is up-to-date.  KEY-DOWNL=
OAD
                                   ^
Instead of =E2=80=9C, or =E2=80=A6=E2=80=9D:

  ; return #f (three values) when PACKAGE is up-to-date.

Otherwise LGTM, thanks!

Ludo=E2=80=99.




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

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


Received: (at 34040) by debbugs.gnu.org; 11 Jan 2019 09:42:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jan 11 04:42:43 2019
Received: from localhost ([127.0.0.1]:54625 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ghtKs-0006PB-Jn
	for submit <at> debbugs.gnu.org; Fri, 11 Jan 2019 04:42:43 -0500
Received: from sender-of-o53.zoho.com ([135.84.80.218]:21723)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rekado@HIDDEN>) id 1ghtKo-0006Oo-5U
 for 34040 <at> debbugs.gnu.org; Fri, 11 Jan 2019 04:42:38 -0500
ARC-Seal: i=1; a=rsa-sha256; t=1547199736; cv=none; d=zoho.com; s=zohoarc; 
 b=d34/9e8ZQnhwi8vVKe9kKndjOCMLq6vE9u3qBnE5I36dDSY5Q4ZM86fgAKsCib8bprQEOupTB7mA16vB/HZuuyAGRRH5XyPnuwWM7cXeumtJb1NN3if4j3SnRGlYFXHwxwkP/isOI+XwLrDkHHoZHCJeLZLj2SAY9t9qbrQyhYQ=
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com;
 s=zohoarc; t=1547199736;
 h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:MIME-Version:Message-ID:Subject:To:ARC-Authentication-Results;
 bh=5L/4qXbuW6yemPsYvk4JFDcTaw1u6o798XFxXRLqSM8=; 
 b=SGGBwTNQlAHNClpqeUrB3uxpP9Xf+9aFYXKab1P0Iwm2OHqa5EY1k2YEGE+QTv+6MiXgoclIB66INl9aw7bJ8f4+95BapaUVLN/e8yQXL6z9ktSBqiALO/TCRV7c/oAsuZ+Ss1wK+MoLn4OXg7xPH+PEaeyckiom3rwfcFDMkUU=
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=1547199736; 
 s=zoho; d=elephly.net; i=rekado@HIDDEN;
 h=From:To:Cc:Message-ID:Subject:Date:MIME-Version:Content-Type:Content-Transfer-Encoding;
 l=7189; bh=5L/4qXbuW6yemPsYvk4JFDcTaw1u6o798XFxXRLqSM8=;
 b=K9UwRVqSh3ymAffjRw/feQfIVje3X5fZyp8VmlrhxTRNdUA8hCoXR1o0nxSQz9I0
 Uv6idWXf6MatXR9xup9odm2lO0FM5sCCiKMr2e6Uuhxy0936lHTg+h3o9oqGWo5wRG6
 Ga3yHkTWtrXDrQjVTFG0qpRJ+mznkWw3jtiJUhno=
Received: from localhost (141.80.247.176 [141.80.247.176]) by mx.zohomail.com
 with SMTPS id 1547199735468630.8512313450167;
 Fri, 11 Jan 2019 01:42:15 -0800 (PST)
From: Ricardo Wurmus <rekado@HIDDEN>
To: 34040 <at> debbugs.gnu.org
Message-ID: <20190111094208.28327-1-rekado@HIDDEN>
Subject: [PATCH 1/2] refresh: Suggest input changes when updating.
Date: Fri, 11 Jan 2019 10:42:07 +0100
X-Mailer: git-send-email 2.20.1
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: 34040
Cc: Ricardo Wurmus <rekado@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 (-)

* guix/upstream.scm (<upstream-source>)[input-changes]: New field.
(<upstream-input-change>): New record.
(upstream-input-change?, upstream-input-change-name,
upstream-input-change-type, upstream-input-change-action, changed-inputs): =
New
procedures.
(package-update): Pass along input changes.
* guix/script/refresh.scm (update-package): Process input changes.
---
 guix/scripts/refresh.scm | 23 +++++++++-
 guix/upstream.scm        | 90 ++++++++++++++++++++++++++++++++++++----
 2 files changed, 104 insertions(+), 9 deletions(-)

diff --git a/guix/scripts/refresh.scm b/guix/scripts/refresh.scm
index 003c915da..15cf385fb 100644
--- a/guix/scripts/refresh.scm
+++ b/guix/scripts/refresh.scm
@@ -6,6 +6,7 @@
 ;;; Copyright =C2=A9 2016 Ben Woodcroft <donttrustben@HIDDEN>
 ;;; Copyright =C2=A9 2017 Mathieu Othacehe <m.othacehe@HIDDEN>
 ;;; Copyright =C2=A9 2018 Efraim Flashner <efraim@HIDDEN>
+;;; Copyright =C2=A9 2019 Ricardo Wurmus <rekado@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -224,7 +225,7 @@ KEY-DOWNLOAD specifies a download policy for missing Op=
enPGP keys; allowed
 values: 'interactive' (default), 'always', and 'never'.  When WARN? is tru=
e,
 warn about packages that have no matching updater."
   (if (lookup-updater package updaters)
-      (let-values (((version tarball)
+      (let-values (((version tarball changes)
                     (package-update store package updaters
                                     #:key-download key-download))
                    ((loc)
@@ -238,6 +239,26 @@ warn about packages that have no matching updater."
                         (location->string loc)
                         (package-name package)
                         (package-version package) version)
+                (for-each
+                 (lambda (change)
+                   (format (current-error-port)
+                           (match (list (upstream-input-change-action chan=
ge)
+                                        (upstream-input-change-type change=
))
+                             (('add 'regular)
+                              (G_ "~a: consider adding this input: ~a~%"))
+                             (('add 'native)
+                              (G_ "~a: consider adding this native input: =
~a~%"))
+                             (('add 'propagated)
+                              (G_ "~a: consider adding this propagated inp=
ut: ~a~%"))
+                             (('remove 'regular)
+                              (G_ "~a: consider removing this input: ~a~%"=
))
+                             (('remove 'native)
+                              (G_ "~a: consider removing this native input=
: ~a~%"))
+                             (('remove 'propagated)
+                              (G_ "~a: consider removing this propagated i=
nput: ~a~%")))
+                           (package-name package)
+                           (upstream-input-change-name change)))
+                 (changes))
                 (let ((hash (call-with-input-file tarball
                               port-sha256)))
                   (update-package-source package version hash)))
diff --git a/guix/upstream.scm b/guix/upstream.scm
index 9e1056f7a..880cb9094 100644
--- a/guix/upstream.scm
+++ b/guix/upstream.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright =C2=A9 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 =
Ludovic Court=C3=A8s <ludo@HIDDEN>
 ;;; Copyright =C2=A9 2015 Alex Kost <alezost@HIDDEN>
+;;; Copyright =C2=A9 2019 Ricardo Wurmus <rekado@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -45,6 +46,7 @@
             upstream-source-urls
             upstream-source-signature-urls
             upstream-source-archive-types
+            upstream-source-input-changes
=20
             url-prefix-predicate
             coalesce-sources
@@ -56,6 +58,12 @@
             upstream-updater-predicate
             upstream-updater-latest
=20
+            upstream-input-change?
+            upstream-input-change-name
+            upstream-input-change-type
+            upstream-input-change-action
+            changed-inputs
+
             %updaters
             lookup-updater
=20
@@ -82,7 +90,73 @@
   (version        upstream-source-version)        ;string
   (urls           upstream-source-urls)           ;list of strings
   (signature-urls upstream-source-signature-urls  ;#f | list of strings
-                  (default #f)))
+                  (default #f))
+  (input-changes  upstream-source-input-changes
+                  (default '()) (thunked)))
+
+;; Representation of an upstream input change.
+(define-record-type* <upstream-input-change>
+  upstream-input-change make-upstream-input-change
+  upstream-input-change?
+  (name    upstream-input-change-name)    ;string
+  (type    upstream-input-change-type)    ;symbol: regular | native | prop=
agated
+  (action  upstream-input-change-action)) ;symbol: add | remove
+
+(define (changed-inputs package package-sexp)
+  "Return a list of input changes for PACKAGE based on the newly imported
+S-expression PACKAGE-SEXP."
+  (match package-sexp
+    ((and expr ('package fields ...))
+     (let* ((input->name (match-lambda ((name pkg . out) name)))
+            (new-regular
+             (match expr
+               ((path *** ('inputs
+                           ('quasiquote ((label ('unquote sym)) ...)))) la=
bel)
+               (_ '())))
+            (new-native
+             (match expr
+               ((path *** ('native-inputs
+                           ('quasiquote ((label ('unquote sym)) ...)))) la=
bel)
+               (_ '())))
+            (new-propagated
+             (match expr
+               ((path *** ('propagated-inputs
+                           ('quasiquote ((label ('unquote sym)) ...)))) la=
bel)
+               (_ '())))
+            (current-regular
+             (map input->name (package-inputs package)))
+            (current-native
+             (map input->name (package-native-inputs package)))
+            (current-propagated
+             (map input->name (package-propagated-inputs package))))
+       (append-map
+        (match-lambda
+          ((action type names)
+           (map (lambda (name)
+                  (upstream-input-change
+                   (name name)
+                   (type type)
+                   (action action)))
+                names)))
+        `((add regular
+           ,(lset-difference equal?
+                             new-regular current-regular))
+          (remove regular
+           ,(lset-difference equal?
+                             current-regular new-regular))
+          (add native
+           ,(lset-difference equal?
+                             new-native current-native))
+          (remove native
+           ,(lset-difference equal?
+                             current-native new-native))
+          (add propagated
+           ,(lset-difference equal?
+                             new-propagated current-propagated))
+          (remove propagated
+           ,(lset-difference equal?
+                             current-propagated new-propagated))))))
+    (_ '())))
=20
 (define (url-prefix-predicate prefix)
   "Return a predicate that returns true when passed a package where one of=
 its
@@ -268,12 +342,12 @@ values: the item from LST1 and the item from LST2 tha=
t match PRED."
=20
 (define* (package-update store package updaters
                          #:key (key-download 'interactive))
-  "Return the new version and the file name of the new version tarball for
-PACKAGE, or #f and #f when PACKAGE is up-to-date.  KEY-DOWNLOAD specifies =
a
-download policy for missing OpenPGP keys; allowed values: 'always', 'never=
',
-and 'interactive' (default)."
+  "Return the new version, the file name of the new version tarball and in=
put
+changes for PACKAGE, or #f and #f when PACKAGE is up-to-date.  KEY-DOWNLOA=
D
+specifies a download policy for missing OpenPGP keys; allowed values:
+'always', 'never', and 'interactive' (default)."
   (match (package-latest-release* package updaters)
-    (($ <upstream-source> _ version urls signature-urls)
+    (($ <upstream-source> _ version urls signature-urls changes)
      (let*-values (((name)
                     (package-name package))
                    ((archive-type)
@@ -299,9 +373,9 @@ and 'interactive' (default)."
                            (or signature-urls (circular-list #f)))))
        (let ((tarball (download-tarball store url signature-url
                                         #:key-download key-download)))
-         (values version tarball))))
+         (values version tarball changes))))
     (#f
-     (values #f #f))))
+     (values #f #f #f))))
=20
 (define (update-package-source package version hash)
   "Modify the source file that defines PACKAGE to refer to VERSION,
--=20
2.20.1







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

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


Received: (at 34040) by debbugs.gnu.org; 11 Jan 2019 09:42:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jan 11 04:42:39 2019
Received: from localhost ([127.0.0.1]:54623 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ghtKp-0006P1-4e
	for submit <at> debbugs.gnu.org; Fri, 11 Jan 2019 04:42:39 -0500
Received: from sender-of-o53.zoho.com ([135.84.80.218]:21771)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rekado@HIDDEN>) id 1ghtKm-0006Ol-4R
 for 34040 <at> debbugs.gnu.org; Fri, 11 Jan 2019 04:42:37 -0500
ARC-Seal: i=1; a=rsa-sha256; t=1547199740; cv=none; d=zoho.com; s=zohoarc; 
 b=HLpjriIQ2B/ILEViTZczm8RIjVaAlw2/6Gr4w6MlXcZWkhiLxbWh3hkqCjfZZrCwcJOKRmQBHF769U6lh8v6kI5KrvMjENq2R5PJLdirSxXUbaN+i6WoOsOkYOJv8o1q+wTuQraWao5/TlDC/I86GkAG5ld2OroZhmQLNjS5kNs=
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com;
 s=zohoarc; t=1547199740;
 h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To:ARC-Authentication-Results;
 bh=ve92ItC6KKUpqkvenHbkzCCc4tiucmwj4/KxMJ6YSVI=; 
 b=Kgrl4xCadEwuunPC+E1hN4R502b5RTCBtW5pQgztPWrJFCVrHLrO0/6oO2Cb61h2yN0V7Cxgwn6kAbp5DY/BO7Q6QqGf3PHIpw+y5Yqvexk0KWQPcq0QW0x8Kmp6jM+s8B3qYw8WwlYxWr8Qm0eowoElGGdP8hzVy0eT7ZgDWy0=
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=1547199740; 
 s=zoho; d=elephly.net; i=rekado@HIDDEN;
 h=From:To:Cc:Message-ID:Subject:Date:In-Reply-To:References:MIME-Version:Content-Type:Content-Transfer-Encoding;
 l=2709; bh=ve92ItC6KKUpqkvenHbkzCCc4tiucmwj4/KxMJ6YSVI=;
 b=YrMi1ffbcBBnuXtlHhNMhx34MztUmolnn4EhfVSusPclzi8XPyhPUBL98vIXZ46z
 t6nOc6uL/kCjDrTeoyuiPWW8W9WmsDfwumtS5FtQTM6xg6SgEKvG+lQd6Nm7wlWRcJb
 vJYODOlClKJeB/VXKRXAQOA7DhSQf4KLBOlJXGuY=
Received: from localhost (141.80.247.176 [141.80.247.176]) by mx.zohomail.com
 with SMTPS id 15471997394669.671673298095357;
 Fri, 11 Jan 2019 01:42:19 -0800 (PST)
From: Ricardo Wurmus <rekado@HIDDEN>
To: 34040 <at> debbugs.gnu.org
Message-ID: <20190111094208.28327-2-rekado@HIDDEN>
Subject: [PATCH 2/2] import: cran: Suggest input changes.
Date: Fri, 11 Jan 2019 10:42:08 +0100
X-Mailer: git-send-email 2.20.1
In-Reply-To: <20190111094208.28327-1-rekado@HIDDEN>
References: <20190111094208.28327-1-rekado@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: 34040
Cc: Ricardo Wurmus <rekado@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 (-)

* guix/import/cran.scm (latest-cran-release, latest-bioconductor-release):
Return input-changes.
---
 guix/import/cran.scm | 29 ++++++++++++++++++-----------
 1 file changed, 18 insertions(+), 11 deletions(-)

diff --git a/guix/import/cran.scm b/guix/import/cran.scm
index 15163bd16..b287be694 100644
--- a/guix/import/cran.scm
+++ b/guix/import/cran.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright =C2=A9 2015, 2016, 2017, 2018 Ricardo Wurmus <rekado@elephly=
.net>
+;;; Copyright =C2=A9 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@e=
lephly.net>
 ;;; Copyright =C2=A9 2015, 2016, 2017 Ludovic Court=C3=A8s <ludo@HIDDEN>
 ;;; Copyright =C2=A9 2017 Mathieu Othacehe <m.othacehe@HIDDEN>
 ;;;
@@ -390,11 +390,11 @@ s-expression corresponding to that package, or #f on =
failure."
              (_ #f)))
           (_ #f)))))
=20
-(define (latest-cran-release package)
-  "Return an <upstream-source> for the latest release of PACKAGE."
+(define (latest-cran-release pkg)
+  "Return an <upstream-source> for the latest release of the package PKG."
=20
   (define upstream-name
-    (package->upstream-name package))
+    (package->upstream-name pkg))
=20
   (define meta
     (fetch-description 'cran upstream-name))
@@ -403,15 +403,18 @@ s-expression corresponding to that package, or #f on =
failure."
        (let ((version (assoc-ref meta "Version")))
          ;; CRAN does not provide signatures.
          (upstream-source
-          (package (package-name package))
+          (package (package-name pkg))
           (version version)
-          (urls (cran-uri upstream-name version))))))
+          (urls (cran-uri upstream-name version))
+          (input-changes
+           (changed-inputs pkg
+                           (description->package 'cran meta)))))))
=20
-(define (latest-bioconductor-release package)
-  "Return an <upstream-source> for the latest release of PACKAGE."
+(define (latest-bioconductor-release pkg)
+  "Return an <upstream-source> for the latest release of the package PKG."
=20
   (define upstream-name
-    (package->upstream-name package))
+    (package->upstream-name pkg))
=20
   (define version
     (latest-bioconductor-package-version upstream-name))
@@ -419,9 +422,13 @@ s-expression corresponding to that package, or #f on f=
ailure."
   (and version
        ;; Bioconductor does not provide signatures.
        (upstream-source
-        (package (package-name package))
+        (package (package-name pkg))
         (version version)
-        (urls (bioconductor-uri upstream-name version)))))
+        (urls (bioconductor-uri upstream-name version))
+        (input-changes
+         (changed-inputs
+          pkg
+          (cran->guix-package upstream-name 'bioconductor))))))
=20
 (define (cran-package? package)
   "Return true if PACKAGE is an R package from CRAN."
--=20
2.20.1







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

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


Received: (at submit) by debbugs.gnu.org; 11 Jan 2019 09:27:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jan 11 04:27:29 2019
Received: from localhost ([127.0.0.1]:54602 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ght69-0003zO-C5
	for submit <at> debbugs.gnu.org; Fri, 11 Jan 2019 04:27:29 -0500
Received: from eggs.gnu.org ([209.51.188.92]:51940)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rekado@HIDDEN>) id 1ght67-0003z7-1a
 for submit <at> debbugs.gnu.org; Fri, 11 Jan 2019 04:27:27 -0500
Received: from lists.gnu.org ([209.51.188.17]:40402)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <rekado@HIDDEN>) id 1ght61-0000qK-79
 for submit <at> debbugs.gnu.org; Fri, 11 Jan 2019 04:27:21 -0500
Received: from eggs.gnu.org ([209.51.188.92]:33907)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <rekado@HIDDEN>) id 1ght60-00085C-Dp
 for guix-patches@HIDDEN; Fri, 11 Jan 2019 04:27:21 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_NONE
 autolearn=disabled version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <rekado@HIDDEN>) id 1ght5z-0000pf-QN
 for guix-patches@HIDDEN; Fri, 11 Jan 2019 04:27:20 -0500
Received: from sender-of-o53.zoho.com ([135.84.80.218]:21809)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <rekado@HIDDEN>) id 1ght5w-0000mJ-Lz
 for guix-patches@HIDDEN; Fri, 11 Jan 2019 04:27:18 -0500
ARC-Seal: i=1; a=rsa-sha256; t=1547197922; cv=none; d=zoho.com; s=zohoarc; 
 b=nUSTaomsuvmC688/2PEuTpzu1WtPPyavUVXZ0w1fPFov0rqgGGALXcjBDa2/0er7hCLyNCebx0AUHG7ZggMNgERrDay8fk+wjL/OUJSzeSC+ds+RfpPweVsRtoVCvDxHCgQY4/7vnJy7tE6lCTp/CWRW31bnoMNlOJwNXHNmm/Y=
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com;
 s=zohoarc; t=1547197922;
 h=Content-Type:Date:From:MIME-Version:Message-ID:Subject:To:ARC-Authentication-Results;
 bh=3KFsW/ETGL6+zjtTiRepYTZfZXT9qKaFt5GNSsj0Feo=; 
 b=a8/NycxKwPLCo+mfZyQ4BFCotaylPIe4Qm9FyXIXaaQCbGvCqZ1hEDP5rsq93GvLQeOKMsoIVXrrj5FDw8WbB1jqhrII+ysJq1hucibkJVEkQPSQaP3VxbCwg2tDUTnzUnF/CJqERFNLWcDLbU76mKksuabI+X4aISWzxh3n6m4=
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=1547197922; 
 s=zoho; d=elephly.net; i=rekado@HIDDEN;
 h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; l=249;
 bh=3KFsW/ETGL6+zjtTiRepYTZfZXT9qKaFt5GNSsj0Feo=;
 b=DZEA5eixAINNP/oHAWVl9w9oQc7RJNGkjtnL3FunnNoiS+CcgTYA9ywIfefP57c7
 Wct+De8AuzZHdfqTOpj9c5vdA68Tt/n8mmOqLg8UnUT/cadZgK1Vik7QtN3g5dZQEIc
 yQxrJclutT+rf9sbiciwWzNLKNMyYe8b558gpi18=
Received: from localhost (141.80.247.176 [141.80.247.176]) by mx.zohomail.com
 with SMTPS id 154719792014811.257948194824962;
 Fri, 11 Jan 2019 01:12:00 -0800 (PST)
User-agent: mu4e 1.0; emacs 26.1
From: Ricardo Wurmus <rekado@HIDDEN>
To: guix-patches@HIDDEN
Subject: Suggest input changes when updating packages
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: Fri, 11 Jan 2019 10:11:55 +0100
Message-ID: <8736pzpnhg.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-ZohoMailClient: External
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 135.84.80.218
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: submit
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: -0.0 (/)

Hi Guix,

Here are two patches: the first changes (guix upstream) and (guix
scripts refresh) to support reporting of input changes when updating a
package.  The second lets the CRAN and Bioconductor importers use these
features.

--
Ricardo





Acknowledgement sent to Ricardo Wurmus <rekado@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#34040; 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: Tue, 15 Jan 2019 09:45:02 UTC

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