Repository: spack/spack

Issue:
spack find : always prompt 0 installed packages
On a clean `develop` checkout : 

```
$ git clone https://github.com/LLNL/spack.git
Cloning into 'spack'...
remote: Counting objects: 25613, done.
remote: Compressing objects: 100% (42/42), done.
remote: Total 25613 (delta 12), reused 3 (delta 3), pack-reused 25557
Receiving objects: 100% (25613/25613), 6.65 MiB | 6.46 MiB/s, done.
Resolving deltas: 100% (13031/13031), done.
Checking connectivity... done.

$ cd spack
$ . share/spack/setup-env.sh 
$ spack compilers
==> Available compilers
-- gcc ----------------------------------------------------------
gcc@4.8

$ spack install zlib
==> Installing zlib
==> Trying to fetch from file:///home/mculpo/production/spack-mirror/zlib/zlib-1.2.8.tar.gz
######################################################################## 100,0%
==> Staging archive: /home/mculpo/tmp/spack/var/spack/stage/zlib-1.2.8-d6pdl6xvnvap6ihrqcqtgvweghbszmix/zlib-1.2.8.tar.gz
==> Created stage in /home/mculpo/tmp/spack/var/spack/stage/zlib-1.2.8-d6pdl6xvnvap6ihrqcqtgvweghbszmix
==> No patches needed for zlib
==> Building zlib
==> Successfully installed zlib
  Fetch: 0.01s.  Build: 3.69s.  Total: 3.70s.
[+] /home/mculpo/tmp/spack/opt/spack/linux-x86_64/gcc-4.8/zlib-1.2.8-d6pdl6xvnvap6ihrqcqtgvweghbszmix

$ spack find
==> 0 installed packages.

$ spack install szip
==> Installing szip
==> Trying to fetch from file:///home/mculpo/production/spack-mirror/szip/szip-2.1.tar.gz
######################################################################## 100,0%
==> Staging archive: /home/mculpo/tmp/spack/var/spack/stage/szip-2.1-esfmhl54wbdb7nnnip6y6jbxlbmxs2jq/szip-2.1.tar.gz
==> Created stage in /home/mculpo/tmp/spack/var/spack/stage/szip-2.1-esfmhl54wbdb7nnnip6y6jbxlbmxs2jq
==> No patches needed for szip
==> Building szip
==> Successfully installed szip
  Fetch: 0.01s.  Build: 8.09s.  Total: 8.10s.
[+] /home/mculpo/tmp/spack/opt/spack/linux-x86_64/gcc-4.8/szip-2.1-esfmhl54wbdb7nnnip6y6jbxlbmxs2jq

$ spack find 
==> 0 installed packages.
```

The db seems to be written correctly : 

```
database:
  installs:
    d6pdl6xvnvap6ihrqcqtgvweghbszmix:
      explicit: true
      installed: true
      path: /home/mculpo/tmp/spack/opt/spack/linux-x86_64/gcc-4.8/zlib-1.2.8-d6pdl6xvnvap6ihrqcqtgvweghbszmix
      ref_count: 0
      spec:
        zlib:
          arch: linux-x86_64
          compiler:
            name: gcc
            version: '4.8'
          dependencies: {}
          namespace: builtin
          parameters:
            cflags: []
            cppflags: []
            cxxflags: []
            fflags: []
            ldflags: []
            ldlibs: []
          version: 1.2.8
    esfmhl54wbdb7nnnip6y6jbxlbmxs2jq:
      explicit: true
      installed: true
      path: /home/mculpo/tmp/spack/opt/spack/linux-x86_64/gcc-4.8/szip-2.1-esfmhl54wbdb7nnnip6y6jbxlbmxs2jq
      ref_count: 0
      spec:
        szip:
          arch: linux-x86_64
          compiler:
            name: gcc
            version: '4.8'
          dependencies: {}
          namespace: builtin
          parameters:
            cflags: []
            cppflags: []
            cxxflags: []
            fflags: []
            ldflags: []
            ldlibs: []
          version: '2.1'
  version: 0.9.1
```



Discussion:

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/mgis/package.py b/var/spack/repos/builtin/packages/mgis/package.py
--- a/var/spack/repos/builtin/packages/mgis/package.py
+++ b/var/spack/repos/builtin/packages/mgis/package.py
@@ -18,15 +18,17 @@ class Mgis(CMakePackage):
     """
 
     homepage = "https://thelfer.github.io/mgis/web/index.html"
-    url      = "https://github.com/thelfer/MFrontGenericInterfaceSupport/archive/MFrontGenericInterfaceSupport-1.0.tar.gz"
+    url      = "https://github.com/thelfer/MFrontGenericInterfaceSupport/archive/MFrontGenericInterfaceSupport-1.1.tar.gz"
     git      = "https://github.com/thelfer/MFrontGenericInterfaceSupport.git"
     maintainers = ['thelfer']
 
     # development branches
     version("master", branch="master")
+    version("rliv-1.1", branch="rliv-1.1")
     version("rliv-1.0", branch="rliv-1.0")
 
     # released version
+    version('1.1',   sha256='06593d7a052678deaee87ef60b2213db7545c5be9823f261d3388b3978a0b7a5')
     version('1.0.1', sha256='6102621455bc5d9b1591cd33e93b2e15a9572d2ce59ca6dfa30ba57ae1265c08')
     version('1.0', sha256='279c98da00fa6855edf29c2b8f8bad6e7732298dc62ef67d028d6bbeaac043b3')
 
@@ -42,8 +44,10 @@ class Mgis(CMakePackage):
             values=('Debug', 'Release'))
 
     # dependencies
-    depends_on('tfel@3.2.0', when="@1.0")
+    depends_on('tfel@3.3.0', when="@1.1")
     depends_on('tfel@3.2.1', when="@1.0.1")
+    depends_on('tfel@3.2.0', when="@1.0")
+    depends_on('tfel@rliv-3.3', when="@rliv-1.1")
     depends_on('tfel@rliv-3.2', when="@rliv-1.0")
     depends_on('tfel@master', when="@master")
     depends_on('boost+python+numpy', when='+python')
diff --git a/var/spack/repos/builtin/packages/tfel/package.py b/var/spack/repos/builtin/packages/tfel/package.py
--- a/var/spack/repos/builtin/packages/tfel/package.py
+++ b/var/spack/repos/builtin/packages/tfel/package.py
@@ -29,12 +29,13 @@ class Tfel(CMakePackage):
     """
 
     homepage = "http://tfel.sourceforge.net"
-    url      = "https://github.com/thelfer/tfel/archive/TFEL-3.2.0.tar.gz"
+    url      = "https://github.com/thelfer/tfel/archive/TFEL-3.3.0.tar.gz"
     git      = "https://github.com/thelfer/tfel.git"
     maintainers = ['thelfer']
 
     # development branches
     version("master", branch="master")
+    version("rliv-3.3", branch="rliv-3.3")
     version("rliv-3.2", branch="rliv-3.2")
     version("rliv-3.1", branch="rliv-3.1")
     version("rliv-3.0", branch="rliv-3.0")
@@ -42,13 +43,17 @@ class Tfel(CMakePackage):
     version("rliv-1.2", branch="rliv-1.2")
 
     # released version
+    version('3.3.0', sha256='884ad68b0fbbededc3a602d559433c24114ae4534dc9f0a759d31ca3589dace0')
+    version('3.2.2', sha256='69b01ae0d1f9140b619aaa9135948284ff40d4654672c335e55ab4934c02eb43')
     version('3.2.1', sha256='12786480524a7fe86889120fb334fa00211dfd44ad5ec71e2279e7adf1ddc807')
     version('3.2.0', sha256='089d79745e9f267a2bd03dcd8841d484e668bd27f5cc2ff7453634cb39016848')
+    version('3.1.5', sha256='e22cf2110f19666f004b8acda32e87beae74721f82e7f83fd0c4fafb86812763')
     version('3.1.4', sha256='8dc2904fc930636976baaf7e91ac89c0377afb1629c336343dfad8ab651cf87d')
     version('3.1.3', sha256='2022fa183d2c2902ada982ec6550ebe15befafcb748fd988fc9accdde7976a42')
     version('3.1.2', sha256='2eaa191f0699031786d8845ac769320a42c7e035991d82b3738289886006bfba')
     version('3.1.1', sha256='a4c0c21c6c22752cc90c82295a6bafe637b3395736c66fcdfcfe4aeccb5be7af')
     version('3.1.0', sha256='dd67b400b5f157aef503aa3615b9bf6b52333876a29e75966f94ee3f79ab37ad')
+    version('3.0.5', sha256='abf58f87962cf98b6129e873a841819a2a751f2ebd4e08490eb89fb933cd7887')
     version('3.0.4', sha256='e832d421a0dc9f315c60c5ea23f958dcaa299913c50a4eb73bde0e053067a3cc')
     version('3.0.3', sha256='3ff1c14bcc27e9b615aab5748eaf3afac349050b27b55a2b57648aba28b801ac')
     version('3.0.2', sha256='edd54ac652e99621410137ea2f7f90f133067615a17840440690365e2c3906f5')
@@ -81,6 +86,12 @@ class Tfel(CMakePackage):
     variant('java', default=False,
             description='Enables java interface')
 
+    # only since TFEL-3.3, no effect on version below
+    variant('comsol', default=True,
+            description='Enables comsol interface')
+    variant('diana-fea', default=True,
+            description='Enables DIANA-FEA interface')
+
     variant('build_type', default='Release',
             description='The build type to build',
             values=('Debug', 'Release'))
@@ -99,7 +110,8 @@ def cmake_args(self):
         args = []
 
         for i in ['fortran', 'java', 'aster', 'abaqus', 'calculix',
-                  'ansys', 'europlexus', 'cyrano', 'lsdyna', 'python']:
+                  'ansys', 'europlexus', 'cyrano', 'lsdyna', 'python',
+                  'comsol', 'diana-fea']:
             if '+' + i in self.spec:
                 args.append("-Denable-{0}=ON".format(i))
             else:
@@ -128,5 +140,7 @@ def cmake_args(self):
         if '+python_bindings' in self.spec:
             args.append('-DBOOST_ROOT={0}'.
                         format(self.spec['boost'].prefix))
+            args.append('-DBoost_NO_SYSTEM_PATHS=ON')
+            args.append('-DBoost_NO_BOOST_CMAKE=ON')
 
         return args


Test patch: