[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
279/285: guix package: Save provenance information when using '--manifes
From: |
guix-commits |
Subject: |
279/285: guix package: 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 add5f774b3be346e1bfa809552b8d768e81c43ca
Author: Ludovic Courtès <address@hidden>
Date: Sun Dec 29 16:22:35 2019 +0100
guix package: Save provenance information when using '--manifest'.
Fixes <https://bugs.gnu.org/38673>.
Reported by zimoun <address@hidden>.
* guix/describe.scm (manifest-entry-with-provenance): New procedure.
* guix/scripts/package.scm (process-actions): Use it when FILES is
non-empty.
---
guix/describe.scm | 18 +++++++++++++++++-
guix/scripts/package.scm | 7 +++++--
2 files changed, 22 insertions(+), 3 deletions(-)
diff --git a/guix/describe.scm b/guix/describe.scm
index 893dca2..6b9b219 100644
--- a/guix/describe.scm
+++ b/guix/describe.scm
@@ -30,7 +30,8 @@
current-profile-entries
package-path-entries
- package-provenance))
+ package-provenance
+ manifest-entry-with-provenance))
;;; Commentary:
;;;
@@ -144,3 +145,18 @@ property of manifest entries, or #f if it could not be
determined."
(and main
`(,main
,@(if extra (list extra) '()))))))))))
+
+(define (manifest-entry-with-provenance entry)
+ "Return ENTRY with an additional 'provenance' property if it's not already
+there."
+ (let ((properties (manifest-entry-properties entry)))
+ (if (assq 'properties properties)
+ entry
+ (let ((item (manifest-entry-item entry)))
+ (manifest-entry
+ (inherit entry)
+ (properties
+ (match (and (package? item) (package-provenance item))
+ (#f properties)
+ (sexp `((provenance ,@sexp)
+ ,@properties)))))))))
diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm
index 92c6e34..ea16435 100644
--- a/guix/scripts/package.scm
+++ b/guix/scripts/package.scm
@@ -38,7 +38,7 @@
#:use-module (guix config)
#:use-module (guix scripts)
#:use-module (guix scripts build)
- #:autoload (guix describe) (package-provenance)
+ #:use-module (guix describe)
#:autoload (guix store roots) (gc-roots)
#:use-module ((guix build utils)
#:select (directory-exists? mkdir-p))
@@ -883,7 +883,10 @@ processed, #f otherwise."
opts))
(manifest (match files
(() (profile-manifest profile))
- (_ (concatenate-manifests (map load-manifest files)))))
+ (_ (map-manifest-entries
+ manifest-entry-with-provenance
+ (concatenate-manifests
+ (map load-manifest files))))))
(step1 (options->removable opts manifest
(manifest-transaction)))
(step2 (options->installable opts manifest step1))
- 285/285: gnu: guix-data-service: Update to 0.0.1-13.82b797e., (continued)
- 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, 2019/12/29
- 279/285: guix package: Save provenance information when using '--manifest'.,
guix-commits <=
- 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
- 127/285: gnu: chez-scheme: Update home-page., guix-commits, 2019/12/29