From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53522) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eooFO-00039f-3a for guix-patches@gnu.org; Thu, 22 Feb 2018 05:37:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eooFK-0002uo-Ve for guix-patches@gnu.org; Thu, 22 Feb 2018 05:37:06 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:47421) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eooFK-0002uO-Rh for guix-patches@gnu.org; Thu, 22 Feb 2018 05:37:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eooFK-0006sI-Kz for guix-patches@gnu.org; Thu, 22 Feb 2018 05:37:02 -0500 Subject: [bug#30572] [PATCH 2/7] vm: Allow control of deduplication in root-partition-initializer. Resent-Message-ID: From: Chris Marusich Date: Thu, 22 Feb 2018 11:35:23 +0100 Message-Id: <20180222103528.5108-2-cmmarusich@gmail.com> In-Reply-To: <20180222103528.5108-1-cmmarusich@gmail.com> References: <20180222103528.5108-1-cmmarusich@gmail.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 30572@debbugs.gnu.org Cc: Chris Marusich * gnu/build/vm.scm (root-partition-initializer): Add #:deduplicate? keyword argument. --- gnu/build/vm.scm | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/gnu/build/vm.scm b/gnu/build/vm.scm index fe003ea45..6196b56ca 100644 --- a/gnu/build/vm.scm +++ b/gnu/build/vm.scm @@ -318,11 +318,14 @@ it, run its initializer, and unmount it." (define* (root-partition-initializer #:key (closures '()) copy-closures? (register-closures? #t) - system-directory) + system-directory + (deduplicate? #t)) "Return a procedure to initialize a root partition. -If REGISTER-CLOSURES? is true, register all of CLOSURES is the partition's -store. If COPY-CLOSURES? is true, copy all of CLOSURES to the partition. +If REGISTER-CLOSURES? is true, register all of CLOSURES in the partition's +store. If DEDUPLICATE? is true, then also deduplicate files common to +CLOSURES and the rest of the store when registering the closures. If +COPY-CLOSURES? is true, copy all of CLOSURES to the partition. SYSTEM-DIRECTORY is the name of the directory of the 'system' derivation." (lambda (target) (define target-store @@ -347,7 +350,8 @@ SYSTEM-DIRECTORY is the name of the directory of the 'system' derivation." (display "registering closures...\n") (for-each (lambda (closure) (register-closure target - (string-append "/xchg/" closure))) + (string-append "/xchg/" closure) + #:deduplicate? deduplicate?)) closures) (unless copy-closures? (umount target-store))) -- 2.15.1