all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] emacs: build-log: Improve regexp for the phase end.
@ 2015-09-24 13:17 Alex Kost
  2015-09-24 19:34 ` Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: Alex Kost @ 2015-09-24 13:17 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 700 bytes --]

I've noticed that some¹ logs on hydra have lines like this one:

  phase `install-locale' succeeded after 0.0 seconds

while usually² it is:

  phase `install-locale' succeeded after 0 seconds

The attached patch handles this milliseconds case.

But I wonder why does it happen?  ‘gnu-build’ procedure from (guix build
gnu-build-system) module uses ‘gettimeofday’ to calculate these seconds.
And according to the manual (info "(guile) Time"): «whether true
microsecond resolution is available depends on the operating system».
But why both "0" and "0.0" can be met on hydra?

[1] http://hydra.gnu.org/build/691944/log/raw
[2] http://hydra.gnu.org/build/623040/log/raw


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-emacs-build-log-Improve-regexp-for-the-phase-end.patch --]
[-- Type: text/x-patch, Size: 955 bytes --]

From d71386016b43a62784ca6c4415069581af5f3eb2 Mon Sep 17 00:00:00 2001
From: Alex Kost <alezost@gmail.com>
Date: Thu, 24 Sep 2015 16:10:14 +0300
Subject: [PATCH] emacs: build-log: Improve regexp for the phase end.

* emacs/guix-build-log.el (guix-build-log-phase-end-regexp): Handle
  fractional number of seconds (like "0.8").
---
 emacs/guix-build-log.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/emacs/guix-build-log.el b/emacs/guix-build-log.el
index 6faa37c..9ce30bd 100644
--- a/emacs/guix-build-log.el
+++ b/emacs/guix-build-log.el
@@ -141,7 +141,7 @@ STATE is a symbol denoting how a build phase was ended.  It should be
     (rx-to-string
      `(and bol "phase " (regexp ,guix-build-log-phase-name-regexp)
            " " (group (regexp ,state-rx)) " after "
-           (group (1+ digit)) " seconds")
+           (group (1+ (or digit "."))) " seconds")
      t)))
 
 (defvar guix-build-log-phase-end-regexp
-- 
2.5.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-09-25  7:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-24 13:17 [PATCH] emacs: build-log: Improve regexp for the phase end Alex Kost
2015-09-24 19:34 ` Ludovic Courtès
2015-09-25  7:49   ` Alex Kost

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.