From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Darrington Subject: Re: [PATCH] gnu: Mark /gnu/store as needed for boot. Date: Sun, 15 Jan 2017 07:32:27 +0100 Message-ID: <20170115063226.GA20478@jocasta.intra> References: <1484164902-10160-1-git-send-email-jmd@gnu.org> <877f5xjpmk.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="YZ5djTAD1cGYuMQK" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57224) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cSeMw-0003ue-TU for guix-devel@gnu.org; Sun, 15 Jan 2017 01:32:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cSeMv-00057d-Rh for guix-devel@gnu.org; Sun, 15 Jan 2017 01:32:46 -0500 Content-Disposition: inline In-Reply-To: <877f5xjpmk.fsf@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ludovic Court??s Cc: guix-devel@gnu.org, John Darrington --YZ5djTAD1cGYuMQK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jan 14, 2017 at 10:30:43PM +0100, Ludovic Court??s wrote: =20 > * gnu/system/file-systems.scm (all-subpaths): New procedure. > (file-system-needed-for-boot?): Use it to check for ancestors > of %store-directory. =20 I guess the idea is to have ???needed-for-boot???? automatically set f= or users who store /gnu or /gnu/store on a separate partition, right? Correct. =20 The problem is that we need to exclude bind mounts, as done in ???store-file-system??? in (gnu system). Thanks for pointing that out. =20 What about: =20 (define (file-system-needed-for-boot? fs) (or (%file-system-needed-for-boot? fs) (and (string-prefix? (file-system-mount-point fs) (%store-dire= ctory)) (not (memq 'bind-mount (file-system-flags fs)))))) =20 Perhaps I am misunderstanding something, but (string-prefix? (file-system-mount-point fs) (%store-directory)) =20 will erroneously return #t when (file-system-mount-point fs) evaluates to "/gn" and (%store-directory) to "/gnu/store". Will it not??? That is why I wrote a procedure to fix that problem. J' --=20 Avoid eavesdropping. Send strong encrypted email. PGP Public key ID: 1024D/2DE827B3=20 fingerprint =3D 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3 See http://sks-keyservers.net or any PGP keyserver for public key. --YZ5djTAD1cGYuMQK Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlh7F3oACgkQimdxnC3oJ7NcGACdHnXpV/6UCvxpQfMbIl5RADzq 58wAnjZuvwN82Jfpx3P7cUdU/2dn2xIt =U2RD -----END PGP SIGNATURE----- --YZ5djTAD1cGYuMQK--