GNU bug report logs - #70245
[PATCH 0/2] Finalize renaming of `sqlite-register' (fix `guix system init')

Previous Next

Package: guix-patches;

Reported by: Wojtek Kosior <koszko <at> koszko.org>

Date: Sat, 6 Apr 2024 20:36:01 UTC

Severity: normal

Tags: patch

Done: Christopher Baines <mail <at> cbaines.net>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 70245 <at> debbugs.gnu.org (full text, mbox):

From: Wojtek Kosior <koszko <at> koszko.org>
To: 70245 <at> debbugs.gnu.org
Cc: Wojtek Kosior <koszko <at> koszko.org>
Subject: [PATCH 1/2] scripts: system: Rename `sqlite-register'.
Date: Sat,  6 Apr 2024 22:37:07 +0200
* guix/scripts/system.scm (define-module): #:autoload `register-valid-path'
  instead of `sqlite-register'.
  (copy-item): Call it with the new name.

Change-Id: I24f71f822a5f400a47adee43f61184a4fbcb9741
---
 guix/scripts/system.scm | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
index bf3d2f9044..67020a2aab 100644
--- a/guix/scripts/system.scm
+++ b/guix/scripts/system.scm
@@ -35,7 +35,7 @@ (define-module (guix scripts system)
   #:use-module (guix store)
   #:autoload   (guix base16) (bytevector->base16-string)
   #:autoload   (guix store database)
-               (sqlite-register store-database-file call-with-database)
+               (register-valid-path store-database-file call-with-database)
   #:autoload   (guix build store-copy) (copy-store-item)
   #:use-module (guix describe)
   #:use-module (guix gexp)
@@ -158,14 +158,15 @@ (define* (copy-item item info target db
     (copy-store-item item target
                      #:deduplicate? #t)
 
-    (sqlite-register db
-                     #:path item
-                     #:references (path-info-references info)
-                     #:deriver (path-info-deriver info)
-                     #:hash (string-append
-                             "sha256:"
-                             (bytevector->base16-string (path-info-hash info)))
-                     #:nar-size (path-info-nar-size info))))
+    (register-valid-path db
+                         #:path item
+                         #:references (path-info-references info)
+                         #:deriver (path-info-deriver info)
+                         #:hash (string-append
+                                 "sha256:"
+                                 (bytevector->base16-string
+                                  (path-info-hash info)))
+                         #:nar-size (path-info-nar-size info))))
 
 (define* (copy-closure item target
                        #:key (log-port (current-error-port)))
-- 
2.41.0





This bug report was last modified 1 year and 41 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.