[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/4] lint: Add packages with suffix ':bin' to 'inputs-should-be-n
From: |
David Craven |
Subject: |
[PATCH 1/4] lint: Add packages with suffix ':bin' to 'inputs-should-be-native'. |
Date: |
Tue, 19 Jul 2016 18:49:13 +0200 |
* guix/scripts/lint.scm (check-inputs-should-be-native): Check that packages
with suffix ':bin' and 'intltool', 'itstool' are in native-inputs.
---
guix/scripts/lint.scm | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm
index d5e9197..d64a066 100644
--- a/guix/scripts/lint.scm
+++ b/guix/scripts/lint.scm
@@ -206,11 +206,19 @@ by two spaces; possible infraction~p at ~{~a~^, ~}")
(let ((inputs (package-inputs package)))
(match inputs
(((labels packages . _) ...)
- (when (member "pkg-config"
- (map package-name (filter package? packages)))
- (emit-warning package
- (_ "pkg-config should probably be a native input")
- 'inputs))))))
+ (let ((package-names (map package-name (filter package? packages)))
+ (native-package-names '("pkg-config" "intltool" "itstool"))
+ (warn (lambda (package-name)
+ (emit-warning package
+ (_ (string-append
+ package-name " should probably be a native input"))
'inputs))))
+ (begin
+ (for-each (lambda (package-name)
+ (when (member package-name package-names) (warn package-name)))
+ native-package-names)
+ (for-each (lambda* (package-name)
+ (when (string-suffix? ":bin" package-name) (warn package-name)))
+ labels)))))))
(define (package-name-regexp package)
"Return a regexp that matches PACKAGE's name as a word at the beginning of a
--
2.9.0
Re: [PATCH 4/4] environment: Add '--debug' flag., Ludovic Courtès, 2016/07/21
[PATCH 1/4] lint: Add packages with suffix ':bin' to 'inputs-should-be-native'.,
David Craven <=
- Re: [PATCH 1/4] lint: Add packages with suffix ':bin' to 'inputs-should-be-native'., Ludovic Courtès, 2016/07/20
- Re: [PATCH 1/4] lint: Add packages with suffix ':bin' to 'inputs-should-be-native'., David Craven, 2016/07/20
- Re: [PATCH 1/4] lint: Add packages with suffix ':bin' to 'inputs-should-be-native'., Efraim Flashner, 2016/07/20
- Re: [PATCH 1/4] lint: Add packages with suffix ':bin' to 'inputs-should-be-native'., Ludovic Courtès, 2016/07/21
- Re: [PATCH 1/4] lint: Add packages with suffix ':bin' to 'inputs-should-be-native'., Vincent Legoll, 2016/07/21
- Re: [PATCH 1/4] lint: Add packages with suffix ':bin' to 'inputs-should-be-native'., Ludovic Courtès, 2016/07/21
- Re: [PATCH 1/4] lint: Add packages with suffix ':bin' to 'inputs-should-be-native'., Tobias Geerinckx-Rice, 2016/07/21
- Re: [PATCH 1/4] lint: Add packages with suffix ':bin' to 'inputs-should-be-native'., Ludovic Courtès, 2016/07/22
- Re: [PATCH 1/4] lint: Add packages with suffix ':bin' to 'inputs-should-be-native'., Vincent Legoll, 2016/07/22
[PATCH 2/4] gnu: Rename 'glib' label to 'glib:bin' where appropriate., David Craven, 2016/07/19