From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34876) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRDob-0008CV-3d for guix-patches@gnu.org; Fri, 08 Jun 2018 05:36:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fRDoX-0006mi-BG for guix-patches@gnu.org; Fri, 08 Jun 2018 05:36:10 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:59126) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fRDoX-0006mZ-7T for guix-patches@gnu.org; Fri, 08 Jun 2018 05:36:09 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fRDoX-0000dc-1m for guix-patches@gnu.org; Fri, 08 Jun 2018 05:36:09 -0400 Subject: [bug#31755] [PATCH 16/19] install: Use 'reset-timestamps' from (guix store database). Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Fri, 8 Jun 2018 11:34:48 +0200 Message-Id: <20180608093451.27760-16-ludo@gnu.org> In-Reply-To: <20180608093451.27760-1-ludo@gnu.org> References: <20180608093451.27760-1-ludo@gnu.org> 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: 31755@debbugs.gnu.org * gnu/build/install.scm (reset-timestamps): Remove. * gnu/build/vm.scm: Use 'reset-timestamps' from (guix store database). --- gnu/build/install.scm | 15 --------------- gnu/build/vm.scm | 1 + guix/store/database.scm | 1 - 3 files changed, 1 insertion(+), 16 deletions(-) diff --git a/gnu/build/install.scm b/gnu/build/install.scm index 82eb63d72..5e84cd6f6 100644 --- a/gnu/build/install.scm +++ b/gnu/build/install.scm @@ -26,7 +26,6 @@ #:export (install-boot-config evaluate-populate-directive populate-root-file-system - reset-timestamps register-closure populate-single-profile-directory)) @@ -145,20 +144,6 @@ includes /etc, /var, /run, /bin/sh, etc., and all the symlinks to SYSTEM." (try)) (apply throw args))))))) -(define (reset-timestamps directory) - "Reset the timestamps of all the files under DIRECTORY, so that they appear -as created and modified at the Epoch." - (display "clearing file timestamps...\n") - (for-each (lambda (file) - (let ((s (lstat file))) - ;; XXX: Guile uses libc's 'utime' function (not 'futime'), so - ;; the timestamp of symlinks cannot be changed, and there are - ;; symlinks here pointing to /gnu/store, which is the host, - ;; read-only store. - (unless (eq? (stat:type s) 'symlink) - (utime file 0 0 0 0)))) - (find-files directory #:directories? #t))) - (define* (register-closure prefix closure #:key (deduplicate? #t) (reset-timestamps? #t) diff --git a/gnu/build/vm.scm b/gnu/build/vm.scm index 37639f723..803cd5996 100644 --- a/gnu/build/vm.scm +++ b/gnu/build/vm.scm @@ -25,6 +25,7 @@ #:use-module (guix build utils) #:use-module (guix build store-copy) #:use-module (guix build syscalls) + #:use-module ((guix store database) #:select (reset-timestamps)) #:use-module (gnu build linux-boot) #:use-module (gnu build install) #:use-module (gnu system uuid) diff --git a/guix/store/database.scm b/guix/store/database.scm index 3dbe5270a..82938455b 100644 --- a/guix/store/database.scm +++ b/guix/store/database.scm @@ -183,7 +183,6 @@ Every store item in REFERENCES must already be registered." ;;; High-level interface. ;;; -;; TODO: Factorize with that in (gnu build install). (define (reset-timestamps file) "Reset the modification time on FILE and on all the files it contains, if it's a directory. While at it, canonicalize file permissions." -- 2.17.1