From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35915) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dmoPW-0002D7-Ru for guix-patches@gnu.org; Tue, 29 Aug 2017 17:51:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dmoPW-0002y7-3D for guix-patches@gnu.org; Tue, 29 Aug 2017 17:51:02 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:52525) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dmoPV-0002xz-Vk for guix-patches@gnu.org; Tue, 29 Aug 2017 17:51:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dmoPV-0005rP-QB for guix-patches@gnu.org; Tue, 29 Aug 2017 17:51:01 -0400 Subject: [bug#28185] [PATCH] build: emacs-build-system: Make the install phase more helpful. Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <20170822171303.21754-1-mail@cbaines.net> Date: Tue, 29 Aug 2017 23:50:07 +0200 In-Reply-To: <20170822171303.21754-1-mail@cbaines.net> (Christopher Baines's message of "Tue, 22 Aug 2017 18:13:03 +0100") Message-ID: <878ti2qc1c.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Christopher Baines Cc: 28185@debbugs.gnu.org Christopher Baines skribis: > Modify the install phase to detect when nothing has been installed, and e= rror > 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 =E2=80=98when=E2=80=99 here, to clarify that this is for-effect. Ludo=E2=80=99.