This fixes runs of 'guix package' and 'guix system' tests in
environments where $HOME is read-only.
* guix/ui.scm (config-directory): Add #:ensure? parameter and honor it.
* guix/scripts.scm (warn-about-old-distro): Pass #:ensure? #f to
'config-directory'.
Fixes <http://bugs.gnu.org/25852>.
Suggested by Mark H Weaver <mhw@netris.org>.
* guix/scripts.scm (%distro-age-warning): New variable.
(warn-about-old-distro): New procedure.
* guix/scripts/package.scm (process-actions): Call
'warn-about-old-distro'.
* guix/scripts/system.scm (process-action): Likewise.
* emacs/guix-main.scm (process-package-actions): Set grafting according
to 'dry-run?'.
* guix/scripts.scm (build-package): Disable grafts when 'dry-run?' is #t.
Co-authored-by: Ludovic Courtès <ludo@gnu.org>
Suggested by Ludovic Courtès <ludo@gnu.org>.
* guix/scripts.scm (build-package-source): New procedure.
* emacs/guix-devel.el (guix-devel-build-package-source): New command.
(guix-devel-keys-map): Add key binding for it.
* doc/emacs.texi (Emacs Development): Document it.