Repository: spack/spack

Issue:
luafilesystem fails to download (no, not an echo...).



Discussion:
I thought I knew what was going on, but typed to quickly...

Closing, will open a new one if needed.

Ok, I was on the right track.

Installing fails thusly:

```
==> Installing lua-luafilesystem
==> lua is already installed in /isilon/Analysis/scratch/hartzelg/spack/spack-20161226/opt/spack/linux-centos7-x86_64/gcc-5.4.0/lua-5.3.2-aepnygsia6c7ch75hk6n2e4newe2p7cy
==> git is already installed in /isilon/Analysis/scratch/hartzelg/spack/spack-20161226/opt/spack/linux-centos7-x86_64/gcc-5.4.0/git-2.11.0-vkjxn34gdh2uwif6mt25i77lsusoe6l7
==> Fetching https://github.com/keplerproject/luafilesystem/archive/v1_6_3.tar.gz
==> Fetching from https://github.com/keplerproject/luafilesystem/archive/v1_6_3.tar.gz failed.
```

Because there's a typo in the tag for that version of luafilesystem ([luafilesystem issue #88](https://github.com/keplerproject/luafilesystem/issues/88)).

Instead of `v1_6_3` it was tagged `v_1_6_3`.

Not sure if they changed the tag recently or if recent changes to make luaposix tightened something up or ...

If someone gives me a hint, I can swing at it.  I can imagine customizing something in the luafilesystem package or somewhere more general.  Suggestions.


Unsightly hack-around was to change the version to `v_1_6_3` ....

```diff
diff --git a/var/spack/repos/builtin/packages/lua-luafilesystem/package.py b/var/spack/repos/builtin/packages/lua-luafilesystem/package.py
index fbd2e78b..696ed0bd 100644
--- a/var/spack/repos/builtin/packages/lua-luafilesystem/package.py
+++ b/var/spack/repos/builtin/packages/lua-luafilesystem/package.py
@@ -38,7 +38,7 @@ class LuaLuafilesystem(Package):
     homepage = 'http://keplerproject.github.io/luafilesystem'
     url = 'https://github.com/keplerproject/luafilesystem/archive/v_1_6_3.tar.gz'

-    version('1_6_3', 'd0552c7e5a082f5bb2865af63fb9dc95')
+    version('_1_6_3', 'd0552c7e5a082f5bb2865af63fb9dc95')

     depends_on('git@2.9.3:', type='build')
     extends('lua')
```
It looks like https://github.com/keplerproject/luafilesystem/issues/88 has been resolved now and they added a new release tag, although the checksum has changed. Do you want to just update the checksum?

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/lua-luafilesystem/package.py b/var/spack/repos/builtin/packages/lua-luafilesystem/package.py
--- a/var/spack/repos/builtin/packages/lua-luafilesystem/package.py
+++ b/var/spack/repos/builtin/packages/lua-luafilesystem/package.py
@@ -36,16 +36,16 @@ class LuaLuafilesystem(Package):
     """
 
     homepage = 'http://keplerproject.github.io/luafilesystem'
-    url = 'https://github.com/keplerproject/luafilesystem/archive/v_1_6_3.tar.gz'
+    url = 'https://github.com/keplerproject/luafilesystem/archive/v1_6_3.tar.gz'
 
-    version('1_6_3', 'd0552c7e5a082f5bb2865af63fb9dc95')
+    version('1_6_3', 'bed11874cfded8b4beed7dd054127b24')
 
     depends_on('git@2.9.3:', type='build')
     extends('lua')
 
     def install(self, spec, prefix):
         rockspec_fmt = join_path(self.stage.path,
-                                 'luafilesystem-v_{version.underscored}',
+                                 'luafilesystem-{version.underscored}',
                                  'rockspecs',
                                  'luafilesystem-{version.dotted}-1.rockspec')
         luarocks('--tree=' + prefix, 'install',


Test patch: