From 160132bdc23b34c6331adf00af46af19dd8d737c Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sat, 22 Oct 2016 19:12:00 +0100 Subject: [PATCH] lint: Skip 'patch-file-names' on inherited sources. * guix/scripts/lint.scm (check-patch-file-names): Only report when the source file name matches the package name. --- guix/scripts/lint.scm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm index d6281ea..ba1bbc3 100644 --- a/guix/scripts/lint.scm +++ b/guix/scripts/lint.scm @@ -497,10 +497,13 @@ patch could not be found." (_ #f)) ;must be an or something like that. (or (and=> (package-source package) origin-patches) '())) - (emit-warning - package - (_ "file names of patches should start with the package name") - 'patch-file-names)))) + ;; Skip report when the source file name differs (i.e. inherited). + (and (string-prefix? (package-name package) + (origin-actual-file-name (package-source package))) + (emit-warning + package + (_ "file names of patches should start with the package name") + 'patch-file-names))))) (define (escape-quotes str) "Replace any quote character in STR by an escaped quote character." -- 2.10.1