all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#32174] [PATCH 0/6] Add 'add-file-tree-to-store' and related facilities
@ 2018-07-16 13:30 Ludovic Courtès
  2018-07-16 13:33 ` [bug#32174] [PATCH 1/6] serialization: Add 'write-file-tree' 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
  0 siblings, 2 replies; 8+ messages in thread
From: Ludovic Courtès @ 2018-07-16 13:30 UTC (permalink / raw)
  To: 32174

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-07-19  9:58 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-16 13:30 [bug#32174] [PATCH 0/6] Add 'add-file-tree-to-store' and related facilities Ludovic Courtès
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

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.