From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34770) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRDoV-00089K-AC for guix-patches@gnu.org; Fri, 08 Jun 2018 05:36:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fRDoT-0006Yf-GK for guix-patches@gnu.org; Fri, 08 Jun 2018 05:36:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:59117) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fRDoT-0006XV-AN for guix-patches@gnu.org; Fri, 08 Jun 2018 05:36:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fRDoT-0000cW-3T for guix-patches@gnu.org; Fri, 08 Jun 2018 05:36:05 -0400 Subject: [bug#31755] [PATCH 09/19] database: Add #:reset-timestamps? to 'register-path'. Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Fri, 8 Jun 2018 11:34:41 +0200 Message-Id: <20180608093451.27760-9-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 * guix/store/database.scm (register-path): Add #:reset-timestamps? and honor it. --- guix/store/database.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/guix/store/database.scm b/guix/store/database.scm index b9170dda7..bfd2c3626 100644 --- a/guix/store/database.scm +++ b/guix/store/database.scm @@ -225,6 +225,7 @@ it's a directory." (define* (register-path path #:key (references '()) deriver prefix state-directory (deduplicate? #t) + (reset-timestamps? #t) (schema (sql-schema))) ;; Priority for options: first what is given, then environment variables, ;; then defaults. %state-directory, %store-directory, and @@ -268,7 +269,8 @@ be used internally by the daemon's build hook." (real-path (string-append store-dir "/" (basename path)))) (let-values (((hash nar-size) (nar-sha256 real-path))) - (reset-timestamps real-path) + (when reset-timestamps? + (reset-timestamps real-path)) (mkdir-p db-dir) (sqlite-register #:db-file (string-append db-dir "/db.sqlite") -- 2.17.1