aboutsummaryrefslogtreecommitdiff
path: root/guix/describe.scm
Commit message (Collapse)AuthorAge
* describe: Try harder to find the ‘guix pull’ profile.Ludovic Courtès2024-03-19
| | | | | | | | | | | | | | | | | | | Fixes <https://issues.guix.gnu.org/66705>. The strategy used by ‘current-profile’ so far would fail to find the right profile (the one created by ‘guix pull’ or ‘guix time-machine’) in cases where said profile is itself included in another profile. This happens, for instance, when running ‘guix shell -CW -- guix describe’, which, as a result, would display nothing but the ‘guix’ channel. This patch fixes that by having ‘current-profile’ not just check for the presence of a ‘manifest’ file but also parse it to determine whether it’s a ‘guix pull’ kind of manifest. * guix/describe.scm (find-profile): New procedure. (current-profile): Adjust to use it. Change-Id: I9194f54ce1496a6591e247c76203f497f28c330b
* describe: 'current-channel-entries' ignores non-channel profile entries.Ludovic Courtès2021-06-13
| | | | | | | | | | | | | Fixes <https://bugs.gnu.org/48778>. A side effect of c47f3fc13562d82edfd2d47342574154c452843a is that (@ (guix describe) current-profile) provides the correct answer when the 'guix' package is installed in a profile. Consequently, the 'guix' package installed in /run/current-system/profile (for instance) would end up loading all the .scm files in that directory. * guix/describe.scm (current-channel-entries): Remove ENTRY if it lacks the 'source' property.
* describe: Gracefully handle profiles that lack provenance info.Ludovic Courtès2021-05-09
| | | | | | | | | | | | | Fixes <https://bugs.gnu.org/48313>. Previously, 'current-channels' would return the empty list when 'current-profile' is true but the profile lacks provenance info. * guix/describe.scm (current-channels)[build-time-metadata]: New procedure. Call it when 'manifest-entry-channel' returns #f for all of ENTRIES. * guix/scripts/describe.scm (guix-describe): When PROFILE is true, pass third argument to 'display-profile-info'.
* describe: Make sure package-channels always returns a list.Mathieu Othacehe2021-02-25
| | | | | * guix/describe.scm (package-channels): Return an empty list if the file origin could not be determined.
* describe: Add missing include.Mathieu Othacehe2021-02-25
| | | | | | This is a follow-up of 17fbd5a5c9c09ff54ce95985dcbcdd1b9c60a34e. * guix/describe.scm: Add "channel-name" to (guix channels) autoload.
* describe: Add package-channels.Mathieu Othacehe2021-02-25
| | | | | * guix/describe.scm (package-channels): New procedure. (package-provenance): Rewrite using package-channels procedure.
* describe: Fix typo in 'manifest-entry-with-provenance'.Ludovic Courtès2021-02-22
| | | | | * guix/describe.scm (manifest-entry-with-provenance): Fix first argument to 'assq'.
* channels: Record 'guix' channel metadata in (guix config).Ludovic Courtès2021-02-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | Partially fixes <https://bugs.gnu.org/45896>. * guix/config.scm.in (%channel-metadata): New variable. * guix/describe.scm (channel-metadata): Use it. (current-channels): New procedure. (current-profile-entries): Clarify docstring. * guix/self.scm (compiled-guix): Add #:channel-metadata and pass it to 'make-config.scm'. (make-config.scm): Add #:channel-metadata and define '%channel-metadata' in the generated file. (guix-derivation): Add #:channel-metadata and pass it to 'compiled-guix'. * guix/channels.scm (build-from-source): Replace 'name', 'source', and 'commit' parameters with 'instance'. Pass #:channel-metadata to BUILD. (build-channel-instance): Adjust accordingly. * build-aux/build-self.scm (build-program): Add #:channel-metadata and pass it to 'guix-derivation'. (build): Add #:channel-metadata and pass it to 'build-program'. * guix/scripts/describe.scm (display-profile-info): Add optional 'channels' parameter. Pass it to 'display-profile-content'. (display-profile-content): Add optional 'channels' parameter and honor it. Iterate on CHANNELS rather than on the manifest entries of PROFILE. (guix-describe): When PROFILE is #f, call 'current-channels' and pass it to 'display-profile-info', unless it returns the empty list.
* guix package: Add '--export-channels'.Ludovic Courtès2021-02-01
| | | | | | | | | | | | | * guix/channels.scm (sexp->channel): Export. * guix/describe.scm: Use (guix channels). (manifest-entry-provenance): New procedure. * guix/scripts/package.scm (channel=?, export-channels): New procedures. (show-help, %options): Add '--export-channels'. (process-query): Honor it. * build-aux/build-self.scm (build-program)[select?]: Exclude (guix channels) to account for the (guix describe) change above. * doc/guix.texi (Invoking guix package): Document it.
* describe: Save the original value of (program-arguments).Ludovic Courtès2020-09-19
| | | | | | | | | | | | | | Fixes <https://bugs.gnu.org/42688>. Reported by pkill9 <pkill9@runbox.com>. This ensures that 'guix repl -s SCRIPT' give SCRIPT the right value of (current-profile), which in turn ensures that (%package-module-path) is initialized with the right set of channels. * guix/describe.scm (initial-program-arguments): New variable. (current-profile): Use it. * guix/scripts/repl.scm (guix-repl): Call 'current-profile' before 'set-program-arguments'.
* guix package: Save provenance information when using '--manifest'.Ludovic Courtès2019-12-29
| | | | | | | | | Fixes <https://bugs.gnu.org/38673>. Reported by zimoun <zimon.toutoune@gmail.com>. * guix/describe.scm (manifest-entry-with-provenance): New procedure. * guix/scripts/package.scm (process-actions): Use it when FILES is non-empty.
* describe: Add 'current-profile-date'.Ludovic Courtès2019-03-17
| | | | * guix/describe.scm (current-profile-date): New procedure.
* describe: 'package-path-entries' no longer includes the "guix" entry.Ludovic Courtès2019-03-12
| | | | | | | | | | | | | Fixes <https://bugs.gnu.org/34833> Reported by mikadoZero <mikadozero@yandex.com>. By returning the "guix" entry, we were then adding it to %PACKAGE-MODULE-PATH, causing the discovery code to scan the whole tree, including gnu/installer modules, which would in turn lead to warnings. Regression introduced in bfc9c339301ffe6dd15d156894dc27e05f6f081f. * guix/describe.scm (package-path-entries): Use 'current-channel-entries', not 'current-profile-entries'.
* packages: Add the channel .go files to the search path.Ludovic Courtès2019-03-11
| | | | | | | | | | | | | | | | | 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.
* describe: Add 'package-provenance'.Ludovic Courtès2019-03-07
| | | | | * guix/scripts/package.scm (package-provenance): Move to... * guix/describe.scm (package-provenance): ... here.
* Add 'guix describe'.Ludovic Courtès2018-09-07
| | | | | | | | | | | | | | * guix/scripts/describe.scm: New file. * Makefile.am (MODULES): Add it. (SH_TESTS): Add tests/guix-describe.sh. * po/guix/POTFILES.in: Add it. * guix/scripts/pull.scm (display-profile-content): Export. * guix/describe.scm (current-profile, current-profile-entries): Export. * tests/guix-describe.sh: New file. * doc/guix.texi (Features): Mention 'guix pull' and provenance tracking. (Invoking guix pull): Link to 'guix describe'. (Channels): Likewise. (Invoking guix describe): New node.
* Add (guix describe) and use it to initialize '%package-search-path'.Ludovic Courtès2018-09-02
* guix/describe.scm: New file. * Makefile.am (MODULES): Add it. * gnu/packages.scm (%default-package-module-path): New variable. (%package-module-path): Honor 'package-path-entries'. * build-aux/update-NEWS.scm (main): Use %DEFAULT-PACKAGE-MODULE-PATH instead of (last (%package-module-path)).