civodul pushed a commit to branch wip-guix-index
in repository guix.
commit 7a778d299470db2cae8804aa7e2cd3a6baeaa309
Author: Ludovic Courtès <[email protected]>
AuthorDate: Sun May 21 17:48:46 2023 +0200
squash! Do not insert the same directory more than once.
---
guix/scripts/index.scm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/guix/scripts/index.scm b/guix/scripts/index.scm
index 4ff3433c75..37f1ef9c15 100644
--- a/guix/scripts/index.scm
+++ b/guix/scripts/index.scm
@@ -158,7 +158,7 @@ SELECT id FROM Packages WHERE name = :name AND version =
:version LIMIT 1;"
(define stmt-insert-package
(sqlite-prepare db "\
-INSERT OR REPLACE INTO Packages(name, version, output)
+INSERT OR IGNORE INTO Packages(name, version, output)
VALUES (:name, :version, :output);"
#:cache? #t))
@@ -308,6 +308,7 @@ for each package to insert."
"Index packages entries into FILE from the system manifests."
(call-with-database file
(lambda (db)
+ (info (G_ "traversing local profile manifests...~%"))
(let ((entries (profiles->manifest-entries (all-profiles))))
(insert-packages-with-progress db entries insert-manifest-entry)))))