guix package: Honor the order of profiles when -p appears multiple times.

* guix/scripts/package.scm (process-query): Reverse the order of
PROFILES.
* tests/guix-package-net.sh: Test it with '--search-paths'.
This commit is contained in:
Ludovic Courtès 2017-01-22 22:25:26 +01:00
parent 08a78c2fde
commit c5746f2399
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
2 changed files with 4 additions and 4 deletions

View File

@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
;;; Copyright © 2013, 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2014, 2016 Alex Kost <alezost@gmail.com>
@ -666,7 +666,7 @@ processed, #f otherwise."
(_ #f))
opts)
(() (list %current-profile))
(lst lst)))
(lst (reverse lst))))
(profile (match profiles
((head tail ...) head))))
(match (assoc-ref opts 'query)

View File

@ -1,5 +1,5 @@
# GNU Guix --- Functional package management for GNU
# Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
# Copyright © 2012, 2013, 2014, 2015, 2017 Ludovic Courtès <ludo@gnu.org>
# Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
#
# This file is part of GNU Guix.
@ -165,7 +165,7 @@ guix package --bootstrap -p "$profile_alt" -i gcc-bootstrap
if guix package -p "$profile" --search-paths | grep LIBRARY_PATH
then false; fi
guix package -p "$profile" -p "$profile_alt" --search-paths \
| grep "LIBRARY_PATH.*$profile/lib"
| grep "LIBRARY_PATH.*$profile/lib.$profile_alt/lib"
#
# Try with the default profile.