summaryrefslogtreecommitdiff
path: root/guix/scripts/package.scm
Commit message (Collapse)AuthorAge
* guix package: Use relative symlinks to generations.Ludovic Courtès2018-07-13
| | | | | | | | | | | | Reported by Roel Janssen <roel@gnu.org> at <https://lists.gnu.org/archive/html/guix-devel/2018-07/msg00036.html>. * guix/profiles.scm (switch-to-generation): Use (basename generation) as the symlink target. * guix/scripts/package.scm (build-and-use-profile): Likewise, use (basename name) as the symlink target. * tests/guix-package.sh: Adjust --roll-back test accordingly. Add explicitly test with '-p foo/prof'.
* profiles: Add '%current-profile', 'user-friendly-profile', & co.Ludovic Courtès2018-06-09
| | | | | | | * guix/scripts/package.scm (%user-profile-directory) (%profile-directory, %current-profile, canonicalize-profile) (user-friendly-profile): Move to... * guix/profiles.scm: ... here.
* guix package: Add '--allow-collisions'.Ludovic Courtès2018-03-31
| | | | | | | | | | | | | Fixes <https://bugs.gnu.org/30830>. Suggested by Ricardo Wurmus <rekado@elephly.net>. * guix/scripts/package.scm (build-and-use-profile): Add #:allow-collisions? and pass it to 'profile-derivation'. (show-help, %options): Add '--allow-collisions'. (manifest-action, process-actions): Pass #:allow-collisions? to 'build-and-use-profile'. * tests/guix-package.sh: Add collision test. * doc/guix.texi (Invoking guix package): Document '--allow-collisions'.
* guix package: '--search' no longer shows superseded packages.Ludovic Courtès2018-02-27
| | | | | | | | | Fixes <https://bugs.gnu.org/30566>. Reported by Björn Höfling <bjoern.hoefling@bjoernhoefling.de>. * guix/scripts/package.scm (find-packages-by-description): Ignore superseded packages. * tests/guix-package.sh: Add test.
* scripts: All commands enable build hooks by default.Ludovic Courtès2017-12-07
| | | | | | | | | * guix/scripts/archive.scm (%default-options): Add 'build-hook?'. * guix/scripts/copy.scm (%default-options): Likewise. * guix/scripts/environment.scm (%default-options): Likewise. * guix/scripts/pack.scm (%default-options): Likewise. * guix/scripts/package.scm (%default-options): Likewise. * guix/scripts/pull.scm (%default-options): Likewise.
* scripts: Default to Guile 2.2 as the guile-for-build.Ludovic Courtès2017-12-03
| | | | | | | * guix/scripts/environment.scm (guix-environment): '%guile-for-build' now defaults to GUILE-2.2 instead of GUILE-2.0. * guix/scripts/package.scm (guix-package): Likewise. * guix/scripts/pull.scm (guix-pull): Likewise.
* guix package: '--list-available' does not show superseded packages.Ludovic Courtès2017-10-25
| | | | | * guix/scripts/package.scm (process-query) <'list-available>: Filter out P if it matches 'package-superseded'.
* guix package: '--upgrade' no longer reverses package order.Ludovic Courtès2017-10-07
| | | | | | | | Reported by Oleg Pykhalov <go.wigust@gmail.com> at <https://lists.gnu.org/archive/html/help-guix/2017-10/msg00000.html>. * guix/scripts/package.scm (options->installable)[upgraded]: Use 'fold-right' instead of 'fold'.
* ui: Generalize relevance computation.Ludovic Courtès2017-09-16
| | | | | | | * guix/ui.scm (relevance, package-relevance): New procedures. (%package-metrics): New variable. * guix/scripts/package.scm (find-packages-by-description)[score] [package-score]: Remove. Use 'package-relevance' instead.
* scripts: Remove 'max-silent-time' from the default options.Maxim Cournoyer2017-09-01
| | | | | | | | | | | | | | | | | | | | | Fixes <http://bugs.gnu.org/27157>. Having a finite default `max-silent-time' value for scripts such as 'guix environment' could lead to timeouts when building subtitutes; this was undesirable. This change also fixes client behavior to match the documentation, which is that by default the daemon's settings are honored. * guix/scripts/archive.scm (%default-options): Remove max-silent-time entry. * guix/scripts/copy.scm (%default-options): Likewise. * guix/scripts/environment.scm (%default-options): Likewise. * guix/scripts/pack.scm (%default-options): Likewise. * guix/scripts/package.scm (%default-options): Likewise. * guix/scripts/pull.scm (%default-options): Likewise. * guix/scripts/system.scm (%default-options): Likewise. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* guix package: Allow `guix package -u' to fuction as before.Efraim Flashner2017-08-01
| | | | | | | This is a follow up to 6ddf97f81bb99a73f00e30ad5fc19577872b5b49 * guix/scripts/package.scm (%options) <"-u">: Only check for a flag when there is an ARG after '-u'.
* guix package: Warn when invoked with '-u -something'.Ludovic Courtès2017-07-31
| | | | | | | | Fixes <https://bugs.gnu.org/27820>. Reported by Hartmut Goebel <h.goebel@crazy-compilers.com>. * guix/scripts/package.scm (%options) <"-u">: Emit a warning when ARG starts with "-".
* guix package: '-l' correctly handles zero-generation profiles.Ludovic Courtès2017-07-20
| | | | | * guix/scripts/package.scm (process-query) <'list-generations>: Properly handle the case where 'profile-generations' returns the empty list.
* guix package: Trim trailing slashes from the profile name.Ludovic Courtès2017-07-20
| | | | | | | | Fixes <https://bugs.gnu.org/25762>. Reported by Ricardo Wurmus <rekado@elephly.net>. * guix/scripts/package.scm (canonicalize-profile): Trim trailing slashes from PROFILE.
* guix package: Allow '--rollback', after all.Ludovic Courtès2017-06-26
| | | | | * guix/scripts/package.scm (%options): Add "rollback" as an alias for "roll-back".
* guix package: 'guix package -r PKG -u' does not upgrade PKG.Ludovic Courtès2017-06-26
| | | | | | | | | | Fixes <http://bugs.gnu.org/27262>. Reported by Mark H Weaver <mhw@netris.org>. * guix/scripts/package.scm (transaction-upgrade-entry): Check if ENTRY matches 'manifest-transaction-removal-candidate?' and return TRANSACTION if it does. (process-actions): Move 'options->removable' from step 2 to step 1.
* guix package: Warn about packages that no longer exist.Ludovic Courtès2017-06-25
| | | | | | | | Fixes <http://bugs.gnu.org/27261>. Reported by Mark H Weaver <mhw@netris.org>. * guix/scripts/package.scm (transaction-upgrade-entry): Add call to 'warning' when NAME cannot be found in the package set.
* guix package: '--search-paths' shows search paths from propagated inputs.Ludovic Courtès2017-06-21
| | | | | * guix/scripts/package.scm (process-query) <'search-paths>: Use 'manifest-transitive-entries' instead of 'manifest-entries'.
* guix package: Always upgrade packages that have propagated inputs.Ludovic Courtès2017-06-21
| | | | | * guix/scripts/package.scm (transaction-upgrade-entry): Always upgrade packages that have propagated inputs.
* guix package: '--search' sorts by relevance.Ludovic Courtès2017-06-13
| | | | | | | | | | | | * guix/scripts/package.scm (find-packages-by-description): Rewrite to compute a score based on the number of regexps matched and the number of matches for each regexp. Sort according to this score and return it as a second value. (process-query) <'search>: Capture the two return values of 'find-packages-by-description'. Pass #:extra-fields to 'package->recutils'. * doc/guix.texi (Invoking guix package): Mention relevance, give an example.
* guix package: Swallow EPIPE upon 'guix package --list-generations'.Ludovic Courtès2017-05-23
| | | | | | | | Fixes <http://bugs.gnu.org/27017>. Reported by Alex Vong <alexvong1995@gmail.com>. * guix/scripts/package.scm (process-query) <'list-generations>: Wrap body in 'leave-on-EPIPE'.
* scripts: Warn about old distro.Ludovic Courtès2017-05-10
| | | | | | | | | | | Fixes <http://bugs.gnu.org/25852>. Suggested by Mark H Weaver <mhw@netris.org>. * guix/scripts.scm (%distro-age-warning): New variable. (warn-about-old-distro): New procedure. * guix/scripts/package.scm (process-actions): Call 'warn-about-old-distro'. * guix/scripts/system.scm (process-action): Likewise.
* ui: Rename '_' to 'G_'.Ludovic Courtès2017-05-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This avoids collisions with '_' when the latter is used as a 'match' pattern for instance. See <https://lists.gnu.org/archive/html/guix-devel/2017-04/msg00464.html>. * guix/ui.scm: Rename '_' to 'G_'. * po/guix/Makevars (XGETTEXT_OPTIONS): Adjust accordingly. * build-aux/compile-all.scm (warnings): Remove 'format'. * gnu/packages.scm, gnu/services.scm, gnu/services/shepherd.scm, gnu/system.scm, gnu/system/shadow.scm, guix/gnupg.scm, guix/http-client.scm, guix/import/cpan.scm, guix/import/elpa.scm, guix/import/pypi.scm, guix/nar.scm, guix/scripts.scm, guix/scripts/archive.scm, guix/scripts/authenticate.scm, guix/scripts/build.scm, guix/scripts/challenge.scm, guix/scripts/container.scm, guix/scripts/container/exec.scm, guix/scripts/copy.scm, guix/scripts/download.scm, guix/scripts/edit.scm, guix/scripts/environment.scm, guix/scripts/gc.scm, guix/scripts/graph.scm, guix/scripts/hash.scm, guix/scripts/import.scm, guix/scripts/import/cpan.scm, guix/scripts/import/cran.scm, guix/scripts/import/crate.scm, guix/scripts/import/elpa.scm, guix/scripts/import/gem.scm, guix/scripts/import/gnu.scm, guix/scripts/import/hackage.scm, guix/scripts/import/nix.scm, guix/scripts/import/pypi.scm, guix/scripts/import/stackage.scm, guix/scripts/lint.scm, guix/scripts/offload.scm, guix/scripts/pack.scm, guix/scripts/package.scm, guix/scripts/perform-download.scm, guix/scripts/publish.scm, guix/scripts/pull.scm, guix/scripts/refresh.scm, guix/scripts/size.scm, guix/scripts/substitute.scm, guix/scripts/system.scm, guix/ssh.scm, guix/upstream.scm: Use 'G_' instead of '_'. Most of this change was obtained by running: "sed -i -e's/(_ "/(G_ "/g' `find -name \*.scm`".
* Merge branch 'master' into core-updatesLudovic Courtès2017-01-23
|\
| * guix package: Fix version and output for 'guix package -i /gnu/store/…'.Ludovic Courtès2017-01-11
| | | | | | | | | | | | | | | | | | * guix/utils.scm (package-name->name+version): Add optional 'delimiter' parameter. * guix/scripts/package.scm (store-item->manifest-entry): Pass #\- as the delimiter for 'package-name->name+version'. Use "out" instead of #f for the 'output' field. * tests/guix-package.sh: Add test.
* | guix package: Honor the order of profiles when -p appears multiple times.Ludovic Courtès2017-01-23
|/ | | | | | * guix/scripts/package.scm (process-query): Reverse the order of PROFILES. * tests/guix-package-net.sh: Test it with '--search-paths'.
* profiles: Remove dependency on 'glibc-utf8-locales' for tests.Ludovic Courtès2016-12-17
| | | | | | | | | | | | | | | | | | Commit 1af0860e8be81c01ad405c1226d6bc4516e62863 added a mandatory dependency on 'glibc-utf8-locales', which entails long rebuilds for tests. * guix/profiles.scm (profile-derivation): Add #:locales? parameter. Add 'set-utf8-locale' variable. Use it when LOCALES? is true. (link-to-empty-profile): Pass #:locales? #f. * guix/scripts/environment.scm (inputs->profile-derivation): Pass #:locales?. * guix/scripts/package.scm (build-and-use-profile): Likewise. * tests/packages.scm ("--search-paths with pattern"): Pass #:locales? #f. * tests/profiles.scm ("profile-derivation") ("profile-derivation, inputs", "profile-manifest, search-paths") ("etc/profile", "etc/profile when etc/ already exists"): ("etc/profile when etc/ is a symlink"): Likewise.
* profiles: Extract a procedure for getting relative generation numbers.Chris Marusich2016-11-06
| | | | | | | * guix/profiles.scm (relative-generation-spec->number): New procedure. * guix/scripts/package.scm (switch-generation-action): Use it. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* guix package: Display generation diffs.Roel Janssen2016-10-26
| | | | | | | * guix/ui.scm (display-profile-content-diff): New variable. * guix/scripts/package.scm (process-query): Use display-profile-content-diff. In collaboration with Benz Schenk.
* packages: Add 'package-superseded' and associated support.Ludovic Courtès2016-09-06
| | | | | | | | | | | | | | 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.
* guix package: Build up the transaction incrementally.Ludovic Courtès2016-09-06
| | | | | | | | | | | | | | * guix/scripts/package.scm (upgraded-manifest-entry): Rename to... (transaction-upgrade-entry): ... this. Add 'transaction' parameter and return a transaction. (options->installable): Likewise. [to-upgrade]: Rename to... [upgraded]: ... this, and change to be a transaction. Return a transaction. (options->removable): Likewise. (process-actions): Adjust accordingly. * tests/packages.scm ("transaction-upgrade-entry, zero upgrades") ("transaction-upgrade-entry, one upgrade"): New tests.
* guix package: Clarify upgrade code.Ludovic Courtès2016-09-06
| | | | | | | * guix/scripts/package.scm (upgradeable?): Rename to... (upgraded-manifest-entry): ... this. Change to take a <manifest-entry> and to return a <manifest-entry>. (options->installable)[to-upgrade]: Adjust accordingly.
* guix scripts: Disable grafting on dry runs.Roel Janssen2016-08-28
| | | | | | * guix/scripts/archive.scm, guix/scripts/build.scm, guix/scripts/environment.scm, guix/scripts/system.scm, guix/scripts/package.scm: Disable grafting when a dry-run parameter is given.
* guix package: Suggest prefix search path settings.Ludovic Courtès2016-07-28
| | | | | * guix/scripts/package.scm (build-and-use-profile): Pass #:kind 'prefix to 'display-search-paths'.
* guix package: Inherit the transformed version number.Ludovic Courtès2016-05-27
| | | | | | | | | | | Previously, 'guix package -i emacs --with-source=./emacs-42.tar.gz' would fail to use "42" as the version number in the manifest entry. Reported by piyo on #guix. * guix/scripts/package.scm (process-actions)[transform-entry]: Inherit the version number from the result of TRANSFORM when it's a package. * tests/guix-package.sh: Test it.
* emacs: Use 'build-and-use-profile' from (guix scripts package).Alex Kost2016-04-04
| | | | | * guix/scripts/package.scm: Export 'build-and-use-profile'. * emacs/guix-main.scm (process-package-actions): Use it.
* guix build: Move '--no-grafts' to the common build options.Ludovic Courtès2016-03-02
| | | | | | | | | | | | | | | | * guix/scripts/build.scm (%options): Move --no-grafts to... (%standard-build-options): ... here. (show-help, show-build-options-help): Adjust accordingly. * guix/scripts/archive.scm (%default-options): Add 'graft?'. (guix-archive): Parametrize '%graft?'. * guix/scripts/environment.scm (%default-options): Add 'graft?'. (guix-environment): Parametrize '%graft?'. * guix/scripts/package.scm (%default-options): Add 'graft?'. (guix-package): Parametrize '%graft?'. * guix/scripts/system.scm (%default-options): Add 'graft?'. (guix-system): Parametrize 'graft?'. * doc/guix.texi (Additional Build Options): Move --no-grafts to... (Common Build Options): ... here.
* Do not check package freshness during upgrade.Alex Kost2016-02-24
| | | | | | | | | Fixes <http://bugs.gnu.org/22740>. Reported by Andreas Enge <andreas@enge.fr>. * gnu/packages.scm (waiting, ftp-open*, check-package-freshness): Remove. * guix/scripts/package.scm (options->installable): Adjust accordingly. * emacs/guix-main.scm (package->manifest-entry*): Likewise.
* guix package: Support package transformation options.Ludovic Courtès2016-02-01
| | | | | | | | | | * guix/scripts/package.scm (show-help): Call 'show-transformation-options-help'. (%options): Append %TRANSFORMATION-OPTIONS. (process-actions)[transform, transform-entry]: New procedures. * doc/guix.texi (Invoking guix package): Mention package transformations. (Package Transformation Options): Mention 'guix package'.
* guix package: Allow multiple '--search' flags.Ludovic Courtès2016-01-05
| | | | | | | | | | | * guix/scripts/package.scm (find-packages-by-description): Change 'rx' parameter to 'regexps'. [matches-all?, matches-one?]: New procedures. Use them. (process-query): Collect regexps from all 'search' queries, and pass them to 'find-packages-by-description'. * tests/guix-package.sh: Add tests. * doc/guix.texi (Invoking guix package): Document it.
* guix package: Fix typo in comment.Leo Famulari2015-12-25
| | | | * guix/scripts/package.scm: Fix typo.
* guix package: Refactor 'options->installable'.Ludovic Courtès2015-12-01
| | | | | | | | * guix/scripts/package.scm (options->upgrade-predicate) (store-item->manifest-entry): New procedures. * guix/scripts/package.scm (options->installable): Use them. Remove the 'packages-to-upgrade' and 'packages-to-install' variables by getting rid of a level of indirection.
* guix package: Move 'process-actions' out of sight.Ludovic Courtès2015-12-01
| | | | | | * guix/scripts/package.scm (process-actions): New procedure, moved from... (guix-package): ... here. Adjust accordingly.
* guix package: Formalize the list of actions.Ludovic Courtès2015-12-01
| | | | | | | | * guix/scripts/package.scm (roll-back-action, switch-generation-action) (delete-generations-action, manifest-action): New procedures. (%actions): New variable. * guix/scripts/package.scm (guix-package)[process-action]: Rewrite to traverse %ACTIONS.
* guix package: Move 'build-and-use-profile' out of sight.Ludovic Courtès2015-12-01
| | | | | | * guix/scripts/package.scm (build-and-use-profile): New procedure. Adapted and moved from... (guix-package)[process-actions]: ... here. Adjust call sites.
* guix package: Move a couple of procedures out of sight.Ludovic Courtès2015-12-01
| | | | | | * guix/scripts/package.scm (ensure-default-profile, process-query): New procedures, moved from... (guix-package): ... here.
* guix package: Remove unnecessary use of (%store).Ludovic Courtès2015-12-01
| | | | | * guix/scripts/package.scm (delete-matching-generations): Use STORE instead of (%store).
* guix package: Reduce startup time by ~50%.Ludovic Courtès2015-11-24
| | | | | | | | | | | | | | | | | | | As measured with: time sh -c 'for i in `seq 1 10` ; do guix package --search-paths ; done' On my machine, when running: strace -o ,,s guix package --search-paths the number returned by: grep -E '^(open|l?stat).*\.go' ,,s | wc -l drops from 1610 to 837. * guix/scripts/package.scm: Remove two unnecessary #:use-module forms. Autoload (gnu packages ...) modules.
* guix package: '--search-paths' can report combined search paths.Ludovic Courtès2015-11-11
| | | | | | | | | | | | | Partly fixes <http://bugs.gnu.org/20255>. * guix/scripts/package.scm (search-path-environment-variables): Change 'profile' to 'profiles'; expect it to be a list. (display-search-paths): Likewise. (%default-options): Remove 'profile' entry. (%options) <--profile>: Keep previous values associated with 'profile' in RESULT. (guix-package)[process-actions, process-query]: Handle the possible lack of 'profile' pair in OPTS.
* ui: Add 'make-regexp*'.Ludovic Courtès2015-10-28
| | | | | | | | | Fixes <http://bugs.gnu.org/21773>. Reported by Jan Synáček <jan.synacek@gmail.com>. * guix/ui.scm (make-regexp*): New procedure. * guix/scripts/package.scm (options->installable, guix-package): Use it when processing user-provided regexps.