pack: Extract populate-profile-root from self-contained-tarball/builder.
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>
Wed, 1 Feb 2023 20:53:14 +0000 (15:53 -0500)
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>
Mon, 20 Feb 2023 02:13:23 +0000 (21:13 -0500)
commit68380db4c40a2ee1156349a87254fd7b1f1a52d5
tree340cd958e455bf08e91c92d4266dea293147662d
parent68775338a510f84e63657ab09242d79e726fa457
pack: Extract populate-profile-root from self-contained-tarball/builder.

This allows more code to be reused between the various archive writers.

* guix/scripts/pack.scm (set-utf8-locale): New top-level procedure, extracted
from...
(populate-profile-root): New procedure, extracted from...
(self-contained-tarball/builder): ... here.  Add #:target argument.  Call
populate-profile-root.
[LOCALSTATEDIR?]: Set db.sqlite file permissions.
(self-contained-tarball): Call self-contained-tarball/builder with the TARGET
argument, and set #:local-build? to #f for the gexp-derivation call.  Remove
now extraneous #:target and #:references-graphs arguments from the
gexp->derivation call.
(debian-archive): Call self-contained-tarball/builder with the #:target
argument.  Fix indentation.  Remove now extraneous #:target and
 #:references-graphs arguments from the gexp->derivation call.
guix/scripts/pack.scm