diff options
author | Ludovic Courtès <ludo@gnu.org> | 2013-01-05 15:55:47 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2013-01-05 15:55:47 +0100 |
commit | 3441e164976c14ef8bf9a95ab4130ca25ac85e70 (patch) | |
tree | 3ca362753fb13ae279d178291fae4f3147abd8d5 /guix | |
parent | 706d0641cfede33c70edaee5be49251388b8a000 (diff) | |
download | gnu-guix-3441e164976c14ef8bf9a95ab4130ca25ac85e70.tar gnu-guix-3441e164976c14ef8bf9a95ab4130ca25ac85e70.tar.gz |
ui: Factorize bug-report information in `--help'.
* guix/config.scm.in (%guix-home-page-url): New variable.
* guix/ui.scm (show-bug-report-information): New procedure.
* guix-build.in (show-help): Use it.
* guix-download.in (show-help): Likewise.
* guix-import.in (show-help): Likewise.
* guix-package.in (show-help): Likewise.
Diffstat (limited to 'guix')
-rw-r--r-- | guix/config.scm.in | 6 | ||||
-rw-r--r-- | guix/ui.scm | 12 |
2 files changed, 16 insertions, 2 deletions
diff --git a/guix/config.scm.in b/guix/config.scm.in index c5ebd39fae..321323c003 100644 --- a/guix/config.scm.in +++ b/guix/config.scm.in @@ -1,5 +1,5 @@ ;;; Guix --- Nix package management from Guile. -*- coding: utf-8 -*- -;;; Copyright (C) 2012 Ludovic Courtès <ludo@gnu.org> +;;; Copyright (C) 2012, 2013 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of Guix. ;;; @@ -20,6 +20,7 @@ #:export (%guix-package-name %guix-version %guix-bug-report-address + %guix-home-page-url %store-directory %state-directory %system @@ -42,6 +43,9 @@ (define %guix-bug-report-address "@PACKAGE_BUGREPORT@") +(define %guix-home-page-url + "@PACKAGE_URL@") + (define %store-directory "@storedir@") diff --git a/guix/ui.scm b/guix/ui.scm index 4fc0dd089a..6c148797ee 100644 --- a/guix/ui.scm +++ b/guix/ui.scm @@ -1,5 +1,5 @@ ;;; Guix --- Nix package management from Guile. -*- coding: utf-8 -*- -;;; Copyright (C) 2012 Ludovic Courtès <ludo@gnu.org> +;;; Copyright (C) 2012, 2013 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of Guix. ;;; @@ -28,6 +28,7 @@ N_ leave show-version-and-exit + show-bug-report-information call-with-error-handling with-error-handling location->string)) @@ -56,6 +57,15 @@ command %guix-package-name %guix-version) (exit 0)) +(define (show-bug-report-information) + (format #t (_ " +Report bugs to: ~a.") %guix-bug-report-address) + (format #t (_ " +~a home page: <~a>") %guix-package-name %guix-home-page-url) + (display (_ " +General help using GNU software: <http://www.gnu.org/gethelp/>")) + (newline)) + (define (call-with-error-handling thunk) "Call THUNK within a user-friendly error handler." (guard (c ((package-input-error? c) |