From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53401) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e0w3r-0001hk-1Z for guix-patches@gnu.org; Sat, 07 Oct 2017 16:51:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e0w3q-0007Gl-AC for guix-patches@gnu.org; Sat, 07 Oct 2017 16:51:03 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:46437) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e0w3q-0007GP-6m for guix-patches@gnu.org; Sat, 07 Oct 2017 16:51:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e0w3p-000570-Vh for guix-patches@gnu.org; Sat, 07 Oct 2017 16:51:02 -0400 Subject: [bug#27596] [PATCH] guix: lint: Add checker for new upstream versions. Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <20170706101723.3349-1-efraim@flashner.co.il> <87h8ypocp1.fsf@gnu.org> <20170801112046.GG2406@macbook42.flashner.co.il> <87y3qb4u7t.fsf@gnu.org> Date: Sat, 07 Oct 2017 22:50:21 +0200 In-Reply-To: <87y3qb4u7t.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Tue, 22 Aug 2017 15:17:58 +0200") Message-ID: <877ew6isxe.fsf@gnu.org> 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: Efraim Flashner Cc: 27596@debbugs.gnu.org Ping! :-) ludo@gnu.org (Ludovic Court=C3=A8s) skribis: > Hi Efraim, > > Sorry for the delay. > > Efraim Flashner skribis: > >> From 136841864c883338381764ef09a6f4ec967949e7 Mon Sep 17 00:00:00 2001 >> From: Efraim Flashner >> Date: Thu, 6 Jul 2017 09:13:31 +0300 >> Subject: [PATCH] guix: lint: Add checker for new upstream versions. >> >> * guix/scripts/lint.scm (check-for-updates): New procedure. >> (%checkers): Add it. >> * guix/scripts/refresh.scm (importer-modules, %updaters): Move >> from here ... >> * guix/upstream.scm: ... to here. > > [...] > >> +(define (check-for-updates package) >> + "Check if there is an update available for PACKAGE." >> + (match (package-latest-release package (force %updaters)) >> + ((? upstream-source? source) >> + (when (version>? (upstream-source-version source) >> + (package-version package)) >> + (emit-warning package >> + (format #f (G_ "can be upgraded to ~a~%") >> + (upstream-source-version source))))))) > > I think you can (1) use =E2=80=98package-latest-release*=E2=80=99 which e= nsures that the > returned version is newer, and (2) add a case for #f since > =E2=80=98package-latest-release*=E2=80=99 can return #f. > > Apart from that it LGTM, thank you! > > Ludo=E2=80=99.