[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#74542] [PATCH 10/11] guix build: Validate that the file passed to ‘
From: |
Ludovic Courtès |
Subject: |
[bug#74542] [PATCH 10/11] guix build: Validate that the file passed to ‘-m’ returns a manifest. |
Date: |
Tue, 26 Nov 2024 11:33:49 +0100 |
* 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 565bfd48e9..1b0b006ad5 100644
--- a/guix/scripts/build.scm
+++ b/guix/scripts/build.scm
@@ -629,6 +629,12 @@ (define-public my-package
(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)))
@@ -699,9 +705,11 @@ (define-public my-package
(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
--
2.46.0
- [bug#74542] [PATCH 02/11] gnu-maintenance: ‘import-html-release’ doesn’t abort upon HTTP 404., (continued)
[bug#74542] [PATCH 04/11] build: Add ‘--development’ option., Ludovic Courtès, 2024/11/26
[bug#74542] [PATCH 01/11] transformations: Export ‘package-with-upstream-version’., Ludovic Courtès, 2024/11/26
[bug#74542] [PATCH 03/11] gnu-maintenance: Savannah/Xorg updaters no longer abort on network errors., Ludovic Courtès, 2024/11/26
[bug#74542] [PATCH 08/11] gnu-maintenance: ‘gnu-ftp’ updater excludes GnuPG-hosted packages., Ludovic Courtès, 2024/11/26
[bug#74542] [PATCH 10/11] guix build: Validate that the file passed to ‘-m’ returns a manifest.,
Ludovic Courtès <=
[bug#74542] [PATCH 09/11] gnu: Update updater properties for GnuPG-related packages., Ludovic Courtès, 2024/11/26
[bug#74542] [PATCH 11/11] etc: Add upgrade manifest., Ludovic Courtès, 2024/11/26
[bug#74542] [PATCH 00/11] Improved tooling for package updates, Ludovic Courtès, 2024/11/26
[bug#74542] [PATCH 00/11] Improved tooling for package updates, Simon Tournier, 2024/11/26