Re: [PATCH] gnu-build-system: do not patch symlinks. Fixes location-aware scripts.

2016-02-10 Thread Ludovic Courtès
Jan Nieuwenhuizen skribis: > Ludovic Courtès writes: > >> How does the script determines its location? Using $0 is unreliable, >> and using /proc/self/exe is non portable. > > It uses node.js's __dirname. I would have to dive into node.js > internals to figure that out... I would think it does

Re: [PATCH] gnu-build-system: do not patch symlinks. Fixes location-aware scripts.

2016-02-09 Thread Jan Nieuwenhuizen
Ludovic Courtès writes: > How does the script determines its location? Using $0 is unreliable, > and using /proc/self/exe is non portable. It uses node.js's __dirname. I would have to dive into node.js internals to figure that out... I would think it does /proc/self/exe and has fallbacks for o

Re: [PATCH] gnu-build-system: do not patch symlinks. Fixes location-aware scripts.

2016-02-09 Thread Jan Nieuwenhuizen
5be1b5c542ba48c Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sat, 6 Feb 2016 15:59:51 +0100 Subject: [PATCH] gnu-build-system: do not patch symlinks. Fixes location-aware scripts. * guix/build/gnu-build-system.scm (patch-shebangs): avoid patching symlinks. Fixes scripts --- guix/buil

Re: [PATCH] gnu-build-system: do not patch symlinks. Fixes location-aware scripts.

2016-02-09 Thread Ludovic Courtès
Jan Nieuwenhuizen skribis: > Ludovic Courtès writes: > >> Out of curiosity, what package was this? > > I encountered it first in jison, a javascript parser generator. How does the script determines its location? Using $0 is unreliable, and using /proc/self/exe is non portable. >> Since this is

Re: [PATCH] gnu-build-system: do not patch symlinks. Fixes location-aware scripts.

2016-02-09 Thread Ludovic Courtès
ity, what package was this? > From 5a1793944b6ba1368a355edfa5be1b5c542ba48c Mon Sep 17 00:00:00 2001 > From: Jan Nieuwenhuizen > Date: Sat, 6 Feb 2016 15:59:51 +0100 > Subject: [PATCH] gnu-build-system: do not patch symlinks. Fixes > location-aware scripts. > > * guix/bui

[PATCH] gnu-build-system: do not patch symlinks. Fixes location-aware scripts.

2016-02-06 Thread Jan Nieuwenhuizen
ngs, Jan >From 5a1793944b6ba1368a355edfa5be1b5c542ba48c Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sat, 6 Feb 2016 15:59:51 +0100 Subject: [PATCH] gnu-build-system: do not patch symlinks. Fixes location-aware scripts. * guix/build/gnu-build-system.scm (patch-shebangs): avoid patchi