[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#27596] [PATCH] guix: lint: Add checker for new upstream versions.
From: |
Ludovic Courtès |
Subject: |
[bug#27596] [PATCH] guix: lint: Add checker for new upstream versions. |
Date: |
Sat, 07 Oct 2017 22:50:21 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) |
Ping! :-)
address@hidden (Ludovic Courtès) skribis:
> Hi Efraim,
>
> Sorry for the delay.
>
> Efraim Flashner <address@hidden> skribis:
>
>> From 136841864c883338381764ef09a6f4ec967949e7 Mon Sep 17 00:00:00 2001
>> From: Efraim Flashner <address@hidden>
>> 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 ‘package-latest-release*’ which ensures that the
> returned version is newer, and (2) add a case for #f since
> ‘package-latest-release*’ can return #f.
>
> Apart from that it LGTM, thank you!
>
> Ludo’.
- [bug#27596] [PATCH] guix: lint: Add checker for new upstream versions.,
Ludovic Courtès <=