From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: Re: [PATCH] build: file-systems: Allow for bind mounting regular files. Date: Sun, 02 Aug 2015 15:10:54 +0300 Message-ID: <87bnepriup.fsf@gmail.com> References: <87a8uarf6g.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50315) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZLs6W-0008Bj-18 for guix-devel@gnu.org; Sun, 02 Aug 2015 08:11:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZLs6S-00057G-Rx for guix-devel@gnu.org; Sun, 02 Aug 2015 08:10:59 -0400 Received: from mail-la0-x230.google.com ([2a00:1450:4010:c03::230]:32892) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZLs6S-000573-KH for guix-devel@gnu.org; Sun, 02 Aug 2015 08:10:56 -0400 Received: by labks4 with SMTP id ks4so22688195lab.0 for ; Sun, 02 Aug 2015 05:10:55 -0700 (PDT) In-Reply-To: <87a8uarf6g.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> (David Thompson's message of "Sat, 01 Aug 2015 15:17:59 -0400") 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: David Thompson Cc: guix-devel@gnu.org 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? -- Alex