From: "Ludovic Courtès" <ludo@gnu.org>
To: 32174@debbugs.gnu.org
Subject: [bug#32174] [PATCH 0/6] Add 'add-file-tree-to-store' and related facilities
Date: Mon, 16 Jul 2018 15:30:49 +0200 [thread overview]
Message-ID: <20180716133049.15108-1-ludo@gnu.org> (raw)
Hello!
This patch changes some low-level machinery to allow “virtual file trees”
to be imported directly into the store.
Previously the ‘imported-files’ procedures (yeah, there’s a couple of
them…) would create a derivation that would map source files to their final
destination. Now, it directly imports files in the right place, thereby
avoiding a derivation. This is notably useful for (guix self), which
imports a large number of files.
Overall it can reduce the number of RPCs, too. For example:
--8<---------------cut here---------------start------------->8---
$ GUIX_PROFILING=rpc guix system build gnu/system/examples/bare-bones.tmpl -d --no-grafts
/gnu/store/wmv4ypapmzd2ynx6njayc3k87mc1gnjz-system.drv
Remote procedure call summary: 1930 RPCs
built-in-builders ... 1
add-to-store ... 183
add-text-to-store ... 1746
$ GUIX_PROFILING=rpc ./pre-inst-env guix system build gnu/system/examples/bare-bones.tmpl -d --no-grafts
/gnu/store/yy1js0wimwrdfah5n8sw14jh3dayn39k-system.drv
Remote procedure call summary: 1891 RPCs
built-in-builders ... 1
add-to-store/tree ... 15
add-to-store ... 162
add-text-to-store ... 1713
--8<---------------cut here---------------end--------------->8---
To avoid a full rebuild, this mechanism is currently disabled for package
builds, where we’d see a more noticeably difference. When we merge to
‘core-updates’, we’ll turn it on by default and remove the compatibility
hacks like the #:derivation? parameter.
Feedback welcome!
Ludo’.
Ludovic Courtès (6):
serialization: Add 'write-file-tree'.
store: Add 'add-file-tree-to-store'.
gexp: Remove unnecessary 'mlet'.
gexp: 'imported-files' no longer creates a derivation by default.
gexp: 'imported-files/derivation' can copy files instead of
symlinking.
self: Use the new 'imported-files'.
guix/gexp.scm | 143 +++++++++++++++++++++++++++++++++--------
guix/packages.scm | 3 +
guix/self.scm | 57 +++++++---------
guix/serialization.scm | 140 +++++++++++++++++++++++++++++++---------
guix/store.scm | 100 ++++++++++++++++++++++++++++
tests/gexp.scm | 31 ++++-----
tests/nar.scm | 62 +++++++++++++++++-
tests/store.scm | 46 +++++++++++++
8 files changed, 473 insertions(+), 109 deletions(-)
--
2.18.0
next reply other threads:[~2018-07-16 13:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-16 13:30 Ludovic Courtès [this message]
2018-07-16 13:33 ` [bug#32174] [PATCH 1/6] serialization: Add 'write-file-tree' Ludovic Courtès
2018-07-16 13:33 ` [bug#32174] [PATCH 2/6] store: Add 'add-file-tree-to-store' Ludovic Courtès
2018-07-16 13:33 ` [bug#32174] [PATCH 3/6] gexp: Remove unnecessary 'mlet' Ludovic Courtès
2018-07-16 13:33 ` [bug#32174] [PATCH 4/6] gexp: 'imported-files' no longer creates a derivation by default Ludovic Courtès
2018-07-16 13:33 ` [bug#32174] [PATCH 5/6] gexp: 'imported-files/derivation' can copy files instead of symlinking Ludovic Courtès
2018-07-16 13:33 ` [bug#32174] [PATCH 6/6] self: Use the new 'imported-files' Ludovic Courtès
2018-07-19 9:57 ` bug#32174: [PATCH 0/6] Add 'add-file-tree-to-store' and related facilities 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=20180716133049.15108-1-ludo@gnu.org \
--to=ludo@gnu.org \
--cc=32174@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.