mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
pack: Move store database creation to a separate derivation.
* guix/scripts/pack.scm (store-database): New procedure. (self-contained-tarball): Use it when LOCALSTATEDIR? is true. Remove 'schema' and add 'database'. [build]: Pass DATABASE to 'populate-single-profile-directory'. (squashfs-image): Remove #:deduplicate? parameter. [build]: Remove (gnu build install) and (guix config) from the imported modules. Remove 'with-extensions'. * gnu/build/install.scm (populate-single-profile-directory): Remove #:deduplicate?, #:register?, and #:schema; add #:database. Remove call to 'register-closure' and simply copy DATABASE instead.
This commit is contained in:
parent
c6b05bacc0
commit
ec4c81fe32
2 changed files with 109 additions and 78 deletions
|
@ -161,14 +161,13 @@ 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)
|
||||
database)
|
||||
"Populate DIRECTORY with a store containing PROFILE, whose closure is given
|
||||
in the file called CLOSURE (as generated by #:references-graphs.) DIRECTORY
|
||||
is initialized to contain a single profile under /root pointing to PROFILE.
|
||||
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.
|
||||
|
||||
When DATABASE is true, copy it to DIRECTORY/var/guix/db and create
|
||||
DIRECTORY/var/guix/gcroots and friends.
|
||||
|
||||
PROFILE-NAME is the name of the profile being created under
|
||||
/var/guix/profiles, typically either \"guix-profile\" or \"current-guix\".
|
||||
|
@ -189,11 +188,9 @@ This is used to create the self-contained tarballs with 'guix pack'."
|
|||
;; Populate the store.
|
||||
(populate-store (list closure) directory)
|
||||
|
||||
(when register?
|
||||
(register-closure (canonicalize-path directory) closure
|
||||
#:deduplicate? deduplicate?
|
||||
#:schema schema)
|
||||
|
||||
(when database
|
||||
(install-file database (scope "/var/guix/db/"))
|
||||
(chmod (scope "/var/guix/db/db.sqlite") #o644)
|
||||
(mkdir-p* "/var/guix/profiles")
|
||||
(mkdir-p* "/var/guix/gcroots")
|
||||
(symlink* "/var/guix/profiles"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue