[Nix-dev] A bug in stdenv/generic/setup.sh

Jeevakan Suresh Jeevakan.Suresh at macquarie.com
Thu Nov 6 00:40:28 CET 2008


I was trying to add django to nix, and ran into a problem in the
'generic' setup.sh

After we unpack the source, we try to make them writable - this doesn't
quote the '$sourceRoot' variable. Which means any files with spaces
break the build.

The patch to fix this is straightforward (included below) however the
effects of such a change is far-reaching - it would cause *everything*
to rebuild (which I think is bad).

I'm not sure what the policy for changing code deep in the nix packages
dependency graph is - but I thought it to be worthwhile to bring this to
everyone attention.

diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh
index b4e499a..6b25747 100644
--- a/pkgs/stdenv/generic/setup.sh
+++ b/pkgs/stdenv/generic/setup.sh
@@ -546,7 +546,7 @@ unpackPhase() {
     # necessary when sources have been copied from other store
     # locations.
     if test "dontMakeSourcesWritable" != 1; then
-        chmod -R +w $sourceRoot
+        chmod -R +w "$sourceRoot"
     fi
 
     eval "$postUnpack"

NOTICE
This e-mail and any attachments are confidential and may contain copyright material of Macquarie Group Limited or third parties. If you are not the intended recipient of this email you should not read, print, re-transmit, store or act in reliance on this e-mail or any attachments, and should destroy all copies of them. Macquarie Group Limited does not guarantee the integrity of any emails or any attached files. The views or opinions expressed are the author's own and may not reflect the views or opinions of Macquarie Group Limited.




More information about the nix-dev mailing list