From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jelle Licht Subject: bug#32293: wrap-program with non-colon separtor produces incorrect bash substitutions Date: Fri, 27 Jul 2018 17:51:06 +0200 Message-ID: <878t5w8yol.fsf@fsfe.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51731) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fj52B-0003T4-3K for bug-guix@gnu.org; Fri, 27 Jul 2018 11:52:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fj52A-0001iW-Dk for bug-guix@gnu.org; Fri, 27 Jul 2018 11:52:03 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:55530) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fj52A-0001iI-9K for bug-guix@gnu.org; Fri, 27 Jul 2018 11:52:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fj52A-0000nb-1x for bug-guix@gnu.org; Fri, 27 Jul 2018 11:52:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51525) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fj51O-0002wV-JL for bug-guix@gnu.org; Fri, 27 Jul 2018 11:51:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fj51N-00015M-Tr for bug-guix@gnu.org; Fri, 27 Jul 2018 11:51:14 -0400 Received: from mail1.fsfe.org ([2001:aa8:ffed:f5f3::151]:40252) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fj51N-00013R-N6 for bug-guix@gnu.org; Fri, 27 Jul 2018 11:51:13 -0400 List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: 32293@debbugs.gnu.org Hi all, While working to package some lua-related stuff, I need to deal with the LUA_PATH environment variable. This variable uses `;' as a separator, and as such, I wanted to wrap one of my programs --8<---------------cut here---------------start------------->8--- ... (wrap-program (string-append out "/bin/fennel") `("LUA_PATH" ";" prefix (,path))) ... --8<---------------cut here---------------end--------------->8--- ... which gives me the following snippet for the fennel script: --8<---------------cut here---------------start------------->8--- export LUA_PATH="/gnu/store/3yjzvzwczi37snccrxbw7xsmbns1qc7a-fennel-1-1.f2a3d3b/share/lua/5.3/?.lua${LUA_PATH;+;}$LUA_PATH" --8<---------------cut here---------------end--------------->8--- ... which is not a correct bash substitution. I _think_ the first `;' in `{LUA_PATH;+;}' needs to be a colon instead, at least if `wrap-program' is only used to generate bash-compliant wrappers. It seems this can be (easily?) fixed around guix/build/utils.scm:1055, but any changes I made there had me starting to build bash and other things from scratch.