ui: Factorize bug-report information in `--help'.
authorLudovic Courtès <ludo@gnu.org>
Sat, 5 Jan 2013 14:55:47 +0000 (15:55 +0100)
committerLudovic Courtès <ludo@gnu.org>
Sat, 5 Jan 2013 14:55:47 +0000 (15:55 +0100)
* 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.

guix-build.in
guix-download.in
guix-import.in
guix-package.in
guix/config.scm.in
guix/ui.scm
po/POTFILES.in

index 5136a2a..96ec018 100644 (file)
@@ -12,7 +12,7 @@ exec ${GUILE-@GUILE@} -L "@guilemoduledir@" -l "$0"    \
          -c "(apply $main (cdr (command-line)))" "$@"
 !#
 ;;; 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.
 ;;;
@@ -104,8 +104,7 @@ Build the given PACKAGE-OR-DERIVATION and return their output paths.\n"))
   (display (_ "
   -V, --version          display version information and exit"))
   (newline)
-  (format #t (_ "
-Report bugs to: ~a.~%") "@PACKAGE_BUGREPORT@"))
+  (show-bug-report-information))
 
 (define %options
   ;; Specifications of the command-line options.
index f76396b..50ad26a 100644 (file)
@@ -12,7 +12,7 @@ exec ${GUILE-@GUILE@} -L "@guilemoduledir@" -l "$0"    \
          -c "(apply $main (cdr (command-line)))" "$@"
 !#
 ;;; Guix --- Nix package management from Guile.
-;;; 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.
 ;;;
@@ -90,8 +90,7 @@ and the hash of its contents.\n"))
   (display (_ "
   -V, --version          display version information and exit"))
   (newline)
-  (format #t (_ "
-Report bugs to: ~a.~%") "@PACKAGE_BUGREPORT@"))
+  (show-bug-report-information))
 
 (define %options
   ;; Specifications of the command-line options.
index 5dc9370..e0441f4 100644 (file)
@@ -12,7 +12,7 @@ exec ${GUILE-@GUILE@} -L "@guilemoduledir@" -l "$0"    \
          -c "(apply $main (cdr (command-line)))" "$@"
 !#
 ;;; 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.
 ;;;
@@ -88,8 +88,7 @@ Import and convert the Nix expression ATTRIBUTE of NIXPKGS.\n"))
   (display (_ "
   -V, --version          display version information and exit"))
   (newline)
-  (format #t (_ "
-Report bugs to: ~a.~%") "@PACKAGE_BUGREPORT@"))
+  (show-bug-report-information))
 
 (define %options
   ;; Specification of the command-line options.
index fee1a39..cd27600 100644 (file)
@@ -12,7 +12,7 @@ exec ${GUILE-@GUILE@} -L "@guilemoduledir@" -l "$0"    \
          -c "(apply $main (cdr (command-line)))" "$@"
 !#
 ;;; 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.
 ;;;
@@ -217,8 +217,7 @@ Install, remove, or upgrade PACKAGES in a single transaction.\n"))
   (display (_ "
   -V, --version          display version information and exit"))
   (newline)
-  (format #t (_ "
-Report bugs to: ~a.~%") "@PACKAGE_BUGREPORT@"))
+  (show-bug-report-information))
 
 (define %options
   ;; Specification of the command-line options.
index c5ebd39..321323c 100644 (file)
@@ -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@")
 
index 4fc0dd0..6c14879 100644 (file)
@@ -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))
                  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)
index fcc84f3..fbcd957 100644 (file)
@@ -7,3 +7,4 @@ distro/packages/recutils.scm
 guix/ui.scm
 guix-build.in
 guix-download.in
+guix-package.in