From unknown Sun Aug 17 04:22:35 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#28094 <28094@debbugs.gnu.org> To: bug#28094 <28094@debbugs.gnu.org> Subject: Status: cuirass =?UTF-8?Q?doesn=E2=80=99t?= build i686 things Reply-To: bug#28094 <28094@debbugs.gnu.org> Date: Sun, 17 Aug 2025 11:22:35 +0000 retitle 28094 cuirass doesn=E2=80=99t build i686 things reassign 28094 guix submitter 28094 Ricardo Wurmus severity 28094 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 15 03:44:07 2017 Received: (at submit) by debbugs.gnu.org; 15 Aug 2017 07:44:07 +0000 Received: from localhost ([127.0.0.1]:37677 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dhWWF-0000qD-9r for submit@debbugs.gnu.org; Tue, 15 Aug 2017 03:44:07 -0400 Received: from eggs.gnu.org ([208.118.235.92]:47115) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dhWWD-0000pe-Rc for submit@debbugs.gnu.org; Tue, 15 Aug 2017 03:44:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dhWW7-0005AP-Oj for submit@debbugs.gnu.org; Tue, 15 Aug 2017 03:44:00 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:51882) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dhWW7-0005AK-LD for submit@debbugs.gnu.org; Tue, 15 Aug 2017 03:43:59 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38082) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dhWW6-0000aH-9j for bug-guix@gnu.org; Tue, 15 Aug 2017 03:43:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dhWW3-00058J-2z for bug-guix@gnu.org; Tue, 15 Aug 2017 03:43:58 -0400 Received: from sender-of-o51.zoho.com ([135.84.80.216]:21072) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dhWW2-00057J-Qr for bug-guix@gnu.org; Tue, 15 Aug 2017 03:43:55 -0400 Received: from localhost (port-92-200-123-40.dynamic.qsc.de [92.200.123.40]) by mx.zohomail.com with SMTPS id 1502783030869702.4799822399959; Tue, 15 Aug 2017 00:43:50 -0700 (PDT) User-agent: mu4e 0.9.18; emacs 25.2.1 From: Ricardo Wurmus To: bug-guix@gnu.org Subject: cuirass =?utf-8?Q?doesn=E2=80=99t?= build i686 things X-URL: https://elephly.net X-PGP-Key: https://elephly.net/rekado.pubkey X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC Date: Tue, 15 Aug 2017 09:43:47 +0200 Message-ID: <877ey5gtsc.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain X-ZohoMailClient: External X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) Hi Guix, it looks like Cuirass refuses to build i686 things because that would violate a UNIQUE constraint: --8<---------------cut here---------------start------------->8--- @ build-started /gnu/store/2qpglj9ylcb72c51m1qr8qfmdi20aa16-grub-2.02.drv - i686-linux /var/log/guix/drvs/2q//pglj9ylcb72c51m1qr8qfmdi20aa16-grub-2.02.drv.bz2 In ice-9/boot-9.scm: 230:29 19 (map1 (((#:eval-id . 5) (#:duration . 102000.0) # # ?) ?)) 230:29 18 (map1 (((#:eval-id . 5) (#:duration . 69000.0) # # ?) ?)) 230:29 17 (map1 (((#:eval-id . 5) (#:duration . 86000.0) # # ?) ?)) 230:29 16 (map1 (((#:eval-id . 5) (#:duration . 81000.0) # # ?) ?)) 230:29 15 (map1 (((#:eval-id . 5) (#:duration . 82000.0) # # ?) ?)) 230:29 14 (map1 (((#:eval-id . 5) (#:duration . 68000.0) # # ?) ?)) 230:29 13 (map1 (((#:eval-id . 5) (#:duration . 74000.0) # # ?) ?)) 230:29 12 (map1 (((#:eval-id . 5) (#:duration . 77000.0) # # ?) ?)) 230:29 11 (map1 (((#:eval-id . 5) (#:duration . 98000.0) # # ?) ?)) 230:29 10 (map1 (((#:eval-id . 5) (#:duration . 103000.0) # # ?) ?)) 230:29 9 (map1 (((#:eval-id . 5) (#:duration . 75000.0) # # ?) ?)) 230:29 8 (map1 (((#:eval-id . 5) (#:duration . 74000.0) # # ?) ?)) 230:29 7 (map1 (((#:eval-id . 5) (#:duration . 75000.0) # # ?) ?)) 230:29 6 (map1 (((#:eval-id . 5) (#:duration . 64000.0) # # ?) ?)) 230:17 5 (map1 (((#:eval-id . 5) (#:duration . 147000.0) # # ?) ?)) In cuirass/base.scm: 145:6 4 (register _) In ice-9/boot-9.scm: 268:13 3 (for-each # ?) In cuirass/database.scm: 186:2 2 (db-add-build #< pointer: # ?) 54:28 1 (sqlite-exec _ _ . _) In ice-9/eval.scm: 619:8 0 (_ #(#(#(#(# #) #) #) #)) ice-9/eval.scm:619:8: ice-9/eval.scm:619:8: Throw to key `sqlite-error' with args `(#f 1555 "UNIQUE const raint failed: Builds.derivation, Builds.evaluation, Builds.output")'. --8<---------------cut here---------------end--------------->8--- https://berlin.guixsd.org is configured to provide substitutes for x86_64 and i686 yet it has barely built any i686 packages so far. -- Ricardo GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC https://elephly.net From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 16 03:33:01 2017 Received: (at 28094) by debbugs.gnu.org; 16 Aug 2017 07:33:01 +0000 Received: from localhost ([127.0.0.1]:40166 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dhsp3-0001Al-BN for submit@debbugs.gnu.org; Wed, 16 Aug 2017 03:33:01 -0400 Received: from sender-of-o51.zoho.com ([135.84.80.216]:21045) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dhsp1-0001Aa-Lg for 28094@debbugs.gnu.org; Wed, 16 Aug 2017 03:33:00 -0400 Received: from localhost (141.80.247.215 [141.80.247.215]) by mx.zohomail.com with SMTPS id 1502868772966815.1404103726234; Wed, 16 Aug 2017 00:32:52 -0700 (PDT) References: <877ey5gtsc.fsf@elephly.net> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Ricardo Wurmus To: 28094@debbugs.gnu.org Subject: Re: bug#28094: cuirass =?utf-8?Q?doesn=E2=80=99t?= build i686 things In-reply-to: <877ey5gtsc.fsf@elephly.net> X-URL: https://elephly.net X-PGP-Key: https://elephly.net/rekado.pubkey X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC Date: Wed, 16 Aug 2017 09:32:49 +0200 Message-ID: <87378sklwe.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-ZohoMailClient: External X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 28094 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) Ricardo Wurmus writes: > it looks like Cuirass refuses to build i686 things because that would > violate a UNIQUE constraint: I’ve seen this repeatedly for other derivations; all seem to be i686. The error reporting is bad, so I don’t know exactly why this happens, but one guess is that this is when a previously failed build process succeeded. It’s bad that this seems to crash cuirass, so there are no more builds once this happens. -- Ricardo GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC https://elephly.net From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 23 12:58:16 2017 Received: (at 28094) by debbugs.gnu.org; 23 Aug 2017 16:58:16 +0000 Received: from localhost ([127.0.0.1]:51622 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dkYyu-0007fD-AC for submit@debbugs.gnu.org; Wed, 23 Aug 2017 12:58:16 -0400 Received: from sender-of-o51.zoho.com ([135.84.80.216]:21116) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dkYys-0007f4-15 for 28094@debbugs.gnu.org; Wed, 23 Aug 2017 12:58:14 -0400 Received: from localhost (port-92-200-199-180.dynamic.qsc.de [92.200.199.180]) by mx.zohomail.com with SMTPS id 1503507488245156.19929820464597; Wed, 23 Aug 2017 09:58:08 -0700 (PDT) References: <877ey5gtsc.fsf@elephly.net> <87378sklwe.fsf@elephly.net> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Ricardo Wurmus To: 28094@debbugs.gnu.org Subject: Re: bug#28094: cuirass =?utf-8?Q?doesn=E2=80=99t?= build i686 things In-reply-to: <87378sklwe.fsf@elephly.net> X-URL: https://elephly.net X-PGP-Key: https://elephly.net/rekado.pubkey X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC Date: Wed, 23 Aug 2017 18:58:05 +0200 Message-ID: <87o9r6ql0i.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-ZohoMailClient: External X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 28094 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) Ricardo Wurmus writes: > Ricardo Wurmus writes: > >> it looks like Cuirass refuses to build i686 things because that would >> violate a UNIQUE constraint: > > I’ve seen this repeatedly for other derivations; all seem to be i686. > The error reporting is bad, so I don’t know exactly why this happens, > but one guess is that this is when a previously failed build process > succeeded. I’ve changed Cuirass locally to print a more detailed error message when this happens. Here’s a recent error: --8<---------------cut here---------------start------------->8--- Database error with INSERT INTO Builds (derivation, evaluation, log, output) VALUES ('~A', '~A', '~A', '~A'); and (/gnu/store/zg0zpndricjwwbjv5087zw9hmdcd708y-curl-7.55.0.drv 2 #f /gnu/store/60671wa0i1fljll26fx7lxfl27fb27si-curl-7.55.0-doc) In ice-9/boot-9.scm: 230:29 19 (map1 (((#:eval-id . 2) (#:duration . 81000.0) # # …) …)) 230:29 18 (map1 (((#:eval-id . 2) (#:duration . 70000.0) # # …) …)) 230:29 17 (map1 (((#:eval-id . 2) (#:duration . 83000.0) # # …) …)) 230:29 16 (map1 (((#:eval-id . 2) (#:duration . 89000.0) # # …) …)) 230:29 15 (map1 (((#:eval-id . 2) (#:duration . 81000.0) # # …) …)) 230:29 14 (map1 (((#:eval-id . 2) (#:duration . 131000.0) # # …) …)) 230:29 13 (map1 (((#:eval-id . 2) (#:duration . 128000.0) # # …) …)) 230:29 12 (map1 (((#:eval-id . 2) (#:duration . 100000.0) # # …) …)) 230:29 11 (map1 (((#:eval-id . 2) (#:duration . 193000.0) # # …) …)) 230:29 10 (map1 (((#:eval-id . 2) (#:duration . 113000.0) # # …) …)) 230:29 9 (map1 (((#:eval-id . 2) (#:duration . 122000.0) # # …) …)) 230:29 8 (map1 (((#:eval-id . 2) (#:duration . 91000.0) # # …) …)) 230:29 7 (map1 (((#:eval-id . 2) (#:duration . 101000.0) # # …) …)) 230:29 6 (map1 (((#:eval-id . 2) (#:duration . 87000.0) # # …) …)) 230:29 5 (map1 (((#:eval-id . 2) (#:duration . 67000.0) # # …) …)) 230:29 4 (map1 (((#:eval-id . 2) (#:duration . 75000.0) # # …) …)) 230:17 3 (map1 (((#:eval-id . 2) (#:duration . 71000.0) # # …) …)) In cuirass/base.scm: 145:6 2 (register _) In ice-9/boot-9.scm: 268:13 1 (for-each # …) In cuirass/database.scm: 192:2 0 (db-add-build #< pointer: # …) cuirass/database.scm:192:2: In procedure db-add-build: cuirass/database.scm:192:2: Throw to key `sqlite-error' with args `(#f 1555 "UNIQUE constraint failed: Builds.derivation, Builds.evaluation, Builds.output")'. --8<---------------cut here---------------end--------------->8--- The directory /gnu/store/60671wa0i1fljll26fx7lxfl27fb27si-curl-7.55.0-doc exists. -- Ricardo GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC https://elephly.net From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 24 03:21:46 2017 Received: (at 28094) by debbugs.gnu.org; 24 Aug 2017 07:21:46 +0000 Received: from localhost ([127.0.0.1]:52037 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dkmSY-0004b9-6N for submit@debbugs.gnu.org; Thu, 24 Aug 2017 03:21:46 -0400 Received: from sender-of-o51.zoho.com ([135.84.80.216]:21086) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dkmSV-0004b0-RB for 28094@debbugs.gnu.org; Thu, 24 Aug 2017 03:21:44 -0400 Received: from localhost (port-92-200-36-172.dynamic.qsc.de [92.200.36.172]) by mx.zohomail.com with SMTPS id 1503559299075248.85360984728504; Thu, 24 Aug 2017 00:21:39 -0700 (PDT) References: <877ey5gtsc.fsf@elephly.net> <87378sklwe.fsf@elephly.net> <87o9r6ql0i.fsf@elephly.net> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Ricardo Wurmus To: 28094@debbugs.gnu.org Subject: Re: bug#28094: cuirass =?utf-8?Q?doesn=E2=80=99t?= build i686 things In-reply-to: <87o9r6ql0i.fsf@elephly.net> X-URL: https://elephly.net X-PGP-Key: https://elephly.net/rekado.pubkey X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC Date: Thu, 24 Aug 2017 09:21:36 +0200 Message-ID: <87lgm9qvlr.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-ZohoMailClient: External X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 28094 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) Ricardo Wurmus writes: > Ricardo Wurmus writes: > >> Ricardo Wurmus writes: >> >>> it looks like Cuirass refuses to build i686 things because that would >>> violate a UNIQUE constraint: >> >> I’ve seen this repeatedly for other derivations; all seem to be i686. >> The error reporting is bad, so I don’t know exactly why this happens, >> but one guess is that this is when a previously failed build process >> succeeded. > > I’ve changed Cuirass locally to print a more detailed error message when > this happens. Here’s a recent error: > > --8<---------------cut here---------------start------------->8--- > Database error with INSERT INTO Builds (derivation, evaluation, log, output) VALUES ('~A', '~A', '~A', '~A'); and (/gnu/store/zg0zpndricjwwbjv5087zw9hmdcd708y-curl-7.55.0.drv 2 #f /gnu/store/60671wa0i1fljll26fx7lxfl27fb27si-curl-7.55.0-doc) > In ice-9/boot-9.scm: > 230:29 19 (map1 (((#:eval-id . 2) (#:duration . 81000.0) # # …) …)) > 230:29 18 (map1 (((#:eval-id . 2) (#:duration . 70000.0) # # …) …)) > 230:29 17 (map1 (((#:eval-id . 2) (#:duration . 83000.0) # # …) …)) > 230:29 16 (map1 (((#:eval-id . 2) (#:duration . 89000.0) # # …) …)) > 230:29 15 (map1 (((#:eval-id . 2) (#:duration . 81000.0) # # …) …)) > 230:29 14 (map1 (((#:eval-id . 2) (#:duration . 131000.0) # # …) …)) > 230:29 13 (map1 (((#:eval-id . 2) (#:duration . 128000.0) # # …) …)) > 230:29 12 (map1 (((#:eval-id . 2) (#:duration . 100000.0) # # …) …)) > 230:29 11 (map1 (((#:eval-id . 2) (#:duration . 193000.0) # # …) …)) > 230:29 10 (map1 (((#:eval-id . 2) (#:duration . 113000.0) # # …) …)) > 230:29 9 (map1 (((#:eval-id . 2) (#:duration . 122000.0) # # …) …)) > 230:29 8 (map1 (((#:eval-id . 2) (#:duration . 91000.0) # # …) …)) > 230:29 7 (map1 (((#:eval-id . 2) (#:duration . 101000.0) # # …) …)) > 230:29 6 (map1 (((#:eval-id . 2) (#:duration . 87000.0) # # …) …)) > 230:29 5 (map1 (((#:eval-id . 2) (#:duration . 67000.0) # # …) …)) > 230:29 4 (map1 (((#:eval-id . 2) (#:duration . 75000.0) # # …) …)) > 230:17 3 (map1 (((#:eval-id . 2) (#:duration . 71000.0) # # …) …)) > In cuirass/base.scm: > 145:6 2 (register _) > In ice-9/boot-9.scm: > 268:13 1 (for-each # …) > In cuirass/database.scm: > 192:2 0 (db-add-build #< pointer: # …) > cuirass/database.scm:192:2: In procedure db-add-build: > cuirass/database.scm:192:2: Throw to key `sqlite-error' with args `(#f 1555 "UNIQUE constraint failed: Builds.derivation, Builds.evaluation, Builds.output")'. > --8<---------------cut here---------------end--------------->8--- > > The directory /gnu/store/60671wa0i1fljll26fx7lxfl27fb27si-curl-7.55.0-doc exists. After restarting Cuirass I got this error again: --8<---------------cut here---------------start------------->8--- … evaluate 'mips64el-linux-gnu.mpc-1.0.3.i686-linux': 104000.000 seconds evaluate 'mips64el-linux-gnu.coreutils-8.27.i686-linux': -608068998.000 seconds evaluate 'mips64el-linux-gnu.findutils-4.6.0.i686-linux': 141217000.000 seconds evaluate 'mips64el-linux-gnu.diffutils-3.5.i686-linux': 119447000.000 seconds evaluate 'mips64el-linux-gnu.patch-2.7.5.i686-linux': -853410998.000 seconds /gnu/store/1bil0xyhpim3cfyaifdpb2jsjdni2hif-hplip-3.17.7 /gnu/store/n7mf8hk262rnlhrjqmacnkp1yn518ks4-cups-minimal-2.2.1 /gnu/store/lvfymniwbz33an5a2hakf4b1c57lrdwr-cups-filters-1.13.1 /gnu/store/60671wa0i1fljll26fx7lxfl27fb27si-curl-7.55.0-doc /gnu/store/nmfwf4fkvb4mfyi7m5sn1daklkjsz9mn-curl-7.55.0 /gnu/store/53vb094sihb819hk124qvfjq8vz78252-curl-7.53.0-doc /gnu/store/9ihxpf7al0znb19lx0bk6ymjp6nxhn9y-curl-7.53.0 Database error with INSERT INTO Builds (derivation, evaluation, log, output) VALUES ('~A', '~A', '~A', '~A'); and (/gnu/store/zg0zpndricjwwbjv5087zw9hmdcd708y-curl-7.55.0.drv 3 #f /gnu/store/60671wa0i1fljll26fx7lxfl27fb27si-curl-7.55.0-doc) In ice-9/boot-9.scm: 230:29 19 (map1 (((#:eval-id . 3) (#:duration . 76000.0) # # …) …)) 230:29 18 (map1 (((#:eval-id . 3) (#:duration . 110000.0) # # …) …)) 230:29 17 (map1 (((#:eval-id . 3) (#:duration . 115000.0) # # …) …)) 230:29 16 (map1 (((#:eval-id . 3) (#:duration . 82000.0) # # …) …)) 230:29 15 (map1 (((#:eval-id . 3) (#:duration . 98000.0) # # …) …)) 230:29 14 (map1 (((#:eval-id . 3) (#:duration . 97000.0) # # …) …)) 230:29 13 (map1 (((#:eval-id . 3) (#:duration . 90000.0) # # …) …)) 230:29 12 (map1 (((#:eval-id . 3) (#:duration . 75000.0) # # …) …)) 230:29 11 (map1 (((#:eval-id . 3) (#:duration . 86000.0) # # …) …)) 230:29 10 (map1 (((#:eval-id . 3) (#:duration . 87000.0) # # …) …)) 230:29 9 (map1 (((#:eval-id . 3) (#:duration . 93000.0) # # …) …)) 230:29 8 (map1 (((#:eval-id . 3) (#:duration . 173000.0) # # …) …)) 230:29 7 (map1 (((#:eval-id . 3) (#:duration . 88000.0) # # …) …)) 230:29 6 (map1 (((#:eval-id . 3) (#:duration . 118000.0) # # …) …)) 230:29 5 (map1 (((#:eval-id . 3) (#:duration . 94000.0) # # …) …)) 230:29 4 (map1 (((#:eval-id . 3) (#:duration . 85000.0) # # …) …)) 230:17 3 (map1 (((#:eval-id . 3) (#:duration . 75000.0) # # …) …)) In cuirass/base.scm: 145:6 2 (register _) In ice-9/boot-9.scm: 268:13 1 (for-each # …) In cuirass/database.scm: 192:2 0 (db-add-build #< pointer: # …) cuirass/database.scm:192:2: In procedure db-add-build: cuirass/database.scm:192:2: Throw to key `sqlite-error' with args `(#f 1555 "UNIQUE constraint failed: Builds.derivation, Builds.evaluation, Builds.output")'. --8<---------------cut here---------------end--------------->8--- Note that this is the same derivation and the same output as before. Also note that I started with a fresh database before either of these errors. I did not remove the database after restarting Cuirass, though. -- Ricardo GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC https://elephly.net From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 25 19:09:17 2017 Received: (at 28094) by debbugs.gnu.org; 25 Aug 2017 23:09:17 +0000 Received: from localhost ([127.0.0.1]:55225 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dlNj3-0008AW-3K for submit@debbugs.gnu.org; Fri, 25 Aug 2017 19:09:17 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57342) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dlNj1-0008AJ-8J for 28094@debbugs.gnu.org; Fri, 25 Aug 2017 19:09:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dlNis-0001fb-Oa for 28094@debbugs.gnu.org; Fri, 25 Aug 2017 19:09:09 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:44118) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dlNis-0001fX-Iy; Fri, 25 Aug 2017 19:09:06 -0400 Received: from x4db12c76.dyn.telefonica.de ([77.177.44.118]:49186 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dlNip-0006Vq-Ur; Fri, 25 Aug 2017 19:09:06 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Ricardo Wurmus Subject: Re: bug#28094: cuirass =?utf-8?Q?doesn=E2=80=99t?= build i686 things References: <877ey5gtsc.fsf@elephly.net> <87378sklwe.fsf@elephly.net> <87o9r6ql0i.fsf@elephly.net> <87lgm9qvlr.fsf@elephly.net> Date: Sat, 26 Aug 2017 01:08:52 +0200 In-Reply-To: <87lgm9qvlr.fsf@elephly.net> (Ricardo Wurmus's message of "Thu, 24 Aug 2017 09:21:36 +0200") Message-ID: <87fucfdz3v.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28094 Cc: 28094@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Heya! Ricardo Wurmus skribis: > After restarting Cuirass I got this error again: > > =E2=80=A6 > evaluate 'mips64el-linux-gnu.mpc-1.0.3.i686-linux': 104000.000 seconds > evaluate 'mips64el-linux-gnu.coreutils-8.27.i686-linux': -608068998.000 s= econds > evaluate 'mips64el-linux-gnu.findutils-4.6.0.i686-linux': 141217000.000 s= econds > evaluate 'mips64el-linux-gnu.diffutils-3.5.i686-linux': 119447000.000 sec= onds > evaluate 'mips64el-linux-gnu.patch-2.7.5.i686-linux': -853410998.000 seco= nds > /gnu/store/1bil0xyhpim3cfyaifdpb2jsjdni2hif-hplip-3.17.7 > /gnu/store/n7mf8hk262rnlhrjqmacnkp1yn518ks4-cups-minimal-2.2.1 > /gnu/store/lvfymniwbz33an5a2hakf4b1c57lrdwr-cups-filters-1.13.1 > /gnu/store/60671wa0i1fljll26fx7lxfl27fb27si-curl-7.55.0-doc /gnu/store/nm= fwf4fkvb4mfyi7m5sn1daklkjsz9mn-curl-7.55.0 > /gnu/store/53vb094sihb819hk124qvfjq8vz78252-curl-7.53.0-doc /gnu/store/9i= hxpf7al0znb19lx0bk6ymjp6nxhn9y-curl-7.53.0 > Database error with INSERT INTO Builds (derivation, evaluation, log, outp= ut) VALUES ('~A', '~A', '~A', '~A'); and (/gnu/store/zg0zpndricjwwbjv5087z= w9hmdcd708y-curl-7.55.0.drv 3 #f /gnu/store/60671wa0i1fljll26fx7lxfl27fb27s= i-curl-7.55.0-doc) > In ice-9/boot-9.scm: > 230:29 19 (map1 (((#:eval-id . 3) (#:duration . 76000.0) # # =E2=80=A6= ) =E2=80=A6)) > 230:29 18 (map1 (((#:eval-id . 3) (#:duration . 110000.0) # # =E2=80= =A6) =E2=80=A6)) > 230:29 17 (map1 (((#:eval-id . 3) (#:duration . 115000.0) # # =E2=80= =A6) =E2=80=A6)) > 230:29 16 (map1 (((#:eval-id . 3) (#:duration . 82000.0) # # =E2=80=A6= ) =E2=80=A6)) > 230:29 15 (map1 (((#:eval-id . 3) (#:duration . 98000.0) # # =E2=80=A6= ) =E2=80=A6)) > 230:29 14 (map1 (((#:eval-id . 3) (#:duration . 97000.0) # # =E2=80=A6= ) =E2=80=A6)) > 230:29 13 (map1 (((#:eval-id . 3) (#:duration . 90000.0) # # =E2=80=A6= ) =E2=80=A6)) > 230:29 12 (map1 (((#:eval-id . 3) (#:duration . 75000.0) # # =E2=80=A6= ) =E2=80=A6)) > 230:29 11 (map1 (((#:eval-id . 3) (#:duration . 86000.0) # # =E2=80=A6= ) =E2=80=A6)) > 230:29 10 (map1 (((#:eval-id . 3) (#:duration . 87000.0) # # =E2=80=A6= ) =E2=80=A6)) > 230:29 9 (map1 (((#:eval-id . 3) (#:duration . 93000.0) # # =E2=80=A6= ) =E2=80=A6)) > 230:29 8 (map1 (((#:eval-id . 3) (#:duration . 173000.0) # # =E2=80= =A6) =E2=80=A6)) > 230:29 7 (map1 (((#:eval-id . 3) (#:duration . 88000.0) # # =E2=80=A6= ) =E2=80=A6)) > 230:29 6 (map1 (((#:eval-id . 3) (#:duration . 118000.0) # # =E2=80= =A6) =E2=80=A6)) > 230:29 5 (map1 (((#:eval-id . 3) (#:duration . 94000.0) # # =E2=80=A6= ) =E2=80=A6)) > 230:29 4 (map1 (((#:eval-id . 3) (#:duration . 85000.0) # # =E2=80=A6= ) =E2=80=A6)) > 230:17 3 (map1 (((#:eval-id . 3) (#:duration . 75000.0) # # =E2=80=A6= ) =E2=80=A6)) > In cuirass/base.scm: > 145:6 2 (register _) > In ice-9/boot-9.scm: > 268:13 1 (for-each # =E2=80=A6) > In cuirass/database.scm: > 192:2 0 (db-add-build #< pointer: # =E2=80=A6) > cuirass/database.scm:192:2: In procedure db-add-build: > cuirass/database.scm:192:2: Throw to key `sqlite-error' with args `(#f 15= 55 "UNIQUE constraint failed: Builds.derivation, Builds.evaluation, Builds.= output")'. > > Note that this is the same derivation and the same output as before. > Also note that I started with a fresh database before either of these > errors. I did not remove the database after restarting Cuirass, though. This is the tail of the Builds table on that machine: --8<---------------cut here---------------start------------->8--- /gnu/store/jcdfzvb3ca4n5jzh7ajc3yb47akg30c4-hplip-3.17.7.drv|4|#f|/gnu/stor= e/1bil0xyhpim3cfyaifdpb2jsjdni2hif-hplip-3.17.7 /gnu/store/lndp48wl3jcqjysjdrxgh0nm5cghc38v-cups-filters-1.13.1.drv|4|#f|/g= nu/store/lvfymniwbz33an5a2hakf4b1c57lrdwr-cups-filters-1.13.1 /gnu/store/9zzp62b9l2b85dbdqiq17avbqw3h0xkz-cups-2.2.1.drv|4|#f|/gnu/store/= a403mrmm7jd2vxygfjszrsycpa75w6cy-cups-2.2.1 /gnu/store/2isifzc6i42bxpb5rwm3wq2qvpyw158g-cups-minimal-2.2.1.drv|4|#f|/gn= u/store/n7mf8hk262rnlhrjqmacnkp1yn518ks4-cups-minimal-2.2.1 /gnu/store/5aysbn4y15hzjyj6ixw16rl223c8bv12-curl-7.53.0.drv|4|#f|/gnu/store= /53vb094sihb819hk124qvfjq8vz78252-curl-7.53.0-doc /gnu/store/5aysbn4y15hzjyj6ixw16rl223c8bv12-curl-7.53.0.drv|4|#f|/gnu/store= /9ihxpf7al0znb19lx0bk6ymjp6nxhn9y-curl-7.53.0 /gnu/store/zg0zpndricjwwbjv5087zw9hmdcd708y-curl-7.55.0.drv|4|#f|/gnu/store= /60671wa0i1fljll26fx7lxfl27fb27si-curl-7.55.0-doc /gnu/store/zg0zpndricjwwbjv5087zw9hmdcd708y-curl-7.55.0.drv|4|#f|/gnu/store= /nmfwf4fkvb4mfyi7m5sn1daklkjsz9mn-curl-7.55.0 --8<---------------cut here---------------end--------------->8--- So the problem is that we=E2=80=99re trying to insert one of these again, w= hich fails because we already have it under this primary key. This is because the curl-7.55.0 package ends up twice in the list of jobs: once as a replacement for curl-7.53.0, and once because the curl-7.55.0 is itself a public variable. Commit 7d4d6c13f46f2a307883226789d6aa503e2d7081 in guix-maintenance.git works around that. The proper fix in Cuirass might be to ignore the primary key error (for future reference, 1555 in the =E2=80=98sqlite-error=E2=80=99 exception abov= e is (logior 19 (ash 6 8)), which is SQLITE_CONSTRAINT_PRIMARYKEY in ), as in the attached patch. Thoughts? I=E2=80=99ll push it if there are no objections. Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/src/cuirass/database.scm b/src/cuirass/database.scm index 91133c2..9c7e69a 100644 --- a/src/cuirass/database.scm +++ b/src/cuirass/database.scm @@ -181,15 +181,30 @@ string." ((char=? char #\') (loop (cons* char char chars))) (else (loop (cons char chars))))))) +;; Extended error codes (see ). +;; XXX: This should be defined by (sqlite3). +(define SQLITE_CONSTRAINT 19) +(define SQLITE_CONSTRAINT_PRIMARYKEY + (logior SQLITE_CONSTRAINT (ash 6 8))) + (define (db-add-build db build) - "Store BUILD in database DB." - (sqlite-exec db "\ + "Store BUILD in database DB. This is idempotent." + (catch 'sqlite-error + (lambda () + (sqlite-exec db "\ INSERT INTO Builds (derivation, evaluation, log, output)\ VALUES ('~A', '~A', '~A', '~A');" - (assq-ref build #:derivation) - (assq-ref build #:eval-id) - (assq-ref build #:log) - (assq-ref build #:output)) + (assq-ref build #:derivation) + (assq-ref build #:eval-id) + (assq-ref build #:log) + (assq-ref build #:output))) + (lambda (key who code . rest) + ;; If we get a primary-key-constraint-violated error, that means we have + ;; already inserted the same (derivation,eval-id,log) tuple, which we + ;; can safely ignore. + (unless (= code SQLITE_CONSTRAINT_PRIMARYKEY) + (apply throw key who code rest)))) + (last-insert-rowid db)) (define (db-get-stamp db spec) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 26 02:48:11 2017 Received: (at 28094) by debbugs.gnu.org; 26 Aug 2017 06:48:12 +0000 Received: from localhost ([127.0.0.1]:55788 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dlUt9-0005nL-LY for submit@debbugs.gnu.org; Sat, 26 Aug 2017 02:48:11 -0400 Received: from sender-of-o51.zoho.com ([135.84.80.216]:21003) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dlUt7-0005nD-R5 for 28094@debbugs.gnu.org; Sat, 26 Aug 2017 02:48:10 -0400 Received: from localhost (x590d0e4d.dyn.telefonica.de [89.13.14.77]) by mx.zohomail.com with SMTPS id 1503730083826546.1260682462723; Fri, 25 Aug 2017 23:48:03 -0700 (PDT) References: <877ey5gtsc.fsf@elephly.net> <87378sklwe.fsf@elephly.net> <87o9r6ql0i.fsf@elephly.net> <87lgm9qvlr.fsf@elephly.net> <87fucfdz3v.fsf@gnu.org> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Ricardo Wurmus To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#28094: cuirass =?utf-8?Q?doesn=E2=80=99t?= build i686 things In-reply-to: <87fucfdz3v.fsf@gnu.org> X-URL: https://elephly.net X-PGP-Key: https://elephly.net/rekado.pubkey X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC Date: Sat, 26 Aug 2017 08:48:00 +0200 Message-ID: <87bmn2vn8f.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-ZohoMailClient: External X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 28094 Cc: 28094@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) Hi Ludo, […] >> /gnu/store/60671wa0i1fljll26fx7lxfl27fb27si-curl-7.55.0-doc /gnu/store/nmfwf4fkvb4mfyi7m5sn1daklkjsz9mn-curl-7.55.0 >> /gnu/store/53vb094sihb819hk124qvfjq8vz78252-curl-7.53.0-doc /gnu/store/9ihxpf7al0znb19lx0bk6ymjp6nxhn9y-curl-7.53.0 >> Database error with INSERT INTO Builds (derivation, evaluation, log, output) VALUES ('~A', '~A', '~A', '~A'); and (/gnu/store/zg0zpndricjwwbjv5087zw9hmdcd708y-curl-7.55.0.drv 3 #f /gnu/store/60671wa0i1fljll26fx7lxfl27fb27si-curl-7.55.0-doc) […] >> In cuirass/database.scm: >> 192:2 0 (db-add-build #< pointer: # …) >> cuirass/database.scm:192:2: In procedure db-add-build: >> cuirass/database.scm:192:2: Throw to key `sqlite-error' with args `(#f 1555 "UNIQUE constraint failed: Builds.derivation, Builds.evaluation, Builds.output")'. […] > This is the tail of the Builds table on that machine: > > --8<---------------cut here---------------start------------->8--- > /gnu/store/jcdfzvb3ca4n5jzh7ajc3yb47akg30c4-hplip-3.17.7.drv|4|#f|/gnu/store/1bil0xyhpim3cfyaifdpb2jsjdni2hif-hplip-3.17.7 > /gnu/store/lndp48wl3jcqjysjdrxgh0nm5cghc38v-cups-filters-1.13.1.drv|4|#f|/gnu/store/lvfymniwbz33an5a2hakf4b1c57lrdwr-cups-filters-1.13.1 > /gnu/store/9zzp62b9l2b85dbdqiq17avbqw3h0xkz-cups-2.2.1.drv|4|#f|/gnu/store/a403mrmm7jd2vxygfjszrsycpa75w6cy-cups-2.2.1 > /gnu/store/2isifzc6i42bxpb5rwm3wq2qvpyw158g-cups-minimal-2.2.1.drv|4|#f|/gnu/store/n7mf8hk262rnlhrjqmacnkp1yn518ks4-cups-minimal-2.2.1 > /gnu/store/5aysbn4y15hzjyj6ixw16rl223c8bv12-curl-7.53.0.drv|4|#f|/gnu/store/53vb094sihb819hk124qvfjq8vz78252-curl-7.53.0-doc > /gnu/store/5aysbn4y15hzjyj6ixw16rl223c8bv12-curl-7.53.0.drv|4|#f|/gnu/store/9ihxpf7al0znb19lx0bk6ymjp6nxhn9y-curl-7.53.0 > /gnu/store/zg0zpndricjwwbjv5087zw9hmdcd708y-curl-7.55.0.drv|4|#f|/gnu/store/60671wa0i1fljll26fx7lxfl27fb27si-curl-7.55.0-doc > /gnu/store/zg0zpndricjwwbjv5087zw9hmdcd708y-curl-7.55.0.drv|4|#f|/gnu/store/nmfwf4fkvb4mfyi7m5sn1daklkjsz9mn-curl-7.55.0 > --8<---------------cut here---------------end--------------->8--- > > So the problem is that we’re trying to insert one of these again, which > fails because we already have it under this primary key. > > This is because the curl-7.55.0 package ends up twice in the list of > jobs: once as a replacement for curl-7.53.0, and once because the > curl-7.55.0 is itself a public variable. > > Commit 7d4d6c13f46f2a307883226789d6aa503e2d7081 in guix-maintenance.git > works around that. Thank you! > The proper fix in Cuirass might be to ignore the primary key error (for > future reference, 1555 in the ‘sqlite-error’ exception above is > (logior 19 (ash 6 8)), which is SQLITE_CONSTRAINT_PRIMARYKEY in > ), as in the attached patch. Thoughts? I’ll push it if > there are no objections. This looks good to me. > diff --git a/src/cuirass/database.scm b/src/cuirass/database.scm > index 91133c2..9c7e69a 100644 > --- a/src/cuirass/database.scm > +++ b/src/cuirass/database.scm > @@ -181,15 +181,30 @@ string." > ((char=? char #\') (loop (cons* char char chars))) > (else (loop (cons char chars))))))) > > +;; Extended error codes (see ). > +;; XXX: This should be defined by (sqlite3). > +(define SQLITE_CONSTRAINT 19) > +(define SQLITE_CONSTRAINT_PRIMARYKEY > + (logior SQLITE_CONSTRAINT (ash 6 8))) > + > (define (db-add-build db build) > - "Store BUILD in database DB." > - (sqlite-exec db "\ > + "Store BUILD in database DB. This is idempotent." > + (catch 'sqlite-error > + (lambda () > + (sqlite-exec db "\ > INSERT INTO Builds (derivation, evaluation, log, output)\ > VALUES ('~A', '~A', '~A', '~A');" > - (assq-ref build #:derivation) > - (assq-ref build #:eval-id) > - (assq-ref build #:log) > - (assq-ref build #:output)) > + (assq-ref build #:derivation) > + (assq-ref build #:eval-id) > + (assq-ref build #:log) > + (assq-ref build #:output))) > + (lambda (key who code . rest) > + ;; If we get a primary-key-constraint-violated error, that means we have > + ;; already inserted the same (derivation,eval-id,log) tuple, which we > + ;; can safely ignore. > + (unless (= code SQLITE_CONSTRAINT_PRIMARYKEY) > + (apply throw key who code rest)))) > + Unfortunately, re-throwing the error doesn’t print any meaningful error message. To get the error message that I showed above I caught any sqlite errors and re-threw the exception only after printing the arguments to sqlite-exec: (format (current-error-port) "Database error with ~a and ~a~%" msg args) I think it would be good to include a line like this right after “(unless (= code SQLITE_CONSTRAINT_PRIMARYKEY)”. Thank you for debugging this! -- Ricardo GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC https://elephly.net From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 26 04:51:43 2017 Received: (at 28094-done) by debbugs.gnu.org; 26 Aug 2017 08:51:43 +0000 Received: from localhost ([127.0.0.1]:55917 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dlWoh-0000Av-9a for submit@debbugs.gnu.org; Sat, 26 Aug 2017 04:51:43 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57081) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dlWof-0000Aj-Ow for 28094-done@debbugs.gnu.org; Sat, 26 Aug 2017 04:51:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dlWoX-0004SY-5o for 28094-done@debbugs.gnu.org; Sat, 26 Aug 2017 04:51:36 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:59074) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dlWoX-0004SS-2m; Sat, 26 Aug 2017 04:51:33 -0400 Received: from x590d0e4d.dyn.telefonica.de ([89.13.14.77]:49580 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dlWoU-0005g3-HJ; Sat, 26 Aug 2017 04:51:32 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Ricardo Wurmus Subject: Re: bug#28094: cuirass =?utf-8?Q?doesn=E2=80=99t?= build i686 things References: <877ey5gtsc.fsf@elephly.net> <87378sklwe.fsf@elephly.net> <87o9r6ql0i.fsf@elephly.net> <87lgm9qvlr.fsf@elephly.net> <87fucfdz3v.fsf@gnu.org> <87bmn2vn8f.fsf@elephly.net> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 9 Fructidor an 225 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-unknown-linux-gnu Date: Sat, 26 Aug 2017 10:51:13 +0200 In-Reply-To: <87bmn2vn8f.fsf@elephly.net> (Ricardo Wurmus's message of "Sat, 26 Aug 2017 08:48:00 +0200") Message-ID: <87r2vyd85a.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28094-done Cc: 28094-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Hello! Ricardo Wurmus skribis: >> diff --git a/src/cuirass/database.scm b/src/cuirass/database.scm >> index 91133c2..9c7e69a 100644 >> --- a/src/cuirass/database.scm >> +++ b/src/cuirass/database.scm >> @@ -181,15 +181,30 @@ string." >> ((char=3D? char #\') (loop (cons* char char chars))) >> (else (loop (cons char chars))))))) >> >> +;; Extended error codes (see ). >> +;; XXX: This should be defined by (sqlite3). >> +(define SQLITE_CONSTRAINT 19) >> +(define SQLITE_CONSTRAINT_PRIMARYKEY >> + (logior SQLITE_CONSTRAINT (ash 6 8))) >> + >> (define (db-add-build db build) >> - "Store BUILD in database DB." >> - (sqlite-exec db "\ >> + "Store BUILD in database DB. This is idempotent." >> + (catch 'sqlite-error >> + (lambda () >> + (sqlite-exec db "\ >> INSERT INTO Builds (derivation, evaluation, log, output)\ >> VALUES ('~A', '~A', '~A', '~A');" >> - (assq-ref build #:derivation) >> - (assq-ref build #:eval-id) >> - (assq-ref build #:log) >> - (assq-ref build #:output)) >> + (assq-ref build #:derivation) >> + (assq-ref build #:eval-id) >> + (assq-ref build #:log) >> + (assq-ref build #:output))) >> + (lambda (key who code . rest) >> + ;; If we get a primary-key-constraint-violated error, that means = we have >> + ;; already inserted the same (derivation,eval-id,log) tuple, whic= h we >> + ;; can safely ignore. >> + (unless (=3D code SQLITE_CONSTRAINT_PRIMARYKEY) >> + (apply throw key who code rest)))) >> + > > Unfortunately, re-throwing the error doesn=E2=80=99t print any meaningful= error > message. To get the error message that I showed above I caught any > sqlite errors and re-threw the exception only after printing the > arguments to sqlite-exec: > > (format (current-error-port) "Database error with ~a and ~a~%" msg ar= gs) > > I think it would be good to include a line like this right after > =E2=80=9C(unless (=3D code SQLITE_CONSTRAINT_PRIMARYKEY)=E2=80=9D. Good idea. Pushed with a test case as 72f2b6b77cc4e3d7629bdf34e6daee05398b8de1. Thanks, Ludo=E2=80=99. From unknown Sun Aug 17 04:22:35 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 23 Sep 2017 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator