emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#32293: closed (wrap-program with non-colon separto


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#32293: closed (wrap-program with non-colon separtor produces incorrect bash substitutions)
Date: Mon, 20 Aug 2018 15:07:02 +0000

Your message dated Mon, 20 Aug 2018 17:06:07 +0200
with message-id <address@hidden>
and subject line Re: bug#32293: wrap-program with non-colon separtor produces 
incorrect bash substitutions
has caused the debbugs.gnu.org bug report #32293,
regarding wrap-program with non-colon separtor produces incorrect bash 
substitutions
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
32293: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=32293
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: wrap-program with non-colon separtor produces incorrect bash substitutions Date: Fri, 27 Jul 2018 17:51:06 +0200 User-agent: mu4e 1.0; emacs 26.1
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.



--- End Message ---
--- Begin Message --- Subject: Re: bug#32293: wrap-program with non-colon separtor produces incorrect bash substitutions Date: Mon, 20 Aug 2018 17:06:07 +0200 User-agent: mu4e 1.0; emacs 26.1
Ludovic Courtès <address@hidden> writes:

> Hello Jelle!
>
> Jelle Licht <address@hidden> skribis:
>
>> 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
>>
>> ...
>> (wrap-program (string-append out "/bin/fennel")
>>                    `("LUA_PATH" ";" prefix (,path)))
>> ...
>>
>>
>> ... which gives me the following snippet for the fennel script:
>>
>> export 
>> LUA_PATH="/gnu/store/3yjzvzwczi37snccrxbw7xsmbns1qc7a-fennel-1-1.f2a3d3b/share/lua/5.3/?.lua${LUA_PATH;+;}$LUA_PATH"
>>
>> ... 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.
>
> It’s indeed where the bug lies.  Changing that file involves a full
> rebuild (because every package build process uses it), but that’s OK:
> you can test the ‘wrap-program’ procedure independently (at the REPL,
> for example), and then we can push this change to ‘core-updates’.
>
> We need to check whether ‘core-updates’ still accepts full-rebuild
> changes at this stage, though.

I pushed this on core-updates as e6c4e41102.

>
> Thanks,
> Ludo’.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]