summaryrefslogtreecommitdiff
path: root/tests/guix-package.sh
AgeCommit message (Collapse)Author
2013-09-27guix package: '--delete-generations' deletes generations older than specified.Ludovic Courtès
* 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'.
2013-09-27tests: Fix typo.Ludovic Courtès
* tests/guix-package.sh: Add missing "-p" option.
2013-09-26guix package: Add '--delete-generations'.Nikita Karetnikov
* 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'.
2013-09-25guix package: Show which generation is the current one.Nikita Karetnikov
* 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.
2013-09-25tests: Use 'test -z' to check that a string equals zero.Nikita Karetnikov
2013-09-25guix package: Do not list the zeroth generation.Nikita Karetnikov
* 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.
2013-09-25guix package: Exit with 1 when a generation cannot be listed.Nikita Karetnikov
* 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.
2013-09-19guix package: Add '--list-generations'.Nikita Karetnikov
* 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'.
2013-09-18tests: Clarify filtering of the "debug" output.Ludovic Courtès
* tests/guix-package.sh: Clearly filter out the "debug" output of 'gnu-make-boot0'.
2013-07-10tests: Fix guix-package.sh in the presence of multiple-output `make'.Ludovic Courtès
* tests/guix-package.sh: For $boot_make_drv, take only the "out" output. Reported by Nikita Karetnikov <nikita@karetnikov.org>.
2013-05-10package: Store the output path of packages installed with `-e'.Ludovic Courtès
* 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.
2013-04-28guix package: Add `--search-paths' & co.Ludovic Courtès
* 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'.
2013-04-18tests: Use a new synopsis of GNU Hello.Nikita Karetnikov
* tests/guix-package.sh: Use a new synopsis of GNU Hello, which was added in f50d2669e3e624365221cc81918ba55fdce94107.
2013-03-01guix package: Add `--install-from-expression'.Ludovic Courtès
* 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'.
2013-02-16Replace individual scripts with master 'guix' script.Mark H Weaver
* 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.
2013-02-06guix-package: Test installation of packages by name.Ludovic Courtès
* tests/guix-package.sh: Remove `boot_guile'. Replace occurrences of $boot_guile by the `guile-bootstrap' package name.
2013-02-01guix-package: Report `--search' matches in recutils format.Ludovic Courtès
* 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.
2013-02-01guix-package: Gracefully report non-existing outputs.Ludovic Courtès
* guix-package.in (guix-package)[find-package](ensure-output): New procedure. Use it to validate SUB-DRV.
2013-01-28guix-package: Add '--search'.Nikita Karetnikov
* 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.
2013-01-27guix-package: Always use the next number for new generations.Ludovic Courtès
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.
2013-01-27guix-package: When rolling back to nothingness, point to the empty profile.Ludovic Courtès
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.
2013-01-24guix-package: Error out when passed a non-option argument.Ludovic Courtès
* 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.
2013-01-22guix-package: Fix `--roll-back' when `--profile' is not passed.Ludovic Courtès
* 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.
2013-01-18distro: Change the module name space to (gnu ...).Ludovic Courtès
* 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.
2013-01-17guix-package: Allow `--roll-back' to skip missing generations.Ludovic Courtès
* 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".
2013-01-17guix-package: Add `--roll-back'.Ludovic Courtès
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'.
2013-01-14guix-package: Create or diagnose missing profile directory.Ludovic Courtès
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.
2013-01-14tests: Use "binutils:lib" as the `guix-package' example.Ludovic Courtès
* tests/guix-package.sh: Use "binutils:lib" instead of "libsigsegv:lib", since the latter no longer exists.
2013-01-07guix-package: Remove `-b' shorthand for `--bootstrap'.Ludovic Courtès
* guix-package.in (%options): Remove #\b as an alternate for "bootstrap". (show-help): Adjust accordingly. * tests/guix-package.sh: Use `--bootstrap' instead of `-b'.
2013-01-06Update license headers.Ludovic Courtès
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.
2012-12-13Merge branch 'nix-integration'Ludovic Courtès
Conflicts: tests/guix-package.sh
2012-12-13tests: Skip network-dependent tests when the network is unreachable.Ludovic Courtès
* 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.
2012-12-12tests: Remove `t-profile' files on exit.Ludovic Courtès
* tests/guix-package.sh: Use a trap on EXIT to remove profile-related files. Reported by Andreas Enge <andreas@enge.fr>.
2012-12-12guix-package: Gracefully handle multiple installs of the same path.Ludovic Courtès
* 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.
2012-11-19guix-package: Extract version strings when installing a direct store path.Ludovic Courtès
* guix-package.in (guix-package)[process-actions]: Extract the version string from store paths. * tests/guix-package.sh: Adjust accordingly.
2012-11-19guix-package: Add `--list-available'.Ludovic Courtès
* 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>.
2012-11-19guix-package: Add `--list-installed'.Ludovic Courtès
* 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.
2012-11-07guix-package: Fix handling of the PACKAGE:OUTPUT syntax.Ludovic Courtès
* guix-package.in (guix-package)[find-package]: Return the correct NAME and SUB-DRV when NAME contains #\:. * tests/guix-package.sh (profile): Add test.
2012-11-01Add a preliminary `guix-package' command-line tool.Ludovic Courtès
* 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'.