edit: Use 'specification->location' to read information from the cache.
authorLudovic Courtès <ludo@gnu.org>
Sun, 13 Jan 2019 13:27:10 +0000 (14:27 +0100)
committerLudovic Courtès <ludo@gnu.org>
Tue, 15 Jan 2019 19:24:09 +0000 (20:24 +0100)
commitee8099f5b688ce5f57790db4122f0b5b91a26216
tree21155dbb9c781e4c47d41343f52498a9c8d01aa5
parent5fbdc9a5aa63fd51c65d30fe3d30608d01fe1bc8
edit: Use 'specification->location' to read information from the cache.

That way 'guix edit' doesn't need to load any package module.

* gnu/packages.scm (find-package-locations, specification->location):
New procedures.
* guix/scripts/edit.scm (package->location-specification): Rename to...
(location->location-specification): ... this.  Expect a location object
instead of a package.
(guix-edit): Use 'specification->location' instead of
'specification->package'.
* tests/packages.scm ("find-package-locations")
("find-package-locations with cache")
("specification->location"): New tests.
gnu/packages.scm
guix/scripts/edit.scm
tests/packages.scm