* [bug#70245] [PATCH 0/2] Finalize renaming of `sqlite-register' (fix `guix system init')
@ 2024-04-06 20:30 Wojtek Kosior via Guix-patches via
2024-04-06 20:37 ` [bug#70245] [PATCH 1/2] scripts: system: Rename `sqlite-register' Wojtek Kosior via Guix-patches via
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Wojtek Kosior via Guix-patches via @ 2024-04-06 20:30 UTC (permalink / raw)
To: 70245
Cc: Wojtek Kosior, Christopher Baines, Josselin Poiret,
Ludovic Courtès, Mathieu Othacehe, Ricardo Wurmus,
Simon Tournier, Tobias Geerinckx-Rice
Recently, guix/store/database.scm had function `sqlite-register' renamed but the
old name kept being used elsewhere, causing breakage.
Wojtek Kosior (2):
scripts: system: Rename `sqlite-register'.
store: database: Use correct function name in assertion.
guix/scripts/system.scm | 19 ++++++++++---------
guix/store/database.scm | 5 +++--
2 files changed, 13 insertions(+), 11 deletions(-)
base-commit: 7988ca6a480a7648971c06edc0dfb8da6fd0777b
--
2.41.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [bug#70245] [PATCH 1/2] scripts: system: Rename `sqlite-register'.
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
2024-04-06 20:37 ` [bug#70245] [PATCH 2/2] store: database: Use correct function name in assertion Wojtek Kosior via Guix-patches via
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Wojtek Kosior via Guix-patches via @ 2024-04-06 20:37 UTC (permalink / raw)
To: 70245
Cc: Wojtek Kosior, Christopher Baines, Josselin Poiret,
Ludovic Courtès, Mathieu Othacehe, Ricardo Wurmus,
Simon Tournier, Tobias Geerinckx-Rice
* 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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [bug#70245] [PATCH 2/2] store: database: Use correct function name in assertion.
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 ` [bug#70245] [PATCH 1/2] scripts: system: Rename `sqlite-register' Wojtek Kosior via Guix-patches via
@ 2024-04-06 20:37 ` 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
3 siblings, 0 replies; 5+ messages in thread
From: Wojtek Kosior via Guix-patches via @ 2024-04-06 20:37 UTC (permalink / raw)
To: 70245
Cc: Wojtek Kosior, Christopher Baines, Josselin Poiret,
Ludovic Courtès, Mathieu Othacehe, Ricardo Wurmus,
Simon Tournier, Tobias Geerinckx-Rice
* guix/store/database.scm (register-valid-path): Replace "sqlite-register"
with "register-valid-path" as argument to `assert-integer'.
Change-Id: Id93687e90d0a806d715006ca0b2498a1d10cfba6
---
guix/store/database.scm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/guix/store/database.scm b/guix/store/database.scm
index 58d3871e85..a847f9d2f0 100644
--- a/guix/store/database.scm
+++ b/guix/store/database.scm
@@ -247,8 +247,9 @@ (define* (register-valid-path db #:key path (references '())
(time-second time))
;; Make sure NAR-SIZE is valid.
- (assert-integer "sqlite-register" positive? #:nar-size nar-size)
- (assert-integer "sqlite-register" (cut >= <> 0) #:time registration-time)
+ (assert-integer "register-valid-path" positive? #:nar-size nar-size)
+ (assert-integer "register-valid-path" (cut >= <> 0)
+ #:time registration-time)
(define id
(let ((existing-id (valid-path-id db path)))
--
2.41.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [bug#70245] [PATCH 0/2] Finalize renaming of `sqlite-register' (fix `guix system init')
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 ` [bug#70245] [PATCH 1/2] scripts: system: Rename `sqlite-register' Wojtek Kosior via Guix-patches via
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 ` Tomas Volf
2024-04-08 14:54 ` bug#70245: " Christopher Baines
3 siblings, 0 replies; 5+ messages in thread
From: Tomas Volf @ 2024-04-07 21:13 UTC (permalink / raw)
To: 70245
[-- Attachment #1: Type: text/plain, Size: 276 bytes --]
Hello,
just confirming that this is indeed a problem, I hit this yesterday[0].
Tomas
0: https://github.com/vpsfreecz/vpsadminos/pull/66#issuecomment-2041177372
--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#70245: [PATCH 0/2] Finalize renaming of `sqlite-register' (fix `guix system init')
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
` (2 preceding siblings ...)
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 ` Christopher Baines
3 siblings, 0 replies; 5+ messages in thread
From: Christopher Baines @ 2024-04-08 14:54 UTC (permalink / raw)
To: Wojtek Kosior; +Cc: 70245-done
[-- Attachment #1: Type: text/plain, Size: 579 bytes --]
Wojtek Kosior <koszko@koszko.org> writes:
> Recently, guix/store/database.scm had function `sqlite-register' renamed but the
> old name kept being used elsewhere, causing breakage.
>
> Wojtek Kosior (2):
> scripts: system: Rename `sqlite-register'.
> store: database: Use correct function name in assertion.
>
> guix/scripts/system.scm | 19 ++++++++++---------
> guix/store/database.scm | 5 +++--
> 2 files changed, 13 insertions(+), 11 deletions(-)
I forgot to update the issue, but I pushed these patches to master as
c3dfb14f9be7479057036d3fe7744828d2c1a31a.
Chris
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 987 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-04-08 14:55 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [bug#70245] [PATCH 1/2] scripts: system: Rename `sqlite-register' Wojtek Kosior via Guix-patches via
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
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).