guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#28185] [PATCH] build: emacs-build-system: Make the install phase mo


From: Ludovic Courtès
Subject: [bug#28185] [PATCH] build: emacs-build-system: Make the install phase more helpful.
Date: Tue, 29 Aug 2017 23:50:07 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

Christopher Baines <address@hidden> skribis:

> Modify the install phase to detect when nothing has been installed, and error
> if this happens. This is preferable to continuing, and allowing the next phase
> to fail.
>
> Also, when nothing can be found to be installed, print out each file that was
> considered, along with the regular expressions that were used to include and
> exclude it.
>
> * gnu/build/emacs-build-system.scm (install-file?): Add additional error
>   checking and logging.

Nitpicking:

> +  (define* (install-file? file stat #:key verbose?)
> +    (let* ((stripped-file (string-trim
> +                           (string-drop file (string-length source)) #\/)))
> +      (define (match-stripped-file action regex)
> +        (let ((result (string-match regex stripped-file)))
> +          (if (and result verbose?)
> +              (format #t "info: ~A ~A as it matches \"~A\"\n"
> +                      stripped-file action regex))
> +          result))
> +
> +      (if verbose?
> +          (format #t "info: considering installing ~A\n" stripped-file))

Use ‘when’ here, to clarify that this is for-effect.

Ludo’.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]