packages: Prevent inlining of 'find-best-packages-by-name'.

This allows 'tests/packages.scm' to mock it.

* gnu/packages.scm (find-best-packages-by-name): Set! it at the top
level to prevent it from being inline on Guile 3.
This commit is contained in:
Ludovic Courtès 2020-01-17 11:19:42 +01:00
parent df18ea6f27
commit 886a76073e
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 3 additions and 0 deletions

View File

@ -369,6 +369,9 @@ VERSION."
(string=? (package-version p) highest))
matches))))))
;; Prevent Guile 3 from inlining this procedure so we can mock it in tests.
(set! find-best-packages-by-name find-best-packages-by-name)
(define (generate-package-cache directory)
"Generate under DIRECTORY a cache of all the available packages.