* [bug#27663] [PATCH] database: Fix typo.
@ 2017-07-12 8:11 Mathieu Othacehe
2017-07-12 8:11 ` [bug#27662] [PATCH] base: Fix time-monotonic Guile issue Mathieu Othacehe
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Mathieu Othacehe @ 2017-07-12 8:11 UTC (permalink / raw)
To: 27663
* src/cuirass/database.scm (db-get-stamp, db-add-stamp): Replace #:id
by #:name. There is no #:id in specifications. Plus, the primary key
of Specifications is #:name.
---
src/cuirass/database.scm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/cuirass/database.scm b/src/cuirass/database.scm
index 1ced411..804b8c2 100644
--- a/src/cuirass/database.scm
+++ b/src/cuirass/database.scm
@@ -195,7 +195,7 @@ INSERT INTO Builds (derivation, evaluation, log, output)\
(define (db-get-stamp db spec)
"Return a stamp corresponding to specification SPEC in database DB."
(let ((res (sqlite-exec db "SELECT * FROM Stamps WHERE specification='~A';"
- (assq-ref spec #:id))))
+ (assq-ref spec #:name))))
(match res
(() "")
((#(spec commit)) commit))))
@@ -205,9 +205,9 @@ INSERT INTO Builds (derivation, evaluation, log, output)\
(if (string-null? (db-get-stamp db spec))
(sqlite-exec db "\
INSERT INTO Stamps (specification, stamp) VALUES ('~A', '~A');"
- (assq-ref spec #:id)
+ (assq-ref spec #:name)
commit)
(sqlite-exec db "\
UPDATE Stamps SET stamp='~A' WHERE specification='~A';"
commit
- (assq-ref spec #:id))))
+ (assq-ref spec #:name))))
--
2.13.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [bug#27662] [PATCH] base: Fix time-monotonic Guile issue.
2017-07-12 8:11 [bug#27663] [PATCH] database: Fix typo Mathieu Othacehe
@ 2017-07-12 8:11 ` Mathieu Othacehe
2017-07-12 12:26 ` Ludovic Courtès
2017-07-12 8:47 ` [bug#27663] [PATCH] database: Fix typo Danny Milosavljevic
2017-07-12 12:25 ` Ludovic Courtès
2 siblings, 1 reply; 8+ messages in thread
From: Mathieu Othacehe @ 2017-07-12 8:11 UTC (permalink / raw)
To: 27662
* src/cuirass/base.scm: Replace time-monotonic with time-tai with
Guile 2.2, to avoid wrong evaluation durations.
---
src/cuirass/base.scm | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/cuirass/base.scm b/src/cuirass/base.scm
index 5e0cb0d..d0e77d9 100644
--- a/src/cuirass/base.scm
+++ b/src/cuirass/base.scm
@@ -45,6 +45,13 @@
%package-cachedir
%use-substitutes?))
+(cond-expand
+ (guile-2.2
+ ;; Guile 2.2.2 has a bug whereby 'time-monotonic' objects have seconds and
+ ;; nanoseconds swapped (fixed in Guile commit 886ac3e). Work around it.
+ (define time-monotonic time-tai))
+ (else #t))
+
(define %use-substitutes?
;; Define whether to use substitutes
(make-parameter #f))
--
2.13.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [bug#27663] [PATCH] database: Fix typo.
2017-07-12 8:11 [bug#27663] [PATCH] database: Fix typo Mathieu Othacehe
2017-07-12 8:11 ` [bug#27662] [PATCH] base: Fix time-monotonic Guile issue Mathieu Othacehe
@ 2017-07-12 8:47 ` Danny Milosavljevic
2017-07-12 12:25 ` Ludovic Courtès
2 siblings, 0 replies; 8+ messages in thread
From: Danny Milosavljevic @ 2017-07-12 8:47 UTC (permalink / raw)
To: Mathieu Othacehe; +Cc: 27663
LGTM!
^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug#27663] [PATCH] database: Fix typo.
2017-07-12 8:11 [bug#27663] [PATCH] database: Fix typo Mathieu Othacehe
2017-07-12 8:11 ` [bug#27662] [PATCH] base: Fix time-monotonic Guile issue Mathieu Othacehe
2017-07-12 8:47 ` [bug#27663] [PATCH] database: Fix typo Danny Milosavljevic
@ 2017-07-12 12:25 ` Ludovic Courtès
2017-07-12 14:12 ` Mathieu Othacehe
2017-07-12 17:05 ` bug#27663: " Mathieu Othacehe
2 siblings, 2 replies; 8+ messages in thread
From: Ludovic Courtès @ 2017-07-12 12:25 UTC (permalink / raw)
To: Mathieu Othacehe; +Cc: 27663
Mathieu Othacehe <m.othacehe@gmail.com> skribis:
> * src/cuirass/database.scm (db-get-stamp, db-add-stamp): Replace #:id
> by #:name. There is no #:id in specifications. Plus, the primary key
> of Specifications is #:name.
Good catch, go for it!
BTW, while you’re at it ;-), would you mind opening a ticket on Savannah
asking them to send us commit notifications for Cuirass to guix-commits?
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2017-07-12 17:06 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-12 8:11 [bug#27663] [PATCH] database: Fix typo Mathieu Othacehe
2017-07-12 8:11 ` [bug#27662] [PATCH] base: Fix time-monotonic Guile issue Mathieu Othacehe
2017-07-12 12:26 ` Ludovic Courtès
2017-07-12 17:05 ` bug#27662: " Mathieu Othacehe
2017-07-12 8:47 ` [bug#27663] [PATCH] database: Fix typo Danny Milosavljevic
2017-07-12 12:25 ` Ludovic Courtès
2017-07-12 14:12 ` Mathieu Othacehe
2017-07-12 17:05 ` bug#27663: " Mathieu Othacehe
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.