From: "Ludovic Courtès" <ludo@gnu.org>
To: 33111@debbugs.gnu.org
Subject: [bug#33111] [PATCH 1/3] install: Parameterize the profile name for 'populate-single-profile-directory'.
Date: Sun, 21 Oct 2018 22:49:41 +0200 [thread overview]
Message-ID: <20181021204943.2142-1-ludo@gnu.org> (raw)
In-Reply-To: <20181021204506.1978-1-ludo@gnu.org>
* gnu/build/install.scm (populate-single-profile-directory): Add
#:profile-name. Replace hard-coded occurrences of "guix-profile" with
PROFILE-NAME. Make the symlink part under /root a function of
PROFILE-NAME.
---
gnu/build/install.scm | 24 ++++++++++++++++++------
1 file changed, 18 insertions(+), 6 deletions(-)
diff --git a/gnu/build/install.scm b/gnu/build/install.scm
index c602d6948..98c547f2e 100644
--- a/gnu/build/install.scm
+++ b/gnu/build/install.scm
@@ -160,6 +160,7 @@ deduplicates files common to CLOSURE and the rest of PREFIX."
(define* (populate-single-profile-directory directory
#:key profile closure
+ (profile-name "guix-profile")
deduplicate?
register? schema)
"Populate DIRECTORY with a store containing PROFILE, whose closure is given
@@ -169,6 +170,9 @@ When REGISTER? is true, initialize DIRECTORY/var/guix/db to reflect the
contents of the store; DEDUPLICATE? determines whether to deduplicate files in
the store.
+PROFILE-NAME is the name of the profile being created under
+/var/guix/profiles, typically either \"guix-profile\" or \"current-guix\".
+
This is used to create the self-contained tarballs with 'guix pack'."
(define (scope file)
(string-append directory "/" file))
@@ -198,12 +202,20 @@ This is used to create the self-contained tarballs with 'guix pack'."
;; Make root's profile, which makes it a GC root.
(mkdir-p* %root-profile)
(symlink* profile
- (string-append %root-profile "/guix-profile-1-link"))
- (symlink* "guix-profile-1-link"
- (string-append %root-profile "/guix-profile"))
+ (string-append %root-profile "/" profile-name "-1-link"))
+ (symlink* (string-append profile-name "-1-link")
+ (string-append %root-profile "/" profile-name))
- (mkdir-p* "/root")
- (symlink* (string-append %root-profile "/guix-profile")
- "/root/.guix-profile"))
+ (match profile-name
+ ("guix-profile"
+ (mkdir-p* "/root")
+ (symlink* (string-append %root-profile "/guix-profile")
+ "/root/.guix-profile"))
+ ("current-guix"
+ (mkdir-p* "/root/.config/guix")
+ (symlink* (string-append %root-profile "/current-guix")
+ "/root/.config/guix/current"))
+ (_
+ #t)))
;;; install.scm ends here
--
2.19.1
next prev parent reply other threads:[~2018-10-21 20:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-21 20:45 [bug#33111] [PATCH 0/3] Have the binary tarball populate ~root/.config/guix/current Ludovic Courtès
2018-10-21 20:49 ` Ludovic Courtès [this message]
2018-10-21 20:49 ` [bug#33111] [PATCH 2/3] pack: Add '--profile-name' Ludovic Courtès
2018-10-21 20:49 ` [bug#33111] [PATCH 3/3] build: Binary tarball now populates the "current-guix" profile Ludovic Courtès
2018-10-25 20:24 ` [bug#33111] [PATCH 0/3] Have the binary tarball populate ~root/.config/guix/current Ludovic Courtès
2018-10-26 5:33 ` Ricardo Wurmus
2018-10-26 9:57 ` Ludovic Courtès
2018-11-16 21:59 ` Ludovic Courtès
2018-11-23 14:43 ` bug#33111: " Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181021204943.2142-1-ludo@gnu.org \
--to=ludo@gnu.org \
--cc=33111@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.