summaryrefslogtreecommitdiff
path: root/tests/guix-package.sh
Commit message (Collapse)AuthorAge
* tests: Fix race condition in profile locking test.Ludovic Courtès2019-11-29
| | | | | | | | | | | | | Previously, there was a possibility that "guix install emacs" would grab the lock before "guix package -m $module_dir/manifest.scm". When that happened, the test would start building Emacs and all its dependencies, which could take a while and some disk space. This is a followup to b1fb663404894268b5ee92c040f12c52c0bee425. * tests/guix-package.sh: In profile locking test, emit "$module_dir/ready" from the manifest and wait for it to exist before running "guix install emacs".
* package: Allow multiple '--manifest' options.Ludovic Courtès2019-11-22
| | | | | | | | | | | * guix/scripts/package.scm (manifest-action): Remove. (%actions): Remove it. (load-manifest): New procedure. (process-actions): Handle 'manifest' options. Define 'files' from 'manifest' options. Define 'manifest' based on FILES. Define 'trans' to represent the final transaction. * tests/guix-package.sh: Test it. * doc/guix.texi (Invoking guix package): Mention
* guix: package: lock profiles when processing them.Julien Lepiller2019-11-08
| | | | | | * guix/scripts/package.scm (process-actions): Get a per-profile lock to prevent concurrent actions on profiles. * tests/guix-package.sh: Add test.
* guix package: Add '--list-profiles'.Ludovic Courtès2019-09-26
| | | | | | * guix/scripts/package.scm (show-help, %options): Add '--list-profiles'. (process-query): Honor it. * tests/guix-package.sh: Add test.
* guix package: "guix package -f FILE" ensures FILE returns a package.Ludovic Courtès2019-09-18
| | | | | | * guix/scripts/package.scm (options->installable): Add clause for 'install option with a non-package object. * tests/guix-package.sh: Add test.
* discovery: 'all-modules' returns modules in path order.Robert Vollmert2019-05-26
| | | | | | | | | | | | | A particular effect of this is that if there are ambiguous packages in a directory specified with `-L module_dir` and the distribution, the version from `module_dir` will be loaded, which is usually what would be expected. (E.g. for `guix build` or `guix package -i`.) * guix/discovery.scm (all-modules): Return modules in path order. * tests/guix-package.sh: Test local definitions take precedence. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* tests: Fix guix-package.sh.Maxim Cournoyer2019-05-13
| | | | | | | GCC is now a hidden package, so cannot be installed. * tests/guix-package.sh: Replace 'gcc' by 'zile' in a test that install multiple packages.
* ui: Make package outputs searchable.Chris Marusich2019-05-09
| | | | | | | | | | | | * guix/ui.scm (relevance): Allow the "field" procedure of a metric to return a list, and handle that case appropriately. Update docstring. (%package-metrics): Add a metric for package outputs. * guix/scripts/package.scm (find-packages-by-description): Update docstring. * tests/guix-package.sh: Add a test case to verify that package outputs are included in search results. Co-authored-by: Tobias Geerinckx-Rice <me@tobias.gr>
* profiles: Raise an error for unmatched patterns.Ludovic Courtès2019-02-07
| | | | | | | | | | | | | | | Previously, "guix package -r something-not-installed" would silently complete. Now an error is raised. * guix/profiles.scm (&unmatched-pattern-error): New condition type. (manifest-matching-entries): Rewrite to raise an error when one of PATTERNS is not matched. * guix/ui.scm (call-with-error-handling): Handle 'unmatched-pattern-error?'. * tests/guix-package.sh: Add test. * tests/profiles.scm ("manifest-matching-entries"): Don't try to remove unmatched pattern. ("manifest-matching-entries, no match"): New test. ("manifest-transaction-effects"): Remove 'remove' field.
* guix package: '--show' errors when asked for a non-existent package.Ludovic Courtès2018-11-11
| | | | | | | | | Fixes <https://bugs.gnu.org/33323>. Reported by swedebugia <swedebugia@riseup.net>. * guix/scripts/package.scm (process-query): Call 'leave' when 'find-packages-by-name' returns the empty list. * tests/guix-package.sh: Test it.
* profiles: 'packages->manifest' now accepts inferior packages.Ludovic Courtès2018-09-21
| | | | | | | | | * guix/profiles.scm (packages->manifest)[inferiors-loaded?]: New variable. [inferior->entry]: New procedure. Accept inferior packages when INFERIORS-LOADED? is true. * tests/guix-package.sh: Add test using a manifest with an inferior. * tests/inferior.scm ("packages->manifest"): New test.
* 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'.
* tests: Adjust 'guix package' test to "python2" name.Ludovic Courtès2018-06-06
| | | | | | | | This is a followup to a7714d42de2c3082f3609d1e63c83d703fb39cf9, which renamed Python 2.x to "python2". * tests/guix-package.sh: Use g-wrap and guile@2.0 when testing collisions.
* 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.
* tests: Adjust to new unbound-variable error message.Ludovic Courtès2017-11-11
| | | | | | This is a followup to dc856223f5eab57d8a4881782ec0f50abd12afa3. * tests/guix-package.sh: Adjust unbound-variable message regexp.
* 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: 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: 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.
* utils: Use '@' for separating package names and version numbers.Mathieu Lirzin2016-03-02
| | | | | | | | | | | | | | | | | | | | | 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.
* tests: Disable grafts by default.Ludovic Courtès2016-03-02
| | | | | | | | | | | Fixes <http://bugs.gnu.org/22872>. Reported by myglc2 <myglc2@gmail.com>. * test-env.in: Define and export 'GUIX_BUILD_OPTIONS'. * tests/guix-build.sh: When setting 'GUIX_BUILD_OPTIONS', make sure it contains '--no-grafts'. * tests/guix-package.sh: Likewise. * tests/guix-daemon.sh: Add (%graft? #f) in Scheme snippets.
* 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 build: Augment %PATCH-PATH when -L is passed.Ludovic Courtès2015-12-30
| | | | | | | | | Fixes <http://bugs.gnu.org/22259>. Reported by Nikolay Merinov <nikolay.merinov@member.fsf.org>. * guix/scripts/build.scm (%standard-build-options) <-L>: Augment %PATCH-PATH. * tests/guix-package.sh: Add test.
* scripts: package: Add --install-from-file option.David Thompson2015-08-19
| | | | | | | | | | * guix/scripts/package.scm (show-help): Add help text for --install-from-file option. (%options): Add --install-from-file option. * tests/guix-package.sh: Test it. * doc/guix.texi ("invoking guix package"): Document it. * doc/package-hello.scm: New file. * doc.am (EXTRA_DIST): Add it.
* guix package: --manifest DTRT when combined with --dry-run.Ludovic Courtès2015-05-25
| | | | | | | * guix/scripts/package.scm (guix-package)[process-actions]: Process 'manifest action regardless of whether 'dry-run? is set. Adjust the message accordingly. * tests/guix-package.sh: Add error-reporting test.
* package: Add --manifest option.David Thompson2015-05-20
| | | | | | | | * guix/scripts/package.scm (show-help): Add help text. (%options): Add manifest option. (guix-package): Add manifest option handler. * doc/guix.texi ("Invoking guix package"): Document it. * tests/guix-package.sh: Add test.
* guix package: Add optional argument to --search-paths.Ludovic Courtès2015-05-20
| | | | | | | | | | | | * guix/scripts/package.scm (search-path-environment-variables): Add #:kind parameter. Pass it to 'environment-variable-definition'. (display-search-paths): Add #:kind parameter and pass it to 'search-path-environment-variables'. (%options): Add an optional parameter for "--search-paths". (guix-package)[process-query]: Handle it. * tests/guix-package-net.sh: Adjust existing test. * tests/guix-package.sh: Adjust existing tests and add new test. * doc/guix.texi (Invoking guix package): Document it.
* guix package: -A and -s take supported systems into account.Ludovic Courtès2015-04-19
| | | | | | | | | | * guix/scripts/package.scm (guix-package)[process-query] <list-available>: Restrict results to packages matching 'supported-package?". * guix/ui.scm (package->recutils): Print "systems:". * tests/guix-package.sh: Add tests. * doc/guix.texi (Invoking guix package): Adjust description of '--list-available' accordingly.
* tests: Move 'guix package' tests that require networking to a separate file.Ludovic Courtès2015-04-06
| | | | | | | * tests/guix-package.sh (shebang_not_too_long): Remove. Move everything below "if [networking + shebang_not_too_long]" to... * tests/guix-package-net.sh: ... here. New file. * Makefile.am (SH_TESTS): Add it.
* guix package: Never remove the current generation and warn about it.Ludovic Courtès2015-04-06
| | | | | | | | | | | | Fixes <http://bugs.gnu.org/19978>. Reported by taylanbayirli@gmail.com (Taylan Ulrich Bayırlı/Kammer). * guix/scripts/package.scm (delete-matching-generations): Warn when CURRENT is in NUMBERS, and always remove it before calling 'delete-generations'. * tests/guix-package.sh: Add --switch-generation=2 invocation before --delete-generations=3 invocation. Add --delete-generations=1.. test case.
* tests: Skip tests that would fail due to the shebang length.Ludovic Courtès2015-02-24
| | | | | | | | | | | | Reported by Daniel Kochmański <dkochmanski@hellsgate.pl>. Fixes <http://bugs.gnu.org/19888>. * guix/tests.scm (shebang-too-long?): New procedure. * tests/builders.scm ("gnu-build"): Conditionalize on not (shebang-too-long?). * tests/packages.scm ("GNU Make, bootstrap"): Likewise. * tests/guix-package.sh (shebang_not_too_long): New function. Use it to determine whether to build 'gnu-make-boot0'.
* guix package: Make custom profiles actual indirect roots.Ludovic Courtès2015-02-06
| | | | | | | | | | | | | Before that, any profile generation built when '-p' is used would effectively become a permanent GC root because the symlink in /var/guix/gcroots/auto would point directly to /gnu/store/...-profile. * guix/scripts/package.scm (maybe-register-gc-root): Rename to... (register-gc-root): ... this. Remove conditional, and replace call to 'canonicalize-path' with (string-append (getcwd) "/" ...). (guix-package): Call 'register-gc-root' only if PROFILE is different from %CURRENT-PROFILE. * tests/guix-package.sh: Add test case.
* gnu: Search for patches under $GUIX_PACKAGE_PATH.Ludovic Courtès2015-01-03
| | | | | | | | | | | 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.
* guix: scripts: Parse $GUIX_BUILD_OPTIONS separately.nebuli2014-12-06
| | | | | | | | | | | | | | | | | | | | Appending to "raw" args broke optional parameters in 'guix package -I' and 'guix package -A', and possibly other places. Therefore, switch to parsing each set of options on its own and append resulting alists together afterwards. * guix/scripts/archive.scm (parse-options-from): Rename from (parse-options) and add explicit argument. New form of (parse-options) using its old algorithm via -from function. * guix/scripts/build.scm: Ditto. * guix/scripts/environment.scm: Ditto. * guix/scripts/package.scm: Ditto. * guix/scripts/system.scm: Ditto. * tests/guix-package.sh: Add test. * doc/guix.texi (Invoking guix build): Make it clear that the options are parsed independently. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
* guix package: Add '--switch-generation' option.Alex Kost2014-10-12
| | | | | | | | * guix/scripts/package.scm (switch-to-generation): New procedure. (switch-to-previous-generation): Use it. (guix-package): Adjust for '--switch-generation' option. * tests/guix-package.sh: Test it. * doc/guix.texi (Invoking guix package): Document it.
* build: Make sure tests/guix-package.sh doesn't leave anything behind it.Ludovic Courtès2014-10-10
| | | | | | | Fixes a regression introduced in commit 300868ba. * tests/guix-package.sh: Move 'module_dir' definition to the top, and "rm -rf" it from the top-most 'trap'. Remove second use of 'trap'.
* Introduce the 'GUIX_PACKAGE_PATH' environment variable.Ludovic Courtès2014-09-24
| | | | | | | * gnu/packages.scm (%package-module-path): Honor $GUIX_PACKAGE_PATH. * test-env.in: Unset 'GUIX_PACKAGE_PATH'. * tests/guix-package.sh: Test it. * doc/guix.texi (Package Modules): Document it.
* guix build: Add -L/--load-path as a common option.Ludovic Courtès2014-09-24
| | | | | | * guix/scripts/build.scm (show-build-options-help): Document -L. (%standard-build-options): Add -L/--load-path. * tests/guix-package.sh: Test it.
* gnu: Split (gnu packages base), adding (gnu packages commencement).Ludovic Courtès2014-08-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gnu/packages/base.scm (gnu-make-boot0, diffutils-boot0, findutils-boot0, %boot0-inputs, nix-system->gnu-triplet, boot-triplet, binutils-boot0, gcc-boot0, perl-boot0, linux-libre-headers-boot0, texinfo-boot0, %boot1-inputs, glibc-final-with-bootstrap-bash, cross-gcc-wrapper, static-bash-for-glibc, glibc-final, gcc-boot0-wrapped, %boot2-inputs, binutils-final, libstdc++, gcc-final, ld-wrapper-boot3, %boot3-inputs, bash-final, %boot4-inputs, guile-final, gnu-make-final, ld-wrapper, coreutils-final, grep-final, %boot5-inputs, %final-inputs, canonical-package, gcc-toolchain, gcc-toolchain-4.8, gcc-toolchain-4.9): Move to... * gnu/packages/commencement.scm: ... here. New file. * gnu-system.am (GNU_SYSTEM_MODULES): Add it. * build-aux/check-final-inputs-self-contained.scm: Adjust accordingly. * gnu/packages/cross-base.scm: Likewise. * gnu/packages/make-bootstrap.scm: Likewise. * guix/build-system/cmake.scm (cmake-build): Likewise. * guix/build-system/gnu.scm (standard-packages, gnu-build, gnu-cross-build): Likewise. * guix/build-system/perl.scm (perl-build): Likewise. * guix/build-system/python.scm (python-build): Likewise. * guix/build-system/trivial.scm (guile-for-build): Likewise. * guix/download.scm (url-fetch): Likewise. * guix/gexp.scm (default-guile): Likewise. * guix/git-download.scm (git-fetch): Likewise. * guix/monads.scm (run-with-store): Likewise. * guix/packages.scm (default-guile): Likewise. * guix/scripts/package.scm (guix-package): Likewise. * guix/scripts/refresh.scm: Likewise. * guix/svn-download.scm (svn-fetch): Likewise. * tests/builders.scm (%bootstrap-inputs, %bootstrap-search-paths): Likewise. * tests/packages.scm ("GNU Make, bootstrap"): Likewise. * tests/guix-package.sh: Likewise. * gnu/services/base.scm: Use 'canonical-package' instead of xxx-final. * gnu/services/xorg.scm: Likewise. * gnu/system/vm.scm: Likewise. * guix/scripts/pull.scm (guix-pull): Likewise.
* tests: Make sure --search="" works.Ludovic Courtès2014-07-25
| | | | | * tests/guix-package.sh: Move '-s' tests outside of the network-only section. Make sure --search="" works.
* guix: package: Fix recutils output for non-package inputs.Eric Bavier2014-07-25
| | | | | * guix/ui.scm (package->recutils)[dependencies]: Ignore non-package inputs. * tests/guix-package.sh: New test.
* build: Fix typo in 'guix package --show' test.Ludovic Courtès2014-07-25
| | | | * tests/guix-package.sh: Change "^Package:" to "^name:".
* guix package: add a "show" option.Cyril Roelandt2014-07-21
| | | | | | * doc/guix.texi: Update the documentation. * guix/scripts/package.scm: Add a "show" option. * tests/guix-package.sh: Add a test for the "show" option.
* build: Get the canonical $HOME name when testing 'guix package'.Ludovic Courtès2014-07-06
| | | | * tests/guix-package.sh (HOME): Recompute using 'pwd -P'.
* guix package: Do the right thing for '-p ~/.guix-profile'.Ludovic Courtès2014-07-05
| | | | | | | | | Fixes <http://bugs.gnu.org/17939>. Reported by Taylan Ulrich Bayirli/Kammer <taylanbayirli@gmail.com>. * guix/scripts/package.scm (canonicalize-profile): New procedure. (%options): Use it for --profile. * tests/guix-package.sh: Add test.
* tests: Use the C locale for 'guix package -s'.Ludovic Courtès2014-06-16
| | | | | * tests/guix-package.sh: Set LC_MESSAGES=C before the 'guix package -s' test.
* guix package: Register non-default profiles as GC roots.Ludovic Courtès2014-04-02
| | | | | | * guix/scripts/package.scm (maybe-register-gc-root): New procedure. * tests/guix-package.sh (profile): Grep the output of "guix gc --list-live" in a couple of places.
* tests: Adjust to recent Binutils change.Ludovic Courtès2014-01-25
| | | | | * tests/guix-package.sh: Refer to 'glibc:debug' instead of 'binutils:lib' since the latter no longer exists.
* guix package: Gracefully deal with EPIPE on stdout for --list-*.Ludovic Courtès2014-01-04
| | | | | | | * guix/scripts/package.scm (leave-on-EPIPE): New macro. (guix-package): Use it for 'list-installed', 'list-available', and '--list-generations'. * tests/guix-package.sh: Add test.
* guix package: allow multiple arguments after -i, -r, and -u.Mark H Weaver2013-12-14
| | | | | | | | | | | | | | | | * guix/scripts/package.scm (%options): Adapt option processors to accept and return a second seed value: 'arg-handler', which handles bare arguments (if not false). The install, remove, and upgrade option processors return an arg-handler that repeat the same operation. All other option processors return #f as the arg-handler. Make the arguments to install and remove optional. The upgrade option processor deletes (upgrade . #f) from the alist before adding a new entry. (guix-package): Procedures passed to 'args-fold*' accept the new seed value 'arg-handler'. The 'operand-proc' uses 'arg-handler' (if not false). * doc/guix.texi (Invoking guix package): Update docs. * tests/guix-package.sh: Add test.