From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:50398) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1giQZY-0000vb-1Z for guix-patches@gnu.org; Sat, 12 Jan 2019 16:12:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1giQZX-0002T2-6f for guix-patches@gnu.org; Sat, 12 Jan 2019 16:12:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:57897) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1giQZX-0002Sm-3b for guix-patches@gnu.org; Sat, 12 Jan 2019 16:12:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1giQZW-0004G9-Ih for guix-patches@gnu.org; Sat, 12 Jan 2019 16:12:02 -0500 Subject: [bug#34040] [PATCH 2/2] import: cran: Suggest input changes. Resent-Message-ID: References: <20190111094208.28327-1-rekado@elephly.net> <20190111094208.28327-2-rekado@elephly.net> <87y37q56wy.fsf@gnu.org> From: Ricardo Wurmus In-reply-to: <87y37q56wy.fsf@gnu.org> Date: Sat, 12 Jan 2019 22:11:25 +0100 Message-ID: <87ef9hoa2q.fsf@mdc-berlin.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 34040@debbugs.gnu.org Hi, Ludovic Court=C3=A8s writes: > Ricardo Wurmus 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 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 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