[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
280/285: pack: Save provenance information when using '--manifest'.
From: |
guix-commits |
Subject: |
280/285: pack: Save provenance information when using '--manifest'. |
Date: |
Sun, 29 Dec 2019 20:44:47 -0500 (EST) |
kkebreau pushed a commit to branch wip-gnome3.34
in repository guix.
commit 4c0d46f6df9d0dcc053cca9ac3f58982d7592a84
Author: Ludovic Courtès <address@hidden>
Date: Sun Dec 29 16:51:15 2019 +0100
pack: Save provenance information when using '--manifest'.
* guix/scripts/pack.scm (guix-pack)[manifest-from-args]: Remove
'provenance', and add 'with-provenance' procedure. Wrap 'cond' form in
'with-provenance'.
---
guix/scripts/pack.scm | 54 ++++++++++++++++++++++++---------------------------
1 file changed, 25 insertions(+), 29 deletions(-)
diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm
index 536cc17..b84e37c 100644
--- a/guix/scripts/pack.scm
+++ b/guix/scripts/pack.scm
@@ -974,36 +974,32 @@ Create a bundle of PACKAGE.\n"))
(('manifest . file) file)
(_ #f))
opts)))
- (define properties
+ (define with-provenance
(if (assoc-ref opts 'save-provenance?)
- (lambda (package)
- (match (package-provenance package)
- (#f
- (warning (G_ "could not determine provenance of package ~a~%")
- (package-full-name package))
- '())
- (sexp
- `((provenance . ,sexp)))))
- (const '())))
-
- (cond
- ((and (not (null? manifests)) (not (null? packages)))
- (leave (G_ "both a manifest and a package list were given~%")))
- ((not (null? manifests))
- (concatenate-manifests
- (map (lambda (file)
- (let ((user-module (make-user-module
- '((guix profiles) (gnu)))))
- (load* file user-module)))
- manifests)))
- (else
- (manifest
- (map (match-lambda
- ((package output)
- (package->manifest-entry package output
- #:properties
- (properties package))))
- packages))))))
+ (lambda (manifest)
+ (map-manifest-entries
+ (lambda (entry)
+ (let ((entry (manifest-entry-with-provenance entry)))
+ (unless (assq 'provenance (manifest-entry-properties entry))
+ (warning (G_ "could not determine provenance of package
~a~%")
+ (manifest-entry-name entry)))
+ entry))
+ manifest))
+ identity))
+
+ (with-provenance
+ (cond
+ ((and (not (null? manifests)) (not (null? packages)))
+ (leave (G_ "both a manifest and a package list were given~%")))
+ ((not (null? manifests))
+ (concatenate-manifests
+ (map (lambda (file)
+ (let ((user-module (make-user-module
+ '((guix profiles) (gnu)))))
+ (load* file user-module)))
+ manifests)))
+ (else
+ (packages->manifest packages))))))
(with-error-handling
(with-store store
- 272/285: gnu: portaudio: Fix build., (continued)
- 272/285: gnu: portaudio: Fix build., guix-commits, 2019/12/29
- 285/285: gnu: guix-data-service: Update to 0.0.1-13.82b797e., guix-commits, 2019/12/29
- 282/285: services: dhcp-client: Ignore interfaces that cannot be activated., guix-commits, 2019/12/29
- 262/285: gnu: ruby-ae: Don't use unstable tarball., guix-commits, 2019/12/29
- 266/285: gnu: ruby-oj: Don't use unstable tarball., guix-commits, 2019/12/29
- 270/285: gnu: pelican: Update to 4.2., guix-commits, 2019/12/29
- 265/285: gnu: ruby-spring: Don't use unstable tarball., guix-commits, 2019/12/29
- 277/285: git-authenticate: Add glv to the list of committers., guix-commits, 2019/12/29
- 273/285: gnu: gnome: Update dependencies., guix-commits, 2019/12/29
- 274/285: gnu: gnome: Sort packages logically., guix-commits, 2019/12/29
- 280/285: pack: Save provenance information when using '--manifest'.,
guix-commits <=
- 279/285: guix package: Save provenance information when using '--manifest'., guix-commits, 2019/12/29
- 283/285: installer: Pass '--fallback' to 'guix system init'., guix-commits, 2019/12/29
- 80/285: gnu: python-sphinxcontrib-programoutput: Update to 0.15., guix-commits, 2019/12/29
- 84/285: gnu: python-sphinxcontrib-svg2pdfconverter: Reflow description., guix-commits, 2019/12/29
- 240/285: gnu: emacs-graphviz-dot-mode: Update to 0.4.1., guix-commits, 2019/12/29
- 01/285: gnu: sbcl-cl-store: Update to 0.8.11-1., guix-commits, 2019/12/29
- 75/285: gnu: python-sphinx: Alphabetize inputs., guix-commits, 2019/12/29
- 82/285: gnu: python-sphinxcontrib-svg2pdfconverter: Update to 1.0.1., guix-commits, 2019/12/29
- 90/285: gnu: python-numba: Update to 0.46.0., guix-commits, 2019/12/29
- 92/285: gnu: Add python-pathtools., guix-commits, 2019/12/29