[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
13/16: guix build: Validate that the file passed to ‘-m’ returns a manif
From: |
guix-commits |
Subject: |
13/16: guix build: Validate that the file passed to ‘-m’ returns a manifest. |
Date: |
Sun, 1 Dec 2024 14:15:20 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit c6050cce28cfcbdc4c74886595da07005d33e3b0
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Tue Nov 26 10:51:20 2024 +0100
guix build: Validate that the file passed to ‘-m’ returns a manifest.
* guix/scripts/build.scm (options->things-to-build)[ensure-manifest]:
New procedure.
Use it.
Change-Id: If64c483d7079f441a296d5bd4e06e67f44cbb7bf
---
guix/scripts/build.scm | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm
index 5c93dc78f8..d1368f7e48 100644
--- a/guix/scripts/build.scm
+++ b/guix/scripts/build.scm
@@ -629,6 +629,12 @@ values.")))))))))
(for-each validate-type lst)
lst))
+ (define (ensure-manifest x file)
+ (unless (manifest? x)
+ (raise (formatted-message (G_ "file '~a' does not return a manifest")
+ file)))
+ x)
+
(define system
(or (assoc-ref opts 'system) (%current-system)))
@@ -701,9 +707,11 @@ values.")))))))))
(loop tail 'regular
(append (map manifest-entry-item
(manifest-entries
- (load* manifest
- (make-user-module '((guix profiles)
- (gnu))))))
+ (ensure-manifest
+ (load* manifest
+ (make-user-module '((guix profiles)
+ (gnu))))
+ manifest)))
result)))
(('expression . str)
(loop tail 'regular
- 15/16: transformations: Add #:authenticate? to ‘package-with-upstream-version’., (continued)
- 15/16: transformations: Add #:authenticate? to ‘package-with-upstream-version’., guix-commits, 2024/12/01
- 16/16: etc: Add upgrade manifest., guix-commits, 2024/12/01
- 07/16: import: gnome: Keep going upon HTTP errors., guix-commits, 2024/12/01
- 11/16: gnu: git-minimal: Add ‘upstream-name’ property., guix-commits, 2024/12/01
- 08/16: gnu-maintenance: ‘gnu-ftp’ updater excludes GnuPG-hosted packages., guix-commits, 2024/12/01
- 10/16: gnu: gnutls: Change release monitoring URL., guix-commits, 2024/12/01
- 09/16: gnu: Update updater properties for GnuPG-related packages., guix-commits, 2024/12/01
- 14/16: transformations: ‘package-with-upstream-version’ can preserve patches., guix-commits, 2024/12/01
- 12/16: gnu-maintenance: ‘generic-html’ update honors <base href="…">., guix-commits, 2024/12/01
- 03/16: gnu-maintenance: Savannah/Xorg updaters no longer abort on network errors., guix-commits, 2024/12/01
- 13/16: guix build: Validate that the file passed to ‘-m’ returns a manifest.,
guix-commits <=