[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#32174] [PATCH 0/6] Add 'add-file-tree-to-store' and related facilit
From: |
Ludovic Courtès |
Subject: |
[bug#32174] [PATCH 0/6] Add 'add-file-tree-to-store' and related facilities |
Date: |
Mon, 16 Jul 2018 15:30:49 +0200 |
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
- [bug#32174] [PATCH 0/6] Add 'add-file-tree-to-store' and related facilities,
Ludovic Courtès <=
- [bug#32174] [PATCH 1/6] serialization: Add 'write-file-tree'., Ludovic Courtès, 2018/07/16
- [bug#32174] [PATCH 5/6] gexp: 'imported-files/derivation' can copy files instead of symlinking., Ludovic Courtès, 2018/07/16
- [bug#32174] [PATCH 3/6] gexp: Remove unnecessary 'mlet'., Ludovic Courtès, 2018/07/16
- [bug#32174] [PATCH 6/6] self: Use the new 'imported-files'., Ludovic Courtès, 2018/07/16
- [bug#32174] [PATCH 2/6] store: Add 'add-file-tree-to-store'., Ludovic Courtès, 2018/07/16
- [bug#32174] [PATCH 4/6] gexp: 'imported-files' no longer creates a derivation by default., Ludovic Courtès, 2018/07/16
- bug#32174: [PATCH 0/6] Add 'add-file-tree-to-store' and related facilities, Ludovic Courtès, 2018/07/19