Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1kmHMt-0005rM-8i for mharc-grub-devel@gnu.org; Mon, 07 Dec 2020 09:19:59 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:53122) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kmHMr-0005pa-A4 for grub-devel@gnu.org; Mon, 07 Dec 2020 09:19:57 -0500 Received: from b-painless.mh.aa.net.uk ([2001:8b0:0:30::52]:60723) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kmHMp-0006gT-Ja for grub-devel@gnu.org; Mon, 07 Dec 2020 09:19:57 -0500 Received: from f.b.1.7.2.1.e.f.f.f.a.c.5.0.a.6.4.1.b.e.2.f.f.b.0.b.8.0.1.0.0.2.ip6.arpa ([2001:8b0:bff2:eb14:6a05:caff:fe12:71bf] helo=riva.pelham.vpn.ucam.org) by b-painless.mh.aa.net.uk with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kmHMo-0002pb-GL for grub-devel@gnu.org; Mon, 07 Dec 2020 14:19:54 +0000 Received: from ns1.pelham.vpn.ucam.org ([172.20.153.2] helo=riva.ucam.org) by riva.pelham.vpn.ucam.org with esmtp (Exim 4.92) (envelope-from ) id 1kmHMa-00087M-BA for grub-devel@gnu.org; Mon, 07 Dec 2020 14:19:40 +0000 Date: Mon, 7 Dec 2020 14:19:40 +0000 From: Colin Watson To: grub-devel@gnu.org Subject: Re: [PATCHv2] grub-install: Add backup and restore Message-ID: <20201207141940.GA31096@riva.ucam.org> References: <20200825233820.315098-1-xnox@ubuntu.com> <20201207123728.100393-1-xnox@ubuntu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201207123728.100393-1-xnox@ubuntu.com> User-Agent: Mutt/1.10.1 (2018-07-13) Received-SPF: none client-ip=2001:8b0:0:30::52; envelope-from=cjwatson@debian.org; helo=b-painless.mh.aa.net.uk X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2020 14:19:57 -0000 On Mon, Dec 07, 2020 at 12:37:28PM +0000, Dimitri John Ledkov wrote: > Refactor clean_grub_dir to create a backup of all the files, instead > of just irrevocably removing them as the first action. If available, > register on_exit handle to restore the backup if any errors occur, or > remove the backup if everything was successful. If on_exit is not > available, the backup remains on disk for manual recovery. Reviewed-by: Colin Watson -- Colin Watson (he/him) [cjwatson@debian.org]