From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Bavier Subject: Re: [PATCH] utils: Allow wrap-program to be called multiple times. Date: Wed, 10 Sep 2014 14:16:45 -0500 Message-ID: <87zje71e1u.fsf@gmail.com> References: <871trk2yis.fsf@member.fsf.org> <87lhprlhk0.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44220) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XRnNW-0004Bt-4x for guix-devel@gnu.org; Wed, 10 Sep 2014 15:16:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XRnNQ-0006Tf-MT for guix-devel@gnu.org; Wed, 10 Sep 2014 15:16:30 -0400 In-reply-to: <87lhprlhk0.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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: =?utf-8?Q?Ludovic_Court=C3=A8s?= Cc: guix-devel@gnu.org Ludovic Courtès writes: > Eric Bavier skribis: > >> Currently, if (@ (guix build utils) wrap-program) is called multiple >> times for the same file, the original file ends up being overwritten. >> This happened to me when trying to wrap a python program, which had >> already once been wrapped by python-build-system. The >> python-build-system wrapper sets PYTHON_PATH, and I needed to wrap the >> program again in order to set PATH. > > Wouldn’t it be easier or preferable to change ‘python-build-system’ to > offer a way to specify additional arguments for ‘wrap-program’? That was one possibility I considered. > The idea of having multiple indirections just to set a bunch of > environment variables doesn’t look appealing to me. My thought was that it would allow better composability/decoupling of packages, even if they aren't python packages. E.g. if a package inherits from another and needs to wrap an executable, the packager might not want to bother, or should not need to bother, to check whether that executable has already been wrapped. In any case, wrap-program certainly should not silently overwrite an existing '.foo-real'. -- Eric Bavier Please avoid sending me Word or PowerPoint attachments. See http://www.gnu.org/philosophy/no-word-attachments.html