Check that all in-repository packages have description and authors.
This commit is contained in:
parent
38fc87f330
commit
d6610289b8
|
@ -6,7 +6,8 @@
|
||||||
racket/string
|
racket/string
|
||||||
racket/set
|
racket/set
|
||||||
setup/getinfo
|
setup/getinfo
|
||||||
pkg/lib)
|
pkg/lib
|
||||||
|
(prefix-in db: pkg/db))
|
||||||
|
|
||||||
(define config-dir-path (build-path "racket" "etc"))
|
(define config-dir-path (build-path "racket" "etc"))
|
||||||
(define config-file-path (build-path config-dir-path "config.rktd"))
|
(define config-file-path (build-path config-dir-path "config.rktd"))
|
||||||
|
@ -140,6 +141,9 @@
|
||||||
(parameterize ([use-compiled-file-paths '()])
|
(parameterize ([use-compiled-file-paths '()])
|
||||||
(get-info/full pkg-dir #:namespace metadata-ns)))
|
(get-info/full pkg-dir #:namespace metadata-ns)))
|
||||||
|
|
||||||
|
(define missing-desc null)
|
||||||
|
(define missing-authors null)
|
||||||
|
|
||||||
(define all-pkgs
|
(define all-pkgs
|
||||||
(let loop ([all-pkgs pkgs] [pkgs pkgs])
|
(let loop ([all-pkgs pkgs] [pkgs pkgs])
|
||||||
(define new-pkgs
|
(define new-pkgs
|
||||||
|
@ -150,6 +154,10 @@
|
||||||
(define i (get-pkg-info dir))
|
(define i (get-pkg-info dir))
|
||||||
(define deps
|
(define deps
|
||||||
(extract-pkg-dependencies i #:filter? #t))
|
(extract-pkg-dependencies i #:filter? #t))
|
||||||
|
(unless (string? (i 'pkg-desc (lambda _ #f)))
|
||||||
|
(set! missing-desc (cons pkg-name missing-desc)))
|
||||||
|
(unless (list? (i 'pkg-authors (lambda _ #f)))
|
||||||
|
(set! missing-authors (cons pkg-name missing-authors)))
|
||||||
(set-union
|
(set-union
|
||||||
new-pkgs
|
new-pkgs
|
||||||
(for/set ([dep (in-list deps)]
|
(for/set ([dep (in-list deps)]
|
||||||
|
@ -187,6 +195,14 @@
|
||||||
#f
|
#f
|
||||||
auto?))))))
|
auto?))))))
|
||||||
|
|
||||||
|
(for ([p (in-list missing-desc)])
|
||||||
|
(printf "Missing package description for ~a\n" p))
|
||||||
|
(for ([p (in-list missing-authors)])
|
||||||
|
(printf "Missing package authors for ~a\n" p))
|
||||||
|
|
||||||
|
(unless (and (null? missing-authors) (null? missing-desc))
|
||||||
|
(error 'link-all "not all packages have description and authors."))
|
||||||
|
|
||||||
;; link configuration
|
;; link configuration
|
||||||
(unless (file-exists? config-file-path)
|
(unless (file-exists? config-file-path)
|
||||||
(printf "Writing ~a\n" config-file-path)
|
(printf "Writing ~a\n" config-file-path)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user