[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#30409] [PATCH 1/2] guix: Add option --manifest to guix pack
From: |
Ludovic Courtès |
Subject: |
[bug#30409] [PATCH 1/2] guix: Add option --manifest to guix pack |
Date: |
Thu, 15 Feb 2018 15:19:04 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) |
Hi Konrad,
Konrad Hinsen <address@hidden> skribis:
> * guix/scripts/pack.scm: Extend the way the manifest for the archive
> contents is created. If the --manifest option is given, read the
> manifest from the provided file. Otherwise, create the manifest from
> a package list as before. Check if both a manifest file and a package list
> were given, which is an error.
Awesome! I took the liberty to make the changes below (let me know if
anything’s amiss!), and adjusted the commit log to match our
conventions.
Thanks,
Ludo’.
diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm
index f772083c6..a1b839e9a 100644
--- a/guix/scripts/pack.scm
+++ b/guix/scripts/pack.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2015, 2017 Ludovic Courtès <address@hidden>
;;; Copyright © 2017 Efraim Flashner <address@hidden>
;;; Copyright © 2017 Ricardo Wurmus <address@hidden>
+;;; Copyright © 2018 Konrad Hinsen <address@hidden>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -347,6 +348,9 @@ Create a bundle of PACKAGE.\n"))
-C, --compression=TOOL compress using TOOL--e.g., \"lzip\""))
(display (G_ "
-S, --symlink=SPEC create symlinks to the profile according to SPEC"))
+ (display (G_ "
+ -m, --manifest=FILE create a new profile generation with the manifest
+ from FILE"))
(display (G_ "
--localstatedir include /var/guix in the resulting pack"))
(newline)
@@ -383,12 +387,12 @@ Create a bundle of PACKAGE.\n"))
(manifest-file (assoc-ref opts 'manifest)))
(cond
((and manifest-file (not (null? packages)))
- (leave (G_ "both a manifest and a package list were given")))
+ (leave (G_ "both a manifest and a package list were given~%")))
(manifest-file
- (let ((user-module (make-user-module '((guix profiles) (gnu)))))
+ (let ((user-module (make-user-module '((guix profiles) (gnu)))))
(load* manifest-file user-module)))
(else (packages->manifest packages)))))
-
+
(with-error-handling
(parameterize ((%graft? (assoc-ref opts 'graft?)))
(let* ((dry-run? (assoc-ref opts 'dry-run?))