unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Mathieu Othacehe <m.othacehe@gmail.com>
To: 27663@debbugs.gnu.org
Subject: [bug#27663] [PATCH] database: Fix typo.
Date: Wed, 12 Jul 2017 10:11:11 +0200	[thread overview]
Message-ID: <20170712081112.22783-1-m.othacehe@gmail.com> (raw)

* 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

             reply	other threads:[~2017-07-12  8:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-12  8:11 Mathieu Othacehe [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170712081112.22783-1-m.othacehe@gmail.com \
    --to=m.othacehe@gmail.com \
    --cc=27663@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).