summary refs log tree commit diff
path: root/gnu/packages.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2020-01-17 11:19:42 +0100
committerLudovic Courtès <ludo@gnu.org>2020-01-17 14:22:07 +0100
commit886a76073e4654449f413831897ffde736a07c91 (patch)
treea3084040926ba6f92d105b5494a6398daa4ecbdf /gnu/packages.scm
parentdf18ea6f275abaa160a8593accb29fd273d8fc13 (diff)
downloadguix-886a76073e4654449f413831897ffde736a07c91.tar.gz
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.
Diffstat (limited to 'gnu/packages.scm')
-rw-r--r--gnu/packages.scm3
1 files changed, 3 insertions, 0 deletions
diff --git a/gnu/packages.scm b/gnu/packages.scm
index 143469b288..d22c992bb1 100644
--- a/gnu/packages.scm
+++ b/gnu/packages.scm
@@ -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.