diff options
Diffstat (limited to 'guix/scripts')
-rw-r--r-- | guix/scripts/lint.scm | 11 | ||||
-rw-r--r-- | guix/scripts/package.scm | 38 | ||||
-rw-r--r-- | guix/scripts/publish.scm | 12 | ||||
-rw-r--r-- | guix/scripts/system.scm | 8 |
4 files changed, 37 insertions, 32 deletions
diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm index 6f30d371a2..04ab852999 100644 --- a/guix/scripts/lint.scm +++ b/guix/scripts/lint.scm @@ -668,16 +668,15 @@ descriptions maintained upstream." (define (check-source-file-name package) "Emit a warning if PACKAGE's origin has no meaningful file name." (define (origin-file-name-valid? origin) - ;; Return #t if the source file name contains only a version or is #f; + ;; Return #f if the source file name contains only a version or is #f; ;; indicates that the origin needs a 'file-name' field. (let ((file-name (origin-actual-file-name origin)) (version (package-version package))) (and file-name - (not (or (string-prefix? version file-name) - ;; Common in many projects is for the filename to start - ;; with a "v" followed by the version, - ;; e.g. "v3.2.0.tar.gz". - (string-prefix? (string-append "v" version) file-name)))))) + ;; Common in many projects is for the filename to start + ;; with a "v" followed by the version, + ;; e.g. "v3.2.0.tar.gz". + (not (string-match (string-append "^v?" version) file-name))))) (let ((origin (package-source package))) (unless (or (not origin) (origin-file-name-valid? origin)) diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm index 1f3f49fc6f..f050fad976 100644 --- a/guix/scripts/package.scm +++ b/guix/scripts/package.scm @@ -681,24 +681,26 @@ processed, #f otherwise." (unless (null-list? (cdr numbers)) (display-profile-content-diff profile (car numbers) (cadr numbers)) (diff-profiles profile (cdr numbers)))) - (cond ((not (file-exists? profile)) ; XXX: race condition - (raise (condition (&profile-not-found-error - (profile profile))))) - ((string-null? pattern) - (list-generation display-profile-content - (car (profile-generations profile))) - (diff-profiles profile (profile-generations profile))) - ((matching-generations pattern profile) - => - (lambda (numbers) - (if (null-list? numbers) - (exit 1) - (leave-on-EPIPE - (list-generation display-profile-content (car numbers)) - (diff-profiles profile numbers))))) - (else - (leave (G_ "invalid syntax: ~a~%") - pattern))) + + (leave-on-EPIPE + (cond ((not (file-exists? profile)) ; XXX: race condition + (raise (condition (&profile-not-found-error + (profile profile))))) + ((string-null? pattern) + (list-generation display-profile-content + (car (profile-generations profile))) + (diff-profiles profile (profile-generations profile))) + ((matching-generations pattern profile) + => + (lambda (numbers) + (if (null-list? numbers) + (exit 1) + (begin + (list-generation display-profile-content (car numbers)) + (diff-profiles profile numbers))))) + (else + (leave (G_ "invalid syntax: ~a~%") + pattern)))) #t) (('list-installed regexp) diff --git a/guix/scripts/publish.scm b/guix/scripts/publish.scm index db7f6a957e..c306b809a7 100644 --- a/guix/scripts/publish.scm +++ b/guix/scripts/publish.scm @@ -425,11 +425,13 @@ requested using POOL." ;; return 404. (eventually pool (single-baker item - ;; (format #t "baking ~s~%" item) - (bake-narinfo+nar cache item - #:ttl ttl - #:compression compression - #:nar-path nar-path)) + ;; Check whether CACHED has been produced in the meantime. + (unless (file-exists? cached) + ;; (format #t "baking ~s~%" item) + (bake-narinfo+nar cache item + #:ttl ttl + #:compression compression + #:nar-path nar-path))) (when ttl (single-baker 'cache-cleanup diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index 5e4574f7c7..f71b1d71b8 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -575,7 +575,7 @@ PATTERN, a string. When PATTERN is #f, display all the system generations." #:disk-image-size (if full-boot? image-size - (* 30 (expt 2 20))) + (* 70 (expt 2 20))) #:mappings mappings)) ((disk-image) (system-disk-image os #:disk-image-size image-size)))) @@ -897,8 +897,10 @@ resulting from command-line parsing." ((shepherd-graph) (export-shepherd-graph os (current-output-port))) (else - (warn-about-old-distro #:suggested-command - "guix system reconfigure") + (unless (memq action '(build init)) + (warn-about-old-distro #:suggested-command + "guix system reconfigure")) + (perform-action action os #:dry-run? dry? #:derivations-only? (assoc-ref opts |