~ruther/guix-local

ref: e5ffe52cc7d0fa3242e3cd11f63c94deab91a3d5 guix-local/guix/ui.scm -rw-r--r-- 33.0 KiB
93be4e8e — Ludovic Courtès 11 years ago
Merge branch 'master' into core-updates
e9c1e22f — Ludovic Courtès 11 years ago
ui: Add missing copyright line.

* guix/ui.scm: Add copyright line for Deck (aka. nebuli).
cf6ce3e6 — Ludovic Courtès 11 years ago
ui: Honor --no-* options passed via $GUIX_BUILD_OPTIONS.

Reported by Alex Kost <alezost@gmail.com>
at <http://lists.gnu.org/archive/html/guix-devel/2015-02/msg00702.html>.

* guix/ui.scm (parse-command-line)[parse-options-from]: Add 'seeds'
  parameter.
  Thread the result of the first 'parse-options-from' call to the
  second.
b3f21389 — Ludovic Courtès 11 years ago
ui: Factorize command-line + env. var. option parsing.

* guix/ui.scm (%default-argument-handler, parse-command-line): New
  procedures.
  (environment-build-options): Make private.
* guix/scripts/archive.scm (guix-archive)[parse-options,
  parse-options-from]: Remove.  Use 'parse-command-line' instead.
* guix/scripts/build.scm (guix-build): Likewise.
* guix/scripts/environment.scm (guix-environment): Likewise.
* guix/scripts/package.scm (guix-package): Likewise.
* guix/scripts/system.scm (guix-system): Likewise.
* tests/ui.scm (with-environment-variable): New macro.
  ("parse-command-line"): New test.
46b23e1a — Ludovic Courtès 11 years ago
profiles: Distinguish downgrades from upgrades.

Fixes <http://bugs.gnu.org/19764>.

* guix/profiles.scm (manifest-transaction-effects): Return downgraded
  packages as a fourth value.
* guix/ui.scm (show-manifest-transaction): Adjust accordingly.
* tests/profiles.scm ("manifest-transaction-effects and downgrades"):
  New test.
b7071bc5 — Ludovic Courtès 11 years ago
ui: Properly report '&nar-error' conditions.

This is a followup to 46b8aad.

* guix/ui.scm (call-with-error-handling): Add 'nar-error?' case.
9250b304 — Ludovic Courtès 11 years ago
ui: Update copyright year in '--version' output.

* guix/ui.scm (show-version-and-exit): Increment copyright year.
f304c9c2 — Ludovic Courtès 11 years ago
derivations: Raise an error for references to non-existent outputs.

Fixes <http://bugs.gnu.org/19630>.
Reported by Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>.

* guix/derivations.scm (&derivation-error,
  &derivation-missing-output-error): New error conditions.
  (derivation->output-path): Raise a '&derivation-missing-output-error'
  if OUTPUT is not an output of DRV.
* guix/ui.scm (call-with-error-handling): Add case for
  'derivation-missing-output-error?'.
  (show-what-to-build): Check whether (derivation-outputs drv) is
  empty.
* tests/packages.scm ("reference to non-existent output"): Add test.
70e629f5 — Ludovic Courtès 11 years ago
guix system: Improve error messages.

* guix/ui.scm (report-error): Export.
* guix/scripts/system.scm (read-operating-system): Report syntax errors
  using standard GNU format.  Report other errors using 'display-error'.
77448857 — Mark H Weaver 11 years ago
Merge branch 'master' into core-updates
e9651e39 — Ludovic Courtès 11 years ago
derivations: Add 'substitution-oracle' and use it.

This makes 'guix environment PACKAGE' significantly faster when
substitutes are enabled.  Before that, it would lead to many invocations
of 'guix substitute-binary', one per 'derivation-prerequisites-to-build'
call.  Now, all these are replaced by a single invocation.

* guix/derivations.scm (derivation-output-paths, substitution-oracle):
  New procedures.
  (derivation-prerequisites-to-build): Replace #:use-substitutes? with
  #:substitutable?.  Remove the local 'derivation-output-paths' and
  'substitutable?'.
* guix/ui.scm (show-what-to-build): Add 'substitutable?'.  Pass it to
  'derivation-prerequisites-to-build'.
  [built-or-substitutable?]: Use it instead of 'has-substitutes?'.
* tests/derivations.scm ("derivation-prerequisites-to-build and
  substitutes"): Use #:substitutable? instead of #:use-substitutes?.
c4a1b6c2 — Ludovic Courtès 11 years ago
Merge branch 'master' into 'core-updates'.
16eb115e — nebuli 11 years ago
guix: scripts: Add GUIX_BUILD_OPTIONS environment handling.

* doc/guix.texi (Invoking guix build): Mention 'GUIX_BUILD_OPTIONS'.
* guix/scripts/archive.scm: (append args (environment-build-options)).
* guix/scripts/build.scm: Ditto.
* guix/scripts/environment.scm: Ditto.
* guix/scripts/package.scm: Ditto.
* guix/scripts/system.scm: Ditto.
* guix/ui.scm (environment-build-options): New function.
* guix/utils.scm (arguments-from-environment-variable): New function.
* tests/guix-build.sh: Add tests.
* test-env.in: Unset GUIX_BUILD_OPTIONS.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
c0c018f1 — Alex Kost 11 years ago
profiles: Add condition types for profiles and generations.

Suggested by Ludovic Courtès.

* guix/profiles.scm (&profile-error, &profile-not-found-error,
  &missing-generation-error): New condition types.
* guix/ui.scm (call-with-error-handling): Handle new types.
* guix/scripts/package.scm (roll-back, guix-package): Raise
  '&profile-not-found-error' where needed.
5d7a8584 — Alex Kost 11 years ago
ui: Move 'show-manifest-transaction' from (guix profiles).

* guix/profiles.scm: Do not use (guix ui) module.
  (right-arrow, manifest-show-transaction): Move and rename to...
* guix/ui.scm (right-arrow, show-manifest-transaction): ... here.
* tests/profiles.scm ("manifest-show-transaction"): Move to...
* tests/ui.scm ("show-manifest-transaction"): ... here.
  (guile-1.8.8, guile-2.0.9): New variables.
* emacs/guix-main.scm (process-package-actions): Rename
  'manifest-show-transaction' to 'show-manifest-transaction'.
* guix/scripts/package.scm (guix-package): Likewise.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
12703d08 — Ludovic Courtès 11 years ago
ui: Make sure we use the right domain for &message translation.

* guix/ui.scm (call-with-error-handling): Add %GETTEXT-DOMAIN as a
  second argument to 'gettext'.
4a44d7bb — Ludovic Courtès 11 years ago
ui: Recognize the same size units as Coreutils.

* guix/ui.scm (size->number): Add a bunch of large units.  Recognize
  one-letter unit names.  Change "KB" to "kB".
* tests/ui.scm ("size->number, 1T"): New test.
* doc/guix.texi (Invoking guix gc): Add cross-reference to "Block size"
  in the Coreutils manual.
  (Invoking guix system): Likewise.
59758816 — Ludovic Courtès 11 years ago
pull: Create ~/.config/guix if needed instead of bailing out gracelessly.

Previously 'guix pull' would just fail with "No such file or directory"
if ~/.config didn't already exist.

* guix/ui.scm (config-directory): Use 'mkdir-p' instead of 'mkdir'.
  Change the 'catch' handler to expect errors different from EEXIST.
647cfda8 — Mark H Weaver 11 years ago
Merge branch 'master' into core-updates
3a09e1d2 — Cyrill Schenkel 11 years ago
ui: Fix handling of periods by fill-paragraph.

Fixes <http://bugs.gnu.org/17468>.

* guix/ui.scm (fill-paragraph): Two spaces after period and no spaces before newline.
* tests/ui.scm: New test case.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Next