From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Wingo Subject: Re: [PATCH 1/2] build: union: Add create-all-directory? parameter to union-build Date: Fri, 24 Feb 2017 14:32:41 +0100 Message-ID: <877f4f7lza.fsf@igalia.com> References: <20170218004427.12392-1-huang_ying_caritas@163.com> <87tw7jn4mo.fsf@163.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58545) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1chG01-0007Bk-JA for guix-devel@gnu.org; Fri, 24 Feb 2017 08:33:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1chFzy-00063k-Fi for guix-devel@gnu.org; Fri, 24 Feb 2017 08:33:29 -0500 Received: from pb-sasl2.pobox.com ([64.147.108.67]:52821 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1chFzy-0005wR-Cj for guix-devel@gnu.org; Fri, 24 Feb 2017 08:33:26 -0500 In-Reply-To: <87tw7jn4mo.fsf@163.com> (Ying Huang's message of "Fri, 24 Feb 2017 20:40:47 +0800") 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: "Huang, Ying" Cc: guix-devel@gnu.org, Alex Kost Hi :) On Fri 24 Feb 2017 13:40, "Huang, Ying" writes: >> (define (union output inputs) >> (match inputs >> ((input) >> - ;; There's only one input, so just make a link. >> - (symlink* input output)) >> + ;; There's only one input, so just make a link unless create-all-directory? This comment should be a full sentence ending with a period, with line wrapped at 72 columns. >> + (if (and create-all-directory? (file-is-directory? input)) >> + (union-of-directories output inputs) >> + (symlink* input output))) What's the use case? Something that can handle some symlinks in the tree but not all symlinks in the tree? I think this patch is a bad idea for union-build because it has a strange effect that's hard to describe up and down the union (both at the root and at branch directories). I think it's probably a better idea to go for something more fit to your purpose and only pull it into union-build once you see yourself needing it more than once. IMO anyway :) Andy