Until now %LOAD-COMPILED-PATH would wrongfully contain:
CHANNEL/share/guile/site/X.Y
for each channel, thereby ignoring all the .go files of channels. This
fixes it so that %LOAD-COMPILED-PATH instead contains:
CHANNEL/lib/guile/X.Y/site-ccache
* guix/describe.scm (current-channel-entries): New procedure.
(package-path-entries): Change to return the %LOAD-COMPILED-PATH entries
as a second value.
* gnu/packages.scm (%package-module-path): Expect two values from
'package-path-entries' and augment %LOAD-COMPILED-PATH accordingly.
Previously the same package could appear several times if several
variables were bound to it, as is notably the case for "python"
currently. This, in turn, would lead to obnoxious "ambiguous package
specification" messages.
* gnu/packages.scm (generate-package-cache)[expand-cache]: Change RESULT
to RESULT+SEEN and adjust accordingly.
Call 'first' on the result of 'fold-module-public-variables*'.
* tests/packages.scm ("fold-available-packages with/without cache"):
Check for lack of duplicates in FROM-CACHE.
* gnu/packages.scm (fold-available-packages): New procedure.
* guix/scripts/package.scm (process-query): Use it instead of
'fold-packages'.
* tests/packages.scm ("fold-available-packages with/without cache"):
New test.
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 (cache-is-authoritative?, load-package-cache)
(cache-lookup, generate-package-cache): New procedures.
(%package-cache-file): New variable.
(find-packages-by-name): Rename to...
(find-packages-by-name/direct): ... this.
(find-packages-by-name): Rewrite to use the package cache when
'cache-is-authoritative?' returns true.
* tests/packages.scm ("find-packages-by-name + version, with cache")
("find-packages-by-name with cache"): New tests.
* guix/channels.scm (package-cache-file): New procedure.
(%channel-profile-hooks): New variable.
(channel-instances->derivation): Use it in #:hooks.
* guix/scripts/package.scm (build-and-use-profile): Add #:hooks and
honor it.
* guix/scripts/pull.scm (build-and-install): Pass #:hooks to
UPDATE-PROFILE.
Since commit 9ffc1c00e5,
'find-newest-available-packages' and 'find-packages-by-name' were both
building a vhash mapping package names to packages. This factorizes
this bit, also reducing I/O, CPU, and memory usage.
* gnu/packages.scm (find-best-packages-by-name): Remove.
(find-best-packages-by-name): Use 'find-packages-by-name' instead of
'find-newest-available-packages'.
Fixes <https://bugs.gnu.org/28446>.
Reported by Mark H Weaver <mhw@netris.org>.
* gnu/packages.scm (find-packages-by-name): Use 'version-prefix?'
instead of 'string-prefix?'.
This reduces the closure of (guix discovery) from 28 to 8 modules.
* guix/discovery.scm (scheme-files): Use 'format' instead of 'warning'.
(scheme-modules): Add #:warn parameter. Use it instead of
'warn-about-load-error'.
(fold-modules): Add #:warn and pass it to 'scheme-modules'.
(all-modules): Likewise.
* gnu/bootloader.scm (bootloader-modules): Pass #:warn to 'all-modules'.
* gnu/packages.scm (fold-packages): Likewise.
* gnu/services.scm (all-service-modules): Likewise.
* guix/upstream.scm (importer-modules): Likewise.
* gnu/packages.scm (specifications->manifest): New procedure.
* doc/guix.texi (Invoking guix package): Change example from using
'(compose list specification->package+output)' to using
'specifications->manifest'.
This syntax had been deprecated since 2016-02-28.
* gnu/packages.scm (%find-package): Remove #:fallback? parameter and handling.
* tests/guix-build.sh: Remove test for "time-1.7" syntax.
* doc/guix.texi (Invoking guix lint): Update 'guix lint' output in example.
This provides a way to mark a package as superseded by another one.
Upgrades replace superseded packages with their replacement.
* guix/packages.scm (package-superseded, deprecated-package): New
procedures.
* gnu/packages.scm (%find-package): Check for 'package-superseded'.
* guix/scripts/package.scm (transaction-upgrade-entry)[supersede]: New
procedure. Call it when 'package-superseded' is true.
* tests/guix-build.sh: Add test for a superseded package.
* tests/packages.scm ("package-superseded")
("transaction-upgrade-entry, superseded package"): New tests.
Fixes a thinko introduced in 1b846da8c3
that would lead to a backtrace when looking for an unknown package.
* gnu/packages.scm (%find-package): Correct logic when checking for
FALLBACK?.
Fixes a typo introduced in 1b846da8c3 that
would lead to a backtrace when using the deprecated syntax.
* gnu/packages.scm (%find-package): Turn the first argument to
'call-with-values' into a thunk. Use #:select instead of '@' to select
the right 'package-name->name+version' procedure.
This provides the ability to use numbers in package names.
Fixes <http://bugs.gnu.org/19219>.
* guix/utils.scm (package-name->name+version): New procedure.
* gnu/packages.scm (%find-package): Add a FALLBACK? keyword argument.
Use the previous method when no package is found.
(specification->package+output, specification->package): Adapt
documentation to new syntax.
* doc/guix.texi (Invoking guix package, Invoking guix import): Likewise.
* guix/ui.scm (package-specification->name+version+output): Likewise.
* guix/scripts/import/hackage.scm (show-help): Likewise.
* tests/guix-build.sh: Adapt to new syntax.
* tests/guix-lint.sh: Likewise.
* tests/guix-package.sh: Likewise.
* tests/ui.scm ("package-specification->name+version+output"): Likewise.
* tests/utils.scm ("package-name->name+version"): Likewise.
* NEWS: Mention new syntax.
These procedures are now redundant with those in (guix graph) and are no
longer used since commit a51cbecb.
* gnu/packages.scm (vhash-refq, package-dependencies)
(package-direct-dependents, package-transitive-dependents)
(package-covering-dependents): Remove.
This is a followup to 0a7c5a0.
Reported by Efraim Flashner <efraim@flashner.co.il>.
* gnu/packages.scm (check-package-freshness): Update to the new (guix
upstream) interface.
* gnu/packages.scm (find-packages-by-name): Sort MATCHING according to
'version>?'. Use 'string-prefix?' instead of 'string=?' to compare
against VERSION.
* doc/guix.texi (Invoking guix package): Add example and explanation.
* guix/ui.scm (warn-about-load-error): New procedure.
* gnu/packages.scm (package-modules): Wrap 'resolve-interface' call in
'catch #t', and call 'warn-about-load-error' in handler.
* gnu/packages.scm (search-patch): Raise an error condition when
'search-path' returns #f.
* tests/packages.scm ("patch not found yields a run-time error"): New
test.
Fixes <http://bugs.gnu.org/19364>.
Reported by Tomáš Čech <sleep_walker@suse.cz>
and Mark H Weaver <mhw@netris.org>.
* gnu/packages.scm (%patch-path): Move after definition of
%package-module-path'. Append "/gnu/packages/patches" only to
%DISTRO-ROOT-DIRECTORY.
* tests/guix-package.sh: Add 'emacs-foo-bar-patched' test.
On a profile with 182 entries, "guix package --search-paths" goes from
4.5 seconds down to 0.4 second.
* gnu/packages.scm (find-packages-by-name): Make a name -> package vhash
in a promise; access it with 'vhash-fold*'.