GNU bug report logs -
#71697
[PATCH] guix: lint: Honor 'no-archival?' package property.
Previous Next
Full log
View this message in rfc822 format
Hi,
Simon Tournier <zimon.toutoune <at> gmail.com> writes:
>
> Change-Id: I432c5b0570d2f413b59c2296666f3a4e5fb8c64c
> ---
> guix/scripts/lint.scm | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm
> index 2df0cba948..f4aa394686 100644
> --- a/guix/scripts/lint.scm
> +++ b/guix/scripts/lint.scm
> @@ -31,6 +31,7 @@ (define-module (guix scripts lint)
> #:use-module (guix packages)
> #:use-module (guix lint)
> #:use-module (guix ui)
> + #:use-module ((guix utils) #:select (string-closest))
> #:use-module (guix store)
> #:use-module (guix scripts)
> #:use-module (guix scripts build)
> @@ -147,7 +148,15 @@ (define (option-checker short-long)
> ((short long) long)))))
> (for-each (lambda (c)
> (unless (memq c checker-names)
> - (leave (G_ "~a: invalid checker~%") c)))
> + (let* ((name (symbol->string c))
> + (checkers (map symbol->string checker-names))
> + (hint (string-closest name checkers
> + #:threshold 3)))
> + (report-error (G_ "~a: invalid checker~%") name)
> + (when hint
> + (display-hint
> + (format #f (G_ "Did you mean @code{~a}?~%") hint)))
> + (exit 1))))
> names)
> (alist-cons option-name
> (filter (lambda (checker)
Patch 1 and 3 LGTM. Patch 2 I'd rather wait to see if we can think
about a better option to match the original use case (exclude the
archival checker from 'guix lint' for privately developed packages). I
remember that perhaps the simplest thing for that would be to add a
nonfree license to (guix licenses); Guix users developing nonfree
software (ugh) could mark it as such and the lint code could disable
archival for such licensed packages (or maybe more generally if the
license used is unknown to Guix).
--
Thanks,
Maxim
This bug report was last modified 1 year and 44 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.