aboutsummaryrefslogtreecommitdiff
path: root/guix/discovery.scm
diff options
context:
space:
mode:
authorRobert Vollmert <rob@vllmrt.net>2019-05-25 08:40:38 +0200
committerLudovic Courtès <ludo@gnu.org>2019-05-26 23:02:02 +0200
commit002d17dcaacba0f86265b34f2509419d9e21224d (patch)
tree3b436b8af5354197965f34565f6156ae874c7c20 /guix/discovery.scm
parentdfc69e4b6d4bbc41a4d37b3cc6ea12adb34aaafa (diff)
downloadguix-002d17dcaacba0f86265b34f2509419d9e21224d.tar
guix-002d17dcaacba0f86265b34f2509419d9e21224d.tar.gz
discovery: 'all-modules' returns modules in path order.
A particular effect of this is that if there are ambiguous packages in a directory specified with `-L module_dir` and the distribution, the version from `module_dir` will be loaded, which is usually what would be expected. (E.g. for `guix build` or `guix package -i`.) * guix/discovery.scm (all-modules): Return modules in path order. * tests/guix-package.sh: Test local definitions take precedence. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'guix/discovery.scm')
-rw-r--r--guix/discovery.scm4
1 files changed, 2 insertions, 2 deletions
diff --git a/guix/discovery.scm b/guix/discovery.scm
index ef5ae73973..5bb494941b 100644
--- a/guix/discovery.scm
+++ b/guix/discovery.scm
@@ -145,8 +145,8 @@ Call (PROC MODULE RESULT) for each module that is found."
"Return the list of package modules found in PATH, a list of directories to
search. Entries in PATH can be directory names (strings) or (DIRECTORY
. SUB-DIRECTORY) pairs, in which case modules are searched for beneath
-SUB-DIRECTORY."
- (fold-modules cons '() path #:warn warn))
+SUB-DIRECTORY. Modules are listed in the order they appear on the path."
+ (reverse (fold-modules cons '() path #:warn warn)))
(define (fold-module-public-variables* proc init modules)
"Call (PROC MODULE SYMBOL VARIABLE) for each variable exported by one of MODULES,