From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Thompson, David" Subject: Re: [PATCH] build: file-systems: Allow for bind mounting regular files. Date: Sun, 2 Aug 2015 08:43:10 -0400 Message-ID: References: <87a8uarf6g.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> <87bnepriup.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=001a11c233f64ea444051c536513 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53622) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZLsbk-0007MF-6D for guix-devel@gnu.org; Sun, 02 Aug 2015 08:43:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZLsbg-0007xR-56 for guix-devel@gnu.org; Sun, 02 Aug 2015 08:43:16 -0400 Received: from mail-pd0-f170.google.com ([209.85.192.170]:35510) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZLsbf-0007xN-U7 for guix-devel@gnu.org; Sun, 02 Aug 2015 08:43:12 -0400 Received: by pdrg1 with SMTP id g1so62697281pdr.2 for ; Sun, 02 Aug 2015 05:43:11 -0700 (PDT) In-Reply-To: <87bnepriup.fsf@gmail.com> 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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Alex Kost Cc: guix-devel --001a11c233f64ea444051c536513 Content-Type: text/plain; charset=UTF-8 On Sun, Aug 2, 2015 at 8:10 AM, Alex Kost wrote: > David Thompson (2015-08-01 22:17 +0300) wrote: > >> diff --git a/gnu/build/file-systems.scm b/gnu/build/file-systems.scm >> index c58d23c..f0d6f70 100644 >> --- a/gnu/build/file-systems.scm >> +++ b/gnu/build/file-systems.scm >> @@ -305,6 +305,10 @@ the following: >> fsck code device) >> (start-repl))))) >> >> +(define (regular-file? file-name) >> + "Return #t if FILE-NAME is a regular file." >> + (eq? (stat:type (stat file-name)) 'regular)) > > There are similar procedures in (guix build utils): 'directory-exists?', > 'executable-file?' and 'symbolic-link?'. So I think it is better to put > 'regular-file?' there. WDYT? Sure, that makes sense. Done. - Dave --001a11c233f64ea444051c536513 Content-Type: text/x-patch; charset=US-ASCII; name="0001-build-file-systems-Allow-for-bind-mounting-regular-f.patch" Content-Disposition: attachment; filename="0001-build-file-systems-Allow-for-bind-mounting-regular-f.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_icuhamwl0 RnJvbSAxYjI0MTNiZDA2YjFlNzY5ZWRmYmU0ZDE3MGRlNDEzOTgwMTVhNjdkIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBEYXZpZCBUaG9tcHNvbiA8ZHRob21wc29uMkB3b3JjZXN0ZXIu ZWR1PgpEYXRlOiBTYXQsIDEgQXVnIDIwMTUgMTM6NDM6MzMgLTA0MDAKU3ViamVjdDogW1BBVENI XSBidWlsZDogZmlsZS1zeXN0ZW1zOiBBbGxvdyBmb3IgYmluZCBtb3VudGluZyByZWd1bGFyIGZp bGVzLgoKKiBndWl4L2J1aWxkL3V0aWxzLnNjbSAocmVndWxhci1maWxlPyk6IE5ldyBwcm9jZWR1 cmUuCiogZ251L2J1aWxkL2ZpbGUtc3lzdGVtcy5zY20gKG1vdW50LWZpbGUtc3lzdGVtKTogQ3Jl YXRlIGEgcmVndWxhciBmaWxlCiAgaW5zdGVhZCBvZiBhIGRpcmVjdG9yeSB3aGVuIGJpbmQgbW91 bnRpbmcgYSByZWd1bGFyIGZpbGUuCi0tLQogZ251L2J1aWxkL2ZpbGUtc3lzdGVtcy5zY20gfCAx MSArKysrKysrKysrLQogZ3VpeC9idWlsZC91dGlscy5zY20gICAgICAgfCAgNSArKysrKwogMiBm aWxlcyBjaGFuZ2VkLCAxNSBpbnNlcnRpb25zKCspLCAxIGRlbGV0aW9uKC0pCgpkaWZmIC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