GNU bug report logs - #28185
[PATCH] build: emacs-build-system: Make the install phase more helpful.

Previous Next

Package: guix-patches;

Reported by: Christopher Baines <mail <at> cbaines.net>

Date: Tue, 22 Aug 2017 17:14:01 UTC

Severity: normal

Tags: patch

Done: Christopher Baines <mail <at> cbaines.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: ludo <at> gnu.org (Ludovic Courtès)
To: Christopher Baines <mail <at> cbaines.net>
Cc: 28185 <at> debbugs.gnu.org
Subject: [bug#28185] [PATCH] build: emacs-build-system: Make the install phase more helpful.
Date: Wed, 30 Aug 2017 10:39:09 +0200
Christopher Baines <mail <at> cbaines.net> skribis:

> On Tue, 29 Aug 2017 23:50:07 +0200
> ludo <at> gnu.org (Ludovic Courtès) wrote:
>
>> Christopher Baines <mail <at> cbaines.net> 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.
>
> I've sent an updated patch which uses when.

LGTM!

> One final issue, as this changes the build system, every package that
> uses it will need to be rebuilt. My count puts this at 162, which
> suggests that this is fine to go straight on the master branch.

Definitely, and these are very small packages anyway.

Ludo’.




This bug report was last modified 7 years and 322 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.