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: Mon, 03 Aug 2015 15:47:02 +0300 Message-ID: <87si804jzt.fsf@gmail.com> References: <87a8uarf6g.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> <87bnepriup.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34937) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZMF93-0005HW-US for guix-devel@gnu.org; Mon, 03 Aug 2015 08:47:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZMF8z-0001fe-EB for guix-devel@gnu.org; Mon, 03 Aug 2015 08:47:09 -0400 Received: from mail-lb0-x22b.google.com ([2a00:1450:4010:c04::22b]:35220) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZMF8z-0001fR-6Y for guix-devel@gnu.org; Mon, 03 Aug 2015 08:47:05 -0400 Received: by lbbpo9 with SMTP id po9so3232452lbb.2 for ; Mon, 03 Aug 2015 05:47:04 -0700 (PDT) In-Reply-To: (David Thompson's message of "Sun, 2 Aug 2015 08:51:46 -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: "Thompson, David" Cc: guix-devel Thompson, David (2015-08-02 15:51 +0300) wrote: > On Sun, Aug 2, 2015 at 8:43 AM, Thompson, David > wrote: >> 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. > > Ah, of course, I forgot about something: This patch triggers a > rebuild of *everything* now! I guess it should be applied to > core-updates. Or, the first patch I submitted can be applied to > master, and then a patch that moves 'regular-file?' to (guix build > utils) can be applied to core-updates later. > > Thoughts? In my opinion it is redundant to use another commit here, so I would apply this patch to core-updates (taking into account Andreas' note). But I don't really know how such situations are handled. Mark should know better. -- Alex