summaryrefslogtreecommitdiff
path: root/tests/guix-package.sh
Commit message (Collapse)AuthorAge
...
* 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.
* guix package: '--delete-generations' deletes generations older than specified.Ludovic Courtès2013-09-27
| | | | | | | | | | * guix/scripts/package.scm (matching-generations): Add 'duration-relation' keyword parameter. (guix-package)[process-action](delete-generations): Pass #:duration-relation >. * tests/guix-package.sh: Add test. * doc/guix.texi (Invoking guix package): Clarify the meaning of durations for '--list-durations' and '--delete-durations'.
* tests: Fix typo.Ludovic Courtès2013-09-27
| | | | * tests/guix-package.sh: Add missing "-p" option.
* guix package: Add '--delete-generations'.Nikita Karetnikov2013-09-26
| | | | | | | | | | | | * guix/scripts/package.scm (switch-to-previous-generation): New function. (roll-back): Use the new function instead of 'switch-link'. (show-help): Add '--delete-generations'. (%options): Likewise. (guix-package)[process-actions]: Add 'current-generation-number', 'display-and-delete', and 'delete-generation'. Add support for '--delete-generations', and reindent the code. * tests/guix-package.sh: Test '--delete-generations'. * doc/guix.texi (Invoking guix-package): Document '--delete-generations'.
* guix package: Show which generation is the current one.Nikita Karetnikov2013-09-25
| | | | | | * guix/scripts/package.scm (guix-package)[process-query]: Show that a generation is the current one if the profile points to it. * tests/guix-package.sh: Test it.
* tests: Use 'test -z' to check that a string equals zero.Nikita Karetnikov2013-09-25
|
* guix package: Do not list the zeroth generation.Nikita Karetnikov2013-09-25
| | | | | | | | * guix/scripts/package.scm (guix-package)[process-query]: Change 'list-generation' to not list the zeroth generation. * tests/guix-package.sh: Test it. * doc/guix.texi (Invoking guix package): Document it, and use the right term when talking about generations.
* guix package: Exit with 1 when a generation cannot be listed.Nikita Karetnikov2013-09-25
| | | | | | | * guix/scripts/package.scm (guix-package)[process-query]: Exit with 1 when a generation does not exist or the profile points to the zeroth generation. * tests/guix-package.sh: Test the former case.
* guix package: Add '--list-generations'.Nikita Karetnikov2013-09-19
| | | | | | | | | | | | | | * guix/scripts/package.scm: Import (srfi srfi-19). (generation-time, matching-generations): New functions. (show-help): Add '--list-generations'. (%options): Likewise. (guix-package)[process-query]: Add support for '--list-generations'. * guix/ui.scm: Import (srfi srfi-19) and (ice-9 regex). (string->generations, string->duration): New functions. * tests/guix-package.sh: Test '--list-generations'. * tests/ui.scm: Import (srfi srfi-19). Test 'string->generations' and 'string->duration'. * doc/guix.texi (Invoking guix-package): Document '--list-generations'.
* tests: Clarify filtering of the "debug" output.Ludovic Courtès2013-09-18
| | | | | * tests/guix-package.sh: Clearly filter out the "debug" output of 'gnu-make-boot0'.
* tests: Fix guix-package.sh in the presence of multiple-output `make'.Ludovic Courtès2013-07-10
| | | | | * tests/guix-package.sh: For $boot_make_drv, take only the "out" output. Reported by Nikita Karetnikov <nikita@karetnikov.org>.
* package: Store the output path of packages installed with `-e'.Ludovic Courtès2013-05-10
| | | | | | * guix/scripts/package.scm (guix-package)[process-actions](package->tuple): Put the output path in the tuple, not the derivation path. * tests/guix-package.sh: Add test.
* guix package: Add `--search-paths' & co.Ludovic Courtès2013-04-28
| | | | | | | | | * guix/scripts/package.scm (search-path-environment-variables, display-search-paths): New procedures. (show-help, %options): Add `--search-paths'. (guix-package)[process-actions]: Call `display-search-paths' once the profile is ready. [process-query]: Honor `search-paths'.
* tests: Use a new synopsis of GNU Hello.Nikita Karetnikov2013-04-18
| | | | | * tests/guix-package.sh: Use a new synopsis of GNU Hello, which was added in f50d2669e3e624365221cc81918ba55fdce94107.
* guix package: Add `--install-from-expression'.Ludovic Courtès2013-03-01
| | | | | | | | | | | | * guix/scripts/package.scm (read/eval-package-expression): New procedure. (show-help): Add `-e'. (%options): Likewise. (guix-package)[process-actions]: Handle ('install . p) pairs, where P is a package. * tests/guix-package.sh: Add `boot_make_drv'. Use `-i $boot_make_drv' once, and then use `-e $boot_make'. * doc/guix.texi (Invoking guix package): Document `-e'.
* Replace individual scripts with master 'guix' script.Mark H Weaver2013-02-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * scripts/guix.in: New script. * Makefile.am (bin_SCRIPTS): Add 'scripts/guix'. Remove 'guix-build', 'guix-download', 'guix-import', 'guix-package', and 'guix-gc'. (MODULES): Add 'guix/scripts/build.scm', 'guix/scripts/download.scm', 'guix/scripts/import.scm', 'guix/scripts/package.scm', and 'guix/scripts/gc.scm'. * configure.ac (AC_CONFIG_FILES): Add 'scripts/guix'. Remove 'guix-build', 'guix-download', 'guix-import', 'guix-package', and 'guix-gc'. * guix-build.in, guix-download.in, guix-gc.in, guix-import.in, guix-package.in: Remove shell script boilerplate. Move to guix-COMMAND.in to guix/scripts/COMMAND.scm. Rename module from (guix-COMMAND) to (guix scripts COMMAND). Change "guix-COMMAND" to "guix COMMAND" in usage help string. * pre-inst-env.in: Add "@abs_top_builddir@/scripts" to the front of $PATH. Export $GUIX_UNINSTALLED. * tests/guix-build.sh, tests/guix-daemon.sh, tests/guix-download.sh, tests/guix-gc.sh, tests/guix-package.sh: Use "guix COMMAND" instead of "guix-COMMAND". * doc/guix.texi: Replace all occurrences of "guix-COMMAND" with "guix COMMAND". * po/POTFILES.in: Update.
* guix-package: Test installation of packages by name.Ludovic Courtès2013-02-06
| | | | | * tests/guix-package.sh: Remove `boot_guile'. Replace occurrences of $boot_guile by the `guile-bootstrap' package name.
* guix-package: Report `--search' matches in recutils format.Ludovic Courtès2013-02-01
| | | | | | | | | | | | * guix/ui.scm (fill-paragraph, string->recutils, package->recutils): New procedures. * guix-package.in (guix-package)[process-query]: Use `package->recutils' to display package meta-data. * tests/guix-package.sh: Adjust test. * tests/ui.scm: New file. * Makefile.am (TESTS): Add it. * doc/guix.texi (Invoking guix-package): Adjust `--search' documentation, and give an example.
* guix-package: Gracefully report non-existing outputs.Ludovic Courtès2013-02-01
| | | | | * guix-package.in (guix-package)[find-package](ensure-output): New procedure. Use it to validate SUB-DRV.
* guix-package: Add '--search'.Nikita Karetnikov2013-01-28
| | | | | | | | * guix-package.in (find-packages-by-description): New procedure. (show-help, %options): Add '--search'. (guix-package)[process-query]: Add support for '--search'. * doc/guix.texi (Invoking guix-package): Document it. * tests/guix-package.sh: Add tests.
* guix-package: Always use the next number for new generations.Ludovic Courtès2013-01-27
| | | | | | | | | | | | | | | | Suggested by Andreas Enge <andreas@enge.fr> at <http://lists.gnu.org/archive/html/bug-guix/2013-01/msg00325.html>. * guix-package.in (latest-profile-number): Remove. (switch-symlinks): New procedure. (roll-back)[switch-link]: Use it. (guix-package)[process-actions]: Always choose NUMBER + 1 for the new profile. Use `switch-symlinks' instead of `symlink'. Remove code to delete PROFILE when it exists since `switch-symlinks' has the same effect. * tests/guix-package.sh: Adjust existing `--roll-back' tests. * doc/guix.texi (Invoking guix-package): Document this `--roll-back' behavior.
* guix-package: When rolling back to nothingness, point to the empty profile.Ludovic Courtès2013-01-27
| | | | | | | | | | | | Suggested by Andreas Enge <andreas@enge.fr> at <http://lists.gnu.org/archive/html/bug-guix/2013-01/msg00316.html>. * guix-package.in (roll-back): Check whether PROFILE is valid using `file-exists?'. When NUMBER is zero, just emit a notice. When PREVIOUS-NUMBER is zero and PREVIOUS-PROFILE does not exist, build the empty profile, and link to it. * tests/guix-package.sh: Add tests. * doc/guix.texi (Invoking guix-package): Document the new behavior.
* guix-package: Error out when passed a non-option argument.Ludovic Courtès2013-01-24
| | | | | | | * guix-package.in (guix-package)[parse-options]: Call `leave' when passed a non-option argument. Reported by Andreas Enge <andreas@enge.fr>. * tests/guix-package.sh: Add test.
* guix-package: Fix `--roll-back' when `--profile' is not passed.Ludovic Courtès2013-01-22
| | | | | | | * guix-package.in (roll-back): Fix file name of PREVIOUS-PROFILE, which could end up containing the dirname twice. Reported by Nikita and Andreas. * tests/guix-package.sh: Add test.
* distro: Change the module name space to (gnu ...).Ludovic Courtès2013-01-18
| | | | | | | | | | * distro: Rename to... * gnu: ... this. Update module names accordingly. * Makefile.am: Adjust accordingly. * po/POTFILES.in: Likewise. * distro.scm: Search for files under /gnu/packages instead of /distro/packages. * gnu/packages/base.scm (ld-wrapper-boot3): Likewise.
* guix-package: Allow `--roll-back' to skip missing generations.Ludovic Courtès2013-01-17
| | | | | | | | | * guix-package.in (profile-numbers): New procedure. (latest-profile-number): Use it. (previous-profile-number): New procedure. (roll-back): Use it lieu of `1-'. Check whether PREVIOUS-NUMBER is zero, and raise an error when it is. * tests/guix-package.sh: Test whether we can roll back over a "hole".
* guix-package: Add `--roll-back'.Ludovic Courtès2013-01-17
| | | | | | | | | | | | | | | | | | Based on a patch by Nikita Karetnikov <nikita@karetnikov.org>. * guix-package.in (profile-regexp): New procedure. (latest-profile-number): Remove `%profile-rx', and use `profile-regexp' instead. (profile-number, roll-back): New procedure. (show-help): Add `--roll-back'. (%options): Likewise. (guix-package)[process-actions]: First check whether `roll-back?' is among OPTS, and call `roll-back' if it is, followed by a recursive call to `process-actions'. Emit the "nothing to be done" message only when INSTALL or REMOVE is non-empty. * tests/guix-package.sh (readlink_base): New function. Add tests for `--roll-back'. * doc/guix.texi (Invoking guix-package): Document `--roll-back'.
* guix-package: Create or diagnose missing profile directory.Ludovic Courtès2013-01-14
| | | | | | | | | | | Reported by Andreas Enge. * guix-package.in (%profile-directory): Honor $NIX_STATE_DIR. (guix-package)[ensure-default-profile]: Use it. [process-actions]: Call it when the `profile' option is %CURRENT-PROFILE. * tests/guix-package.sh: Add installation test with $HOME set, using the default profile.
* tests: Use "binutils:lib" as the `guix-package' example.Ludovic Courtès2013-01-14
| | | | | * tests/guix-package.sh: Use "binutils:lib" instead of "libsigsegv:lib", since the latter no longer exists.
* guix-package: Remove `-b' shorthand for `--bootstrap'.Ludovic Courtès2013-01-07
| | | | | | | * guix-package.in (%options): Remove #\b as an alternate for "bootstrap". (show-help): Adjust accordingly. * tests/guix-package.sh: Use `--bootstrap' instead of `-b'.
* Update license headers.Ludovic Courtès2013-01-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change all license headers, except guix/build/* and ld-wrapper.scm, with this code: (use-modules (guix build utils) (srfi srfi-1)) (fluid-set! %default-port-encoding "UTF-8") (substitute* (remove (lambda (f) (or (string-contains f ".tar.") (string-contains f ".git/") (string-contains f ".so") (string-suffix? ".o" f) (string-suffix? ".a" f) (string-suffix? ".go" f) (string-suffix? ".pdf" f) (string-suffix? ".png" f) (string-suffix? ".info" f) (equal? (basename f) "guix-daemon") (equal? (basename f) "nix-setuid-helper") (string-contains f "nix-upstream/") (string-contains f "distro/packages/bootstrap/"))) (find-files "." "\\.[a-z]+$")) (("^([[:graph:]]+) This file is part of Guix." _ comment-start) (string-append comment-start " This file is part of GNU Guix.")) (("^([[:graph:]]+) Guix --- Nix package management.*" _ comment-start) (string-append comment-start " GNU Guix --- Functional package management for GNU\n")) (("^([[:graph:]]+) Guix is " _ comment-start) (string-append comment-start " GNU Guix is ")) (("^([[:graph:]]+) along with Guix." _ comment-start) (string-append comment-start " along with GNU Guix.")) (("^([[:graph:]]+) Copyright \\(C\\)" _ comment-start) (string-append comment-start " Copyright ©"))) Change headers using C-style comments manually.
* Merge branch 'nix-integration'Ludovic Courtès2012-12-13
|\ | | | | | | | | Conflicts: tests/guix-package.sh
| * tests: Skip network-dependent tests when the network is unreachable.Ludovic Courtès2012-12-13
| | | | | | | | | | | | | | | | | | | | | | | | * tests/builders.scm (network-reachable?): New variable. ("url-fetch", "gnu-build"): Skip unless NETWORK-REACHABLE?. * tests/derivations.scm (%coreutils): Check for network access. ("build-expression->derivation with one input"): Skip when %COREUTILS is #f. * tests/guix-package.sh: Skip installation of GNU Make when the network is unreachable. * tests/packages.scm ("GNU Make, bootstrap"): Likewise. * tests/union.scm ("union-build"): Likewise.
* | tests: Remove `t-profile' files on exit.Ludovic Courtès2012-12-12
| | | | | | | | | | * tests/guix-package.sh: Use a trap on EXIT to remove profile-related files. Reported by Andreas Enge <andreas@enge.fr>.
* | guix-package: Gracefully handle multiple installs of the same path.Ludovic Courtès2012-12-12
|/ | | | | | | | | * guix-package.in (guix-package)[process-actions]: Compute PACKAGES such that packages listed in INSTALL* are first removed from the remainder of the list. When PROF is equal to the previous profile's store path, do nothing. Reported by Andreas Enge <andreas@enge.fr>. * tests/guix-package.sh: Test the behavior of installing the same store path twice. When removing a package, omit its version number.
* guix-package: Extract version strings when installing a direct store path.Ludovic Courtès2012-11-19
| | | | | | * guix-package.in (guix-package)[process-actions]: Extract the version string from store paths. * tests/guix-package.sh: Adjust accordingly.
* guix-package: Add `--list-available'.Ludovic Courtès2012-11-19
| | | | | | | | | | * guix-package.in (show-help, %options): Add `--list-available'. (guix-package)[process-query]: Add support for `--list-available'. * doc/guix.texi (Invoking guix-package): Document it. * tests/guix-package.sh: Add test. * guix/ui.scm (location->string): New procedure. * guix/utils.scm: Export <location>.
* guix-package: Add `--list-installed'.Ludovic Courtès2012-11-19
| | | | | | | | | * guix-package.in (show-help, %options): Add `--list-installed'. (guix-package): Move main body to... [process-actions]: ... here. New internal procedure. [process-query]: New procedure. * tests/guix-package.sh: Add tests for `--list-installed'. * doc/guix.texi (Invoking guix-package): Document it.
* guix-package: Fix handling of the PACKAGE:OUTPUT syntax.Ludovic Courtès2012-11-07
| | | | | | | * guix-package.in (guix-package)[find-package]: Return the correct NAME and SUB-DRV when NAME contains #\:. * tests/guix-package.sh (profile): Add test.
* Add a preliminary `guix-package' command-line tool.Ludovic Courtès2012-11-01
* guix-package.in, tests/guix-package.sh: New files. * configure.ac: Output `guix-package'. * Makefile.am (TESTS): Add `tests/guix-package.sh'. (bin_SCRIPTS): Add `guix-package'.