From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id uKBmGHdhmmPLtQAAbAwnHQ (envelope-from ) for ; Thu, 15 Dec 2022 00:51:19 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 2F2ZF3dhmmNS3gAAG6o9tA (envelope-from ) for ; Thu, 15 Dec 2022 00:51:19 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 10D1029531 for ; Thu, 15 Dec 2022 00:51:19 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p5bWh-0006e7-P2; Wed, 14 Dec 2022 18:51:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p5bWg-0006dv-Bo for bug-guix@gnu.org; Wed, 14 Dec 2022 18:51:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p5bWg-0006Fi-2R for bug-guix@gnu.org; Wed, 14 Dec 2022 18:51:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p5bWf-0002U0-UA for bug-guix@gnu.org; Wed, 14 Dec 2022 18:51:01 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#59784: [version 1.4.0rc1] Retrying a failed install fails Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 14 Dec 2022 23:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59784 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: "pelzflorian (Florian Pelz)" Cc: Mathieu Othacehe , 59784@debbugs.gnu.org Received: via spool by 59784-submit@debbugs.gnu.org id=B59784.16710618339535 (code B ref 59784); Wed, 14 Dec 2022 23:51:01 +0000 Received: (at 59784) by debbugs.gnu.org; 14 Dec 2022 23:50:33 +0000 Received: from localhost ([127.0.0.1]:42170 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5bWD-0002Tj-A6 for submit@debbugs.gnu.org; Wed, 14 Dec 2022 18:50:33 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46028) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5bWB-0002Td-AG for 59784@debbugs.gnu.org; Wed, 14 Dec 2022 18:50:32 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p5bW5-0006CO-AS; Wed, 14 Dec 2022 18:50:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=R8ovyyKernZ7Ml2yQoIonb6okfwl8aaqUWZWQs6FvwI=; b=XCicxQwQ0EgxkuUEvRUF wgaR9RHqQRN++ePxorXVI8MMm4Z3fIHQtusn9yPOeYbQHk1L+qPbgCXd/8ME/AA1pF4jxSU7Jjvm9 aTiEwvbFLGyQYdOXx8cXfDjW4Hpu5T1ml+GR9CBZVkVooF4DIpNQU3awNPuxnBOhYcwIFCyh4Iyvz tdcTwBNTbiIrczLBUUA+axSzA9R3uCNFqOmkXEnfZ+sWdfj8LnwHxcwTGas53XTW7puCPXpd4kHY5 v5KjUMsI22myLN799tKfFISzof1gz5hRJB6A/WnGuvbqNqRYn8/D6Xv7lUwueSImu8LjOtZ6FZ0PX iP96usI1h7Ke1Q==; Received: from [82.66.71.168] (helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p5bW4-0006no-KI; Wed, 14 Dec 2022 18:50:24 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87y1rpy9p4.fsf@pelzflorian.de> <87mt7wap6v.fsf@gnu.org> <87y1rf649x.fsf@pelzflorian.de> <87pmcny73z.fsf@gnu.org> <87k02vy6pw.fsf@gnu.org> <87ilifeyg1.fsf@pelzflorian.de> <87h6xyvqr6.fsf@gnu.org> <878rja150v.fsf@pelzflorian.de> <87h6xxpsil.fsf@pelzflorian.de> Date: Thu, 15 Dec 2022 00:50:21 +0100 In-Reply-To: <87h6xxpsil.fsf@pelzflorian.de> (pelzflorian@pelzflorian.de's message of "Wed, 14 Dec 2022 22:47:14 +0100") Message-ID: <87sfhhr1du.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1671061879; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=R8ovyyKernZ7Ml2yQoIonb6okfwl8aaqUWZWQs6FvwI=; b=qyllrVbW7g6kR4Ndg96eHwowH93dtoabH/Cf9nIwRxM1oTfpuvom6w2S1L7dXESL2ZPhQF DnCiyvQ8HtPrKG9XK85xoU0jV4WqUDZZNxLvftTzgT/qjE+TYGmVkuLFY8Y4xTbTxjhl4X RKx8VlJ9mXQ0XXTpUOusBaN/M6inLSMymMcUjZ38acOm/Ep9gjG/UIYMzntATDbLz9j07t QT0+PpN3Tsw3N5Xb0kk+qQQx20uVkCFDy6x+ceV5qMMhv2uS9bRLtRxrzE5WWNYimaUDNO iDsKygiYsVVHIzi1cWC64yEkxf1J2lq9Dm/FsLxdCEiuTGjFRJM3Fd26fa0ZHw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=XCicxQwQ; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1671061879; a=rsa-sha256; cv=none; b=J368MtRkGD5qUIIq9pGqCsY1qhzSgv0udpL1lb3VILQffUjHfMP5X2v0tuTA1+5FxQtetk 9VDSVjORD7BkjzB4WQZn09sUPS92lGy5auScydlBvOOBoJ6HPgqKR5Sgsn84IMLRfEfWg9 0oncscBkuA2pbTceuXuXbSbyM/PmyoDHAJHtXvOW2yG0GiJqKL4BlfaiMQDX/OzpVBXmhI zWElc7XofUzGE0BzybtcWh6qi6Y1+SXRrYPC3V78b1/Z8yiRyX7iN1cf/dXmy8yLyxH0H1 l8U1bzBm0fmM+sFhZOFs3QCO99YSZ9WguHZ18GnBKAru+9J+4qhz/X+uzlQrqA== X-Migadu-Spam-Score: -3.87 X-Spam-Score: -3.87 X-Migadu-Queue-Id: 10D1029531 X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=XCicxQwQ; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org X-TUID: Y1qGPuIjiUQr --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Grrr, I=E2=80=99m really silly: we have the same problem (copying the datab= ase before the daemon has been stopped) just a few lines above. How about this: --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable diff --git a/gnu/installer/final.scm b/gnu/installer/final.scm index 044f79372b..360b34d8cb 100644 --- a/gnu/installer/final.scm +++ b/gnu/installer/final.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =C2=A9 2018, 2020 Mathieu Othacehe -;;; Copyright =C2=A9 2019, 2020 Ludovic Court=C3=A8s +;;; Copyright =C2=A9 2019, 2020, 2022 Ludovic Court=C3=A8s ;;; ;;; This file is part of GNU Guix. ;;; @@ -196,14 +196,15 @@ (define (assert-exit x) ;; the loaded cow-store locale files will prevent umounting. (install-locale locale) =20 - ;; Save the database, so that it can be restored once the - ;; cow-store is umounted. + ;; Stop the daemon and save the database, so that it can be + ;; restored once the cow-store is umounted. + (stop-service 'guix-daemon) (copy-file database-file saved-database) + (mount-cow-store (%installer-target-dir) backing-directory)) (lambda () ;; We need to drag the guix-daemon to the container MNT ;; namespace, so that it can operate on the cow-store. - (stop-service 'guix-daemon) (start-service 'guix-daemon (list (number->string (getpid)))) =20 (setvbuf (current-output-port) 'none) @@ -213,10 +214,13 @@ (define (assert-exit x) =20 (set! ret (run-command install-command #:tty? #t))) (lambda () - ;; Restart guix-daemon so that it does no keep the MNT namesp= ace + ;; Stop guix-daemon so that it does no keep the MNT namespace ;; alive. - (restart-service 'guix-daemon) + (stop-service 'guix-daemon) + + ;; Restore the database and restart it. (copy-file saved-database database-file) + (start-service 'guix-daemon) =20 ;; Finally umount the cow-store and exit the container. (unmount-cow-store (%installer-target-dir) backing-directory) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable ? This time, I believe we only ever copy the database when we=E2=80=99re sure= no guix-daemon process is accessing it. Ludo=E2=80=99. --=-=-=--