summaryrefslogtreecommitdiff
path: root/guix/scripts
AgeCommit message (Collapse)Author
2013-09-23guix package: Show most recently installed packages last.Ludovic Courtès
Suggested by Andreas Enge <andreas@enge.fr>. * guix/scripts/package.scm (guix-package)[list-generations, list-installed]: Reverse the result of 'manifest-packages'. * doc/guix.texi (Invoking guix package): Document the order of packages for '--list-generations' and '--list-installed'.
2013-09-21guix package: Sort the list of generation numbers in '--list-generations'.Ludovic Courtès
* guix/scripts/package.scm (generation-numbers): Sort the result.
2013-09-21guix package: Internationalize "Generation" string.Ludovic Courtès
* guix/scripts/package.scm (guix-package): Internationalize generation listing.
2013-09-21pull: Adjust to 'derivation' API change.Ludovic Courtès
Fixes <http://bugs.gnu.org/15428>. Reported by Cyrill Schenkel <cyrill.schenkel@gmail.com>. * guix/scripts/pull.scm (guix-pull): 'unpack' returns a single value.
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-18derivations: 'derivation' and related procedures return a single value.Ludovic Courtès
* guix/derivations.scm (derivation->output-path, derivation->output-paths): New procedures. (derivation-path->output-path): Use 'derivation->output-path'. (derivation-path->output-paths): Use 'derivation->output-paths'. (derivation): Accept 'derivation?' objects as inputs. Return a single value. (build-derivations): New procedure. (compiled-modules): Use 'derivation->output-paths'. (build-expression->derivation)[source-path]: Add case for when the input matches 'derivation?'. [prologue]: Accept 'derivation?' objects in INPUTS. [mod-dir, go-dir]: Use 'derivation->output-path'. * guix/download.scm (url-fetch): Adjust to the single-value return. * guix/packages.scm (package-output): Use 'derivation->output-path'. * guix/scripts/build.scm (guix-build): When the argument is 'derivation-path?', pass it through 'read-derivation'. Use 'derivation-file-name' to print out the .drv file names, and to register them. Use 'derivation->output-path' instead of 'derivation-path->output-path'. * guix/scripts/package.scm (roll-back): Adjust to the single-value return. (guix-package): Use 'derivation->output-path'. * guix/ui.scm (show-what-to-build): Adjust to deal with 'derivation?' objects instead of .drv file names. * gnu/system/grub.scm (grub-configuration-file): Use 'derivation->output-path' instead of 'derivation-path->output-path'. * gnu/system/vm.scm (qemu-image, system-qemu-image): Likewise. * tests/builders.scm, tests/derivations.scm, tests/packages.scm, tests/store.scm, tests/union.scm: Adjust to the new calling convention. * doc/guix.texi (Defining Packages, The Store, Derivations): Adjust accordingly.
2013-09-13substitute-binary: Add '--help'.Ludovic Courtès
Reported by Nikita Karetnikov <nikita@karetnikov.org>. * guix/scripts/substitute-binary.scm (show-help): New procedure. (guix-substitute-binary): Add '--help'.
2013-09-13guix package: Rename generation-related procedures.Nikita Karetnikov
* guix/scripts/package.scm (profile-numbers): Rename to 'generation-numbers'. (previous-profile-number): Rename to 'previous-generation-number'. (profile-number): Rename to 'generation-number'. (roll-back): Rename 'previous-profile' to 'previous-generation'.
2013-09-03pull: Compile files in the lexicographic order.Ludovic Courtès
* guix/scripts/pull.scm (unpack): Print the name of the file being compiled. Sort the names of files to compile.
2013-09-02substitute-binary: Show the Nar size, when available.Ludovic Courtès
* guix/scripts/substitute-binary.scm (guix-substitute-binary)["--substitute"]: Show the Nar size, when available. * guix/ui.scm (show-what-to-build): Add 'TODO'.
2013-08-23utils: Add `guile-version>?', and use it.Ludovic Courtès
This fixes Guile version comparisons when (version) has a vendor-specific suffix. Reported by Andreas Enge <andreas@enge.fr>. * guix/utils.scm (guile-version>?): New procedure. * tests/utils.scm ("guile-version>? 1.8", "guile-version>? 10.5"): New tests. * guix/scripts/substitute-binary.scm (fetch, progress-report-port): Use `guile-version>?' instead of `version>?'. * guix/http-client.scm (when-guile<=2.0.5, http-fetch): Likewise.
2013-08-22substitute-binary: Try hard to avoid port buffering.Ludovic Courtès
* guix/scripts/substitute-binary.scm (fetch): In the `file' case, open with the `b' flag, so that the coding cookie reading thing doesn't lead to buffering some of the data (on 2.0.5). * tests/utils.scm ("filtered-port, file"): Open with `r0b'. Fixes a test failure with Guile 2.0.5 whereby the first byte of FILE would be missing from DECOMPRESSED.
2013-08-21substitute-binary: Don't pretend to report download progress on Guile 2.0.5.Ludovic Courtès
* guix/scripts/substitute-binary.scm (progress-report-port): On Guile 2.0.5, return PORT directly and emit a warning.
2013-07-15guix package: Allow separate install of several outputs of the same package.Ludovic Courtès
* guix/scripts/package.scm (guix-package)[process-actions](same-package?): New procedure. Use it instead of `alist-delete' when filtering out duplicate packages from the profile.
2013-07-14Rename (guix web) to (guix http-client).Ludovic Courtès
* guix/web.scm: Rename to... * guix/http-client.scm: ... this. * guix/gnu-maintenance.scm, guix/scripts/substitute-binary.scm, Makefile.am, po/POTFILES.in: Update accordingly.
2013-07-12guix package: Fix handling of `-e'.Ludovic Courtès
This fixes a bug whereby a command like guix package -e '(@@ (gnu packages base) gnu-make-boot0)' would only succeed when the outputs of that package are available, and otherwise fail with "/nix/store/... is not valid". * guix/scripts/package.scm (guix-package)[process-action](package->tuple): Leave P as is in the result. Move `package->tuple' call from INSTALL* to INSTALL.
2013-07-12guix package: Reuse FTP connections for subsequent `latest-release' calls.Ludovic Courtès
* guix/gnu-maintenance.scm (latest-release): Add `ftp-close' and `ftp-open' keyword parameters. * guix/scripts/package.scm (ftp-open*): New variable. (check-package-freshness): Call `latest-release' with `ftp-open*' and a no-op procedure.
2013-07-11substitute-binary: Directly replace the global `regexp-exec'.Ludovic Courtès
* guix/scripts/substitute-binary.scm (%regexp-exec-mutex, string->uri): Remove. (regexp-exec): Replace this global binding by a thread-safety wrapper. (fields->alist): Remove `with-mutex', and directly alias `recutils->alist'.
2013-07-11substitute-binary: Increase the default timeout.Ludovic Courtès
* guix/scripts/substitute-binary.scm (%fetch-timeout): Set to 5 seconds.
2013-07-11guix refresh: Keep only the newest versions of packages as upgrade candidates.Ludovic Courtès
* guix/scripts/refresh.scm (guix-refresh)[keep-newest]: New procedure. Use it to keep only once copy of each package.
2013-07-10records: Add `recutils->alist' for public consumption.Ludovic Courtès
* guix/records.scm (%recutils-field-rx): New variable. (recutils->alist): New procedure, formerly known as `fields->alist'. * guix/scripts/substitute-binary.scm (fields->alist): Use it. * tests/records.scm ("recutils->alist"): New test.
2013-07-03Use `port-sha256' and `open-sha256-port'.Ludovic Courtès
* guix/derivations.scm (derivation-hash): Add comment as to why we keep the plain `sha256' call. * guix/scripts/download.scm (guix-download): Use `port-sha256' instead of (compose sha256 get-bytevector-all). * guix/scripts/refresh.scm (update-package): Likewise.
2013-07-01Move `sha256' to (guix hash).Ludovic Courtès
* guix/utils.scm (sha256): Move to... * guix/hash.scm: ... here. New file. * Makefile.am (MODULES): Add it. * guix/derivations.scm, guix/scripts/download.scm, guix/scripts/hash.scm, guix/scripts/refresh.scm, tests/base32.scm, tests/derivations.scm, tests/store.scm: Use (guix hash).
2013-06-29substitute-binary: Avoid dangling connections to the server.Ludovic Courtès
* guix/web.scm (open-socket-for-uri): New procedure. (http-fetch): Add `port' keyword parameter; use it. * guix/scripts/substitute-binary.scm (%random-state): New variable. (with-timeout): Wait a little before retrying. (fetch): Use `open-socket-for-uri', and keep a copy of the socket in variable `port'. Close PORT upon timeout.
2013-06-20package: Fix i18n of the number of packages message.Ludovic Courtès
* guix/scripts/package.scm (guix-package)[process-actions]: Use `N_' for i18n of the number of packages message.
2013-06-20substitute-binary: Report progress while downloading.Ludovic Courtès
* guix/scripts/substitute-binary.scm (decompressed-port): Improve docstring. (progress-report-port): New procedure. (guix-substitute-binary)["--substitute"]: Use it to report progress. * guix/build/download.scm: Export `progress-proc' and `uri-abbreviation'.
2013-06-19package: Display the number of installed packages upon completion.Ludovic Courtès
* guix/scripts/package.scm (guix-package)[process-actions]: Display the number of packages in the profile upon completion.
2013-06-18substitute-binary: Provide feedback when the server is unresponsive.Ludovic Courtès
* guix/scripts/substitute-binary.scm (%fetch-timeout): New variable. (with-timeout): New macro. (fetch): Add `timeout?' keyword parameter. Enclose `http-fetch' call in `with-timeout'. (guix-substitute-binary): Call `fetch' with #:timeout? #f.
2013-06-13guix gc: Add `--requisites'.Ludovic Courtès
* guix/scripts/gc.scm (show-help, %options): Add `--requisites'. (guix-gc): Handle it. * doc/guix.texi (Invoking guix gc): Document `--requisites'. * NEWS: Update.
2013-06-10guix refresh: Add '--key-download'.Nikita Karetnikov
* guix/gnu-maintenance.scm (download-tarball): Add a 'key-download' keyword argument and pass it to 'gnupg-verify*'. Make 'archive-type' a keyword argument. (package-update): Add a 'key-download' keyword argument. Pass 'archive-type' and 'key-download' keyword arguments to 'download-tarball'. * guix/gnupg.scm: Import (ice-9 i18n) and (guix ui). (gnupg-verify*): Add a 'key-download' keyword argument and adjust 'gnupg-verify*' to use it. Make 'server' a keyword argument. * guix/scripts/refresh.scm (show-help, %options): Add and document '--key-download'. (update-package): Add a 'key-download' keyword argument and pass it to 'package-update'. (guix-refresh): Pass 'key-download' to 'update-package'. Limit lines to a maximum of 79 characters.
2013-06-04substitute-binary: Don't cache .narinfo lookups when lacking networking.Ludovic Courtès
* guix/scripts/substitute-binary.scm (lookup-narinfo): Don't cache NARINFO when CACHE is #f.
2013-05-29substitute-binary: Gracefully exit upon networking errors.Ludovic Courtès
Suggested by Andreas Enge <andreas@enge.fr>. * guix/scripts/substitute-binary.scm (with-networking): New macro. (guix-substitute-binary): Wrap the body in `with-networking'.
2013-05-29build, package: Add `--fallback' option.Ludovic Courtès
* guix/scripts/build.scm (%options, show-help): Add `--fallback'. (guix-build): Call `set-build-options' with #:fallback?. * guix/scripts/package.scm (%options, show-help): Add `--fallback'. (guix-package): Call `set-build-options' with #:fallback?. * doc/guix.texi (Invoking guix package, Invoking guix build): Document `--fallback'.
2013-05-24package: Fix default profile ownership check when it's just been created.Ludovic Courtès
* guix/scripts/package.scm (guix-package)[ensure-default-profile]: Check whether S is true before checking its owner. Fixes the case where we built %PROFILE-DIRECTORY just above.
2013-05-24build: Add `--target' option.Ludovic Courtès
* guix/scripts/build.scm (derivations-from-package-expressions): Add `package-derivation' parameter. (show-help, %options): Add `--target'. (guix-build): Use `package-cross-derivation' when `--target' is passed. * tests/guix-build.sh: Add dry-run test with `--target'. * doc/guix.texi (Invoking guix build): Document `--target'.
2013-05-20Add `--max-silent-time' to `guix build' and `guix package'.Ludovic Courtès
* guix/scripts/build.scm (%default-options): Add default `max-silent-time' value. (show-help, %options): Add `--max-silent-time'. (guix-build): Pass `max-silent-time' to `set-build-options'. * guix/scripts/package.scm (%default-options): Add default `max-silent-time' value. (show-help, %options): Add `--max-silent-time'. (guix-package): Pass `max-silent-time' to `set-build-options'. * guix/ui.scm (string->number*): New procedure. * tests/derivations.scm ("build-expression->derivation and max-silent-time"): New test. * doc/guix.texi (Invoking guix package, Invoking guix build): Document `--max-silent-time'.
2013-05-16package: Make sure the profile directory is owned by the user.Ludovic Courtès
* guix/scripts/package.scm (guix-package)[ensure-default-profile]: Check the owner of %PROFILE-DIRECTORY. Report an error when the owner is not the current user. Add `rtfm' procedure. * doc/guix.texi (Invoking guix package): Mention the ownership test.
2013-05-15substitute-binary: Pass `filtered-port' an unbuffered port.Ludovic Courtès
This fixes a bug whereby `read-response' would read more than just the response, with the extra data going into the port's buffer; the "bzip2 -dc" process spawned by `filtered-port' would not see the those buffered data, which are definitely lost, and would bail out with "bzip2: (stdin) is not a bzip2 file." * guix/utils.scm (filtered-port): Document that INPUT must be unbuffered. * guix/web.scm (http-fetch): Add `buffered?' parameter. Call `open-socket-for-uri' explicitly, and call `setvbuf' when BUFFERED? is false. Pass the port to `http-get'. Close it upon 301/302. * guix/scripts/substitute-binary.scm (fetch): Add `buffered?' parameter. Pass it to `http-fetch'; honor it for `file' URIs. (guix-substitute-binary): Call `fetch' with #:buffered? #f for port RAW. * tests/utils.scm ("filtered-port, file"): Open FILE as unbuffered.
2013-05-14substitute-binary: Work around thread-unsafe `regexp-exec'.Ludovic Courtès
* guix/scripts/substitute-binary.scm (%regexp-exec-mutex): New variable. (string->uri): New procedure. (fields->alist): Wrap `regexp-exec' call in `with-mutex'.
2013-05-14package: Always clear the SIGINT handler.Ludovic Courtès
* guix/scripts/package.scm (call-with-sigint-handler): Wrap THUNK in `dynamic-wind' so that the SIGINT handler is always cleared.
2013-05-14ftp-client: Let callers handle `ftp-open' exceptions.Ludovic Courtès
* guix/ftp-client.scm (ftp-open): Let exceptions through. * guix/scripts/package.scm (waiting): Wrap EXP in a `dynamic-wind', so the line is always cleared.
2013-05-12Move record utilities to (guix records).Ludovic Courtès
* guix/utils.scm (define-record-type*): Move to... * guix/records.scm: ... here. New file. * guix/build-system.scm, guix/packages.scm: Use it. * guix/gnu-maintenance.scm: Likewise. (official-gnu-packages)[alist->record]: Remove. * guix/scripts/substitute-binary.scm: Likewise. (alist->record, object->fields): Remove. * tests/utils.scm ("define-record-type*", "define-record-type* with letrec* behavior", "define-record-type* & inherit", "define-record-type* & inherit & letrec* behavior", "define-record-type* & thunked", "define-record-type* & thunked & default", "define-record-type* & thunked & inherited"): Move to... * tests/records.scm: ... here. New file.
2013-05-11tests: Add `guix hash' test.Ludovic Courtès
* guix/scripts/hash.scm (guix-hash)[eof->null]: New procedure. Use it to convert the EOF object to the empty bytevector. * tests/guix-hash.sh: New file. * Makefile.am (SH_TESTS): Add it.
2013-05-11refresh: Add `--key-server' and `--gpg'.Ludovic Courtès
* guix/scripts/refresh.scm (%options): Add `--key-server' and `--gpg'. (show-help): Update accordingly. (update-package): New procedure, formerly in `guix-refresh'. (guix-refresh): Use it. Parameterize `%openpgp-key-server' and `%gpg-command'.
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-05-10package: Make sure the dependencies get built along with the manifest.Ludovic Courtès
Before this, something like "guix package -i glibc" could fail because glibc lists linux-libre-headers as a propagated input (which would be added as a dependency in the manifest) but the linux-libre-headers output could be unavailable, leading to an error like this: path `/nix/store/4v2bk8sx5cm166gks3fi3q7d9zchibnk-linux-libre-headers-3.3.8' is not valid This patch adds such dependencies as inputs of the profile derivation. * guix/scripts/package.scm (profile-derivation): Accept package objects in the `deps' field of an element of PACKAGES. Convert them to their output path for BUILDER, and add them to the inputs of the `build-expression->derivation' call. (input->name+path): When INPUT doesn't contain a package object, return it as is. (guix-package)[process-actions](canonicalize-deps): Expect DEPS to contain package objects, and leave them as is.
2013-05-10refresh: Gracefully handle failure to download a tarball.Ludovic Courtès
* guix/scripts/refresh.scm (guix-refresh): When updating a source file, gracefully handle the case where TARBALL is #f. Reported by Nikita Karetnikov <nikita@karetnikov.org>.
2013-05-10package: Use ~/.guix-profile as the default for --search-paths.Ludovic Courtès
* guix/scripts/package.scm (search-path-environment-variables): Prefer %USER-ENVIRONMENT-DIRECTORY when it points to PROFILE. (display-search-paths): Use 3 spaces for indentation.
2013-05-08package: Display the output of packages to be installed/removed.Ludovic Courtès
* guix/scripts/package.scm (guix-package)[show-what-to-remove/install]: Display the output name.
2013-05-08package: Preserve the installed package output when upgrading.Ludovic Courtès
* guix/scripts/package.scm (guix-package)[find-package]: Add optional parameter `output'. Use it. [process-actions]: When computing UPGRADE, pass OUTPUT to `find-package'.