prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN 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
  ```
  
  xrootd requires zlib to be installed on system
  CMake can't find zlib when installing xrootd. zlib is not listed as a dependency fro xrootd, so CMake looks for it on the system.
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `var/spack/repos/builtin/packages/globus-toolkit/package.py`
  Content:
  ```
  1 ##############################################################################
  2 # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
  3 # Produced at the Lawrence Livermore National Laboratory.
  4 #
  5 # This file is part of Spack.
  6 # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
  7 # LLNL-CODE-647188
  8 #
  9 # For details, see https://github.com/spack/spack
  10 # Please also see the NOTICE and LICENSE files for our notice and the LGPL.
  11 #
  12 # This program is free software; you can redistribute it and/or modify
  13 # it under the terms of the GNU Lesser General Public License (as
  14 # published by the Free Software Foundation) version 2.1, February 1999.
  15 #
  16 # This program is distributed in the hope that it will be useful, but
  17 # WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
  18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
  19 # conditions of the GNU Lesser General Public License for more details.
  20 #
  21 # You should have received a copy of the GNU Lesser General Public
  22 # License along with this program; if not, write to the Free Software
  23 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  24 ##############################################################################
  25 from spack import *
  26 
  27 
  28 class GlobusToolkit(AutotoolsPackage):
  29     """The Globus Toolkit is an open source software toolkit used for building
  30        grids"""
  31 
  32     homepage = "http://toolkit.globus.org"
  33     url      = "http://toolkit.globus.org/ftppub/gt6/installers/src/globus_toolkit-6.0.1506371041.tar.gz"
  34 
  35     version('6.0.1506371041', 'e17146f68e03b3482aaea3874d4087a5')
  36
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/var/spack/repos/builtin/packages/globus-toolkit/package.py b/var/spack/repos/builtin/packages/globus-toolkit/package.py
  --- a/var/spack/repos/builtin/packages/globus-toolkit/package.py
  +++ b/var/spack/repos/builtin/packages/globus-toolkit/package.py
  @@ -33,3 +33,6 @@
       url      = "http://toolkit.globus.org/ftppub/gt6/installers/src/globus_toolkit-6.0.1506371041.tar.gz"
   
       version('6.0.1506371041', 'e17146f68e03b3482aaea3874d4087a5')
  +    version('6.0.1493989444', '9e9298b61d045e65732e12c9727ceaa8')
  +
  +    depends_on('openssl')
  
verification_info: {"golden_diff": "diff --git a/var/spack/repos/builtin/packages/globus-toolkit/package.py b/var/spack/repos/builtin/packages/globus-toolkit/package.py\n--- a/var/spack/repos/builtin/packages/globus-toolkit/package.py\n+++ b/var/spack/repos/builtin/packages/globus-toolkit/package.py\n@@ -33,3 +33,6 @@\n     url      = \"http://toolkit.globus.org/ftppub/gt6/installers/src/globus_toolkit-6.0.1506371041.tar.gz\"\n \n     version('6.0.1506371041', 'e17146f68e03b3482aaea3874d4087a5')\n+    version('6.0.1493989444', '9e9298b61d045e65732e12c9727ceaa8')\n+\n+    depends_on('openssl')\n", "issue": "spack find : always prompt 0 installed packages\nOn a clean `develop` checkout : \n\n```\n$ git clone https://github.com/LLNL/spack.git\nCloning into 'spack'...\nremote: Counting objects: 25613, done.\nremote: Compressing objects: 100% (42/42), done.\nremote: Total 25613 (delta 12), reused 3 (delta 3), pack-reused 25557\nReceiving objects: 100% (25613/25613), 6.65 MiB | 6.46 MiB/s, done.\nResolving deltas: 100% (13031/13031), done.\nChecking connectivity... done.\n\n$ cd spack\n$ . share/spack/setup-env.sh \n$ spack compilers\n==> Available compilers\n-- gcc ----------------------------------------------------------\ngcc@4.8\n\n$ spack install zlib\n==> Installing zlib\n==> Trying to fetch from file:///home/mculpo/production/spack-mirror/zlib/zlib-1.2.8.tar.gz\n######################################################################## 100,0%\n==> Staging archive: /home/mculpo/tmp/spack/var/spack/stage/zlib-1.2.8-d6pdl6xvnvap6ihrqcqtgvweghbszmix/zlib-1.2.8.tar.gz\n==> Created stage in /home/mculpo/tmp/spack/var/spack/stage/zlib-1.2.8-d6pdl6xvnvap6ihrqcqtgvweghbszmix\n==> No patches needed for zlib\n==> Building zlib\n==> Successfully installed zlib\n  Fetch: 0.01s.  Build: 3.69s.  Total: 3.70s.\n[+] /home/mculpo/tmp/spack/opt/spack/linux-x86_64/gcc-4.8/zlib-1.2.8-d6pdl6xvnvap6ihrqcqtgvweghbszmix\n\n$ spack find\n==> 0 installed packages.\n\n$ spack install szip\n==> Installing szip\n==> Trying to fetch from file:///home/mculpo/production/spack-mirror/szip/szip-2.1.tar.gz\n######################################################################## 100,0%\n==> Staging archive: /home/mculpo/tmp/spack/var/spack/stage/szip-2.1-esfmhl54wbdb7nnnip6y6jbxlbmxs2jq/szip-2.1.tar.gz\n==> Created stage in /home/mculpo/tmp/spack/var/spack/stage/szip-2.1-esfmhl54wbdb7nnnip6y6jbxlbmxs2jq\n==> No patches needed for szip\n==> Building szip\n==> Successfully installed szip\n  Fetch: 0.01s.  Build: 8.09s.  Total: 8.10s.\n[+] /home/mculpo/tmp/spack/opt/spack/linux-x86_64/gcc-4.8/szip-2.1-esfmhl54wbdb7nnnip6y6jbxlbmxs2jq\n\n$ spack find \n==> 0 installed packages.\n```\n\nThe db seems to be written correctly : \n\n```\ndatabase:\n  installs:\n    d6pdl6xvnvap6ihrqcqtgvweghbszmix:\n      explicit: true\n      installed: true\n      path: /home/mculpo/tmp/spack/opt/spack/linux-x86_64/gcc-4.8/zlib-1.2.8-d6pdl6xvnvap6ihrqcqtgvweghbszmix\n      ref_count: 0\n      spec:\n        zlib:\n          arch: linux-x86_64\n          compiler:\n            name: gcc\n            version: '4.8'\n          dependencies: {}\n          namespace: builtin\n          parameters:\n            cflags: []\n            cppflags: []\n            cxxflags: []\n            fflags: []\n            ldflags: []\n            ldlibs: []\n          version: 1.2.8\n    esfmhl54wbdb7nnnip6y6jbxlbmxs2jq:\n      explicit: true\n      installed: true\n      path: /home/mculpo/tmp/spack/opt/spack/linux-x86_64/gcc-4.8/szip-2.1-esfmhl54wbdb7nnnip6y6jbxlbmxs2jq\n      ref_count: 0\n      spec:\n        szip:\n          arch: linux-x86_64\n          compiler:\n            name: gcc\n            version: '4.8'\n          dependencies: {}\n          namespace: builtin\n          parameters:\n            cflags: []\n            cppflags: []\n            cxxflags: []\n            fflags: []\n            ldflags: []\n            ldlibs: []\n          version: '2.1'\n  version: 0.9.1\n```\n\nxrootd requires zlib to be installed on system\nCMake can't find zlib when installing xrootd. zlib is not listed as a dependency fro xrootd, so CMake looks for it on the system.\n", "before_files": [{"content": "##############################################################################\n# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.\n# Produced at the Lawrence Livermore National Laboratory.\n#\n# This file is part of Spack.\n# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.\n# LLNL-CODE-647188\n#\n# For details, see https://github.com/spack/spack\n# Please also see the NOTICE and LICENSE files for our notice and the LGPL.\n#\n# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU Lesser General Public License (as\n# published by the Free Software Foundation) version 2.1, February 1999.\n#\n# This program is distributed in the hope that it will be useful, but\n# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and\n# conditions of the GNU Lesser General Public License for more details.\n#\n# You should have received a copy of the GNU Lesser General Public\n# License along with this program; if not, write to the Free Software\n# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n##############################################################################\nfrom spack import *\n\n\nclass GlobusToolkit(AutotoolsPackage):\n    \"\"\"The Globus Toolkit is an open source software toolkit used for building\n       grids\"\"\"\n\n    homepage = \"http://toolkit.globus.org\"\n    url      = \"http://toolkit.globus.org/ftppub/gt6/installers/src/globus_toolkit-6.0.1506371041.tar.gz\"\n\n    version('6.0.1506371041', 'e17146f68e03b3482aaea3874d4087a5')\n", "path": "var/spack/repos/builtin/packages/globus-toolkit/package.py"}], "after_files": [{"content": "##############################################################################\n# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.\n# Produced at the Lawrence Livermore National Laboratory.\n#\n# This file is part of Spack.\n# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.\n# LLNL-CODE-647188\n#\n# For details, see https://github.com/spack/spack\n# Please also see the NOTICE and LICENSE files for our notice and the LGPL.\n#\n# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU Lesser General Public License (as\n# published by the Free Software Foundation) version 2.1, February 1999.\n#\n# This program is distributed in the hope that it will be useful, but\n# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and\n# conditions of the GNU Lesser General Public License for more details.\n#\n# You should have received a copy of the GNU Lesser General Public\n# License along with this program; if not, write to the Free Software\n# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n##############################################################################\nfrom spack import *\n\n\nclass GlobusToolkit(AutotoolsPackage):\n    \"\"\"The Globus Toolkit is an open source software toolkit used for building\n       grids\"\"\"\n\n    homepage = \"http://toolkit.globus.org\"\n    url      = \"http://toolkit.globus.org/ftppub/gt6/installers/src/globus_toolkit-6.0.1506371041.tar.gz\"\n\n    version('6.0.1506371041', 'e17146f68e03b3482aaea3874d4087a5')\n    version('6.0.1493989444', '9e9298b61d045e65732e12c9727ceaa8')\n\n    depends_on('openssl')\n", "path": "var/spack/repos/builtin/packages/globus-toolkit/package.py"}]}