1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-06 21:20:33 +02:00

packages: Remove duplicates from package cache.

Previously the same package could appear several times if several
variables were bound to it, as is notably the case for "python"
currently.  This, in turn, would lead to obnoxious "ambiguous package
specification" messages.

* gnu/packages.scm (generate-package-cache)[expand-cache]: Change RESULT
to RESULT+SEEN and adjust accordingly.
Call 'first' on the result of 'fold-module-public-variables*'.
* tests/packages.scm ("fold-available-packages with/without cache"):
Check for lack of duplicates in FROM-CACHE.
This commit is contained in:
Ludovic Courtès
2019-02-15 22:58:29 +01:00
parent ba48895899
commit 36754eee28
2 changed files with 32 additions and 24 deletions

View File

@@ -1037,7 +1037,8 @@
result))
'()))))))
(lset= equal? no-cache from-cache)))
(and (equal? (delete-duplicates from-cache) from-cache)
(lset= equal? no-cache from-cache))))
(test-assert "find-packages-by-name"
(match (find-packages-by-name "hello")