unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Wojtek Kosior via Guix-patches via <guix-patches@gnu.org>
To: 70245@debbugs.gnu.org
Cc: "Wojtek Kosior" <koszko@koszko.org>,
	"Christopher Baines" <guix@cbaines.net>,
	"Josselin Poiret" <dev@jpoiret.xyz>,
	"Ludovic Courtès" <ludo@gnu.org>,
	"Mathieu Othacehe" <othacehe@gnu.org>,
	"Ricardo Wurmus" <rekado@elephly.net>,
	"Simon Tournier" <zimon.toutoune@gmail.com>,
	"Tobias Geerinckx-Rice" <me@tobias.gr>
Subject: [bug#70245] [PATCH 1/2] scripts: system: Rename `sqlite-register'.
Date: Sat,  6 Apr 2024 22:37:07 +0200	[thread overview]
Message-ID: <56efa64d914f75e8bb147b1f4b46bb1f21efc78b.1712435265.git.koszko@koszko.org> (raw)
In-Reply-To: <cover.1712435265.git.koszko@koszko.org>

* 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





  reply	other threads:[~2024-04-06 21:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-06 20:30 [bug#70245] [PATCH 0/2] Finalize renaming of `sqlite-register' (fix `guix system init') Wojtek Kosior via Guix-patches via
2024-04-06 20:37 ` Wojtek Kosior via Guix-patches via [this message]
2024-04-06 20:37 ` [bug#70245] [PATCH 2/2] store: database: Use correct function name in assertion Wojtek Kosior via Guix-patches via
2024-04-07 21:13 ` [bug#70245] [PATCH 0/2] Finalize renaming of `sqlite-register' (fix `guix system init') Tomas Volf
2024-04-08 14:54 ` bug#70245: " Christopher Baines

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56efa64d914f75e8bb147b1f4b46bb1f21efc78b.1712435265.git.koszko@koszko.org \
    --to=guix-patches@gnu.org \
    --cc=70245@debbugs.gnu.org \
    --cc=dev@jpoiret.xyz \
    --cc=guix@cbaines.net \
    --cc=koszko@koszko.org \
    --cc=ludo@gnu.org \
    --cc=me@tobias.gr \
    --cc=othacehe@gnu.org \
    --cc=rekado@elephly.net \
    --cc=zimon.toutoune@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).