From 08fa76131e71dc12f5d669480d74e9183008d71a Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 17 Jun 2015 09:49:22 +0200 Subject: install: Turn off deduplication for the binary tarball. * gnu/build/install.scm (register-closure): Add #:deduplicate? parameter and honor it. (populate-single-profile-directory): Likewise. * gnu/system/install.scm (self-contained-tarball): Pass #:deduplicate? #f. Invoke tar with --check-links. --- gnu/build/install.scm | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'gnu/build') diff --git a/gnu/build/install.scm b/gnu/build/install.scm index 32fbe8efbc..9085e22e09 100644 --- a/gnu/build/install.scm +++ b/gnu/build/install.scm @@ -161,20 +161,27 @@ (define (reset-timestamps directory) (utime file 0 0 0 0)))) (find-files directory ""))) -(define (register-closure store closure) +(define* (register-closure store closure + #:key (deduplicate? #t)) "Register CLOSURE in STORE, where STORE is the directory name of the target store and CLOSURE is the name of a file containing a reference graph as used -by 'guix-register'. As a side effect, this resets timestamps on store files." - (let ((status (system* "guix-register" "--prefix" store - closure))) +by 'guix-register'. As a side effect, this resets timestamps on store files +and, if DEDUPLICATE? is true, deduplicates files common to CLOSURE and the +rest of STORE." + (let ((status (apply system* "guix-register" "--prefix" store + (append (if deduplicate? '() '("--no-deduplication")) + (list closure))))) (unless (zero? status) (error "failed to register store items" closure)))) (define* (populate-single-profile-directory directory - #:key profile closure) + #:key profile closure + deduplicate?) "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. +DEDUPLICATE? determines whether to deduplicate files in the store. + This is used to create the self-contained Guix tarball." (define (scope file) (string-append directory "/" file)) @@ -190,7 +197,8 @@ (define (symlink* old new) ;; Populate the store. (populate-store (list closure) directory) - (register-closure (canonicalize-path directory) closure) + (register-closure (canonicalize-path directory) closure + #:deduplicate? deduplicate?) ;; XXX: 'guix-register' registers profiles as GC roots but the symlink ;; target uses $TMPDIR. Fix that. -- cgit v1.2.3