Skip to content

Local test failures after #22845 #25867

@haampie

Description

@haampie

Steps to reproduce

$ git fetch && git checkout develop && git reset --hard origin/develop
$ spack clean -dfmps
$ spack unit-test --lf

Error message

======================================================================================================================================== FAILURES ========================================================================================================================================
___________________________________________________________________________________________________________________ test_default_rpaths_create_install_default_layout ____________________________________________________________________________________________________________________

mirror_dir = '/tmp/pytest-of-user/pytest-5/mirror0'

    @pytest.mark.requires_executables(*args)
    @pytest.mark.maybeslow
    @pytest.mark.usefixtures(
        'default_config', 'cache_directory', 'install_dir_default_layout',
        'test_mirror'
    )
    def test_default_rpaths_create_install_default_layout(mirror_dir):
        """
        Test the creation and installation of buildcaches with default rpaths
        into the default directory layout scheme.
        """
        gspec, cspec = Spec('garply').concretized(), Spec('corge').concretized()
    
        # Install 'corge' without using a cache
        install_cmd('--no-cache', cspec.name)
    
        # Create a buildache
        buildcache_cmd('create', '-au', '-d', mirror_dir, cspec.name)
        # Test force overwrite create buildcache (-f option)
        buildcache_cmd('create', '-auf', '-d', mirror_dir, cspec.name)
    
        # Create mirror index
        mirror_url = 'file://{0}'.format(mirror_dir)
        buildcache_cmd('update-index', '-d', mirror_url)
        # List the buildcaches in the mirror
        buildcache_cmd('list', '-alv')
    
        # Uninstall the package and deps
>       uninstall_cmd('-y', '--dependents', gspec.name)

lib/spack/spack/test/bindist.py:219: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
lib/spack/spack/main.py:584: in __call__
    self.returncode = _invoke_command(
lib/spack/spack/main.py:525: in _invoke_command
    return_val = command(parser, args)
lib/spack/spack/cmd/uninstall.py:360: in uninstall
    uninstall_specs(args, specs)
lib/spack/spack/cmd/uninstall.py:316: in uninstall_specs
    uninstall_list, remove_list = get_uninstall_list(args, specs, env)
lib/spack/spack/cmd/uninstall.py:252: in get_uninstall_list
    spec_envs = dependent_environments(uninstall_list)
lib/spack/spack/cmd/uninstall.py:163: in dependent_environments
    hashes = set(env.all_hashes())
lib/spack/spack/environment.py:1550: in all_hashes
    return list(set(s.dag_hash() for s in self.all_specs()))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <spack.environment.Environment object at 0x7fd088ee47c0>

    def all_specs(self):
        """Return all specs, even those a user spec would shadow."""
        all_specs = set()
        for h in self.concretized_order:
>           all_specs.update(self.specs_by_hash[h].traverse())
E           KeyError: 'hul5b3wgfnfor3wndznoksqdphdp3ocs'

lib/spack/spack/environment.py:1542: KeyError
_______________________________________________________________________________________________________________________ test_relative_rpaths_create_default_layout _______________________________________________________________________________________________________________________

mirror_dir = '/tmp/pytest-of-user/pytest-5/mirror0'

    @pytest.mark.requires_executables(*args)
    @pytest.mark.maybeslow
    @pytest.mark.nomockstage
    @pytest.mark.usefixtures(
        'default_config', 'cache_directory', 'install_dir_default_layout'
    )
    def test_relative_rpaths_create_default_layout(mirror_dir):
        """
        Test the creation and installation of buildcaches with relative
        rpaths into the default directory layout scheme.
        """
    
        gspec, cspec = Spec('garply').concretized(), Spec('corge').concretized()
    
        # Install 'corge' without using a cache
        install_cmd('--no-cache', cspec.name)
    
        # Create build cache with relative rpaths
        buildcache_cmd(
            'create', '-aur', '-d', mirror_dir, cspec.name
        )
    
        # Create mirror index
        mirror_url = 'file://%s' % mirror_dir
        buildcache_cmd('update-index', '-d', mirror_url)
    
        # Uninstall the package and deps
>       uninstall_cmd('-y', '--dependents', gspec.name)

lib/spack/spack/test/bindist.py:286: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
lib/spack/spack/main.py:584: in __call__
    self.returncode = _invoke_command(
lib/spack/spack/main.py:525: in _invoke_command
    return_val = command(parser, args)
lib/spack/spack/cmd/uninstall.py:360: in uninstall
    uninstall_specs(args, specs)
lib/spack/spack/cmd/uninstall.py:316: in uninstall_specs
    uninstall_list, remove_list = get_uninstall_list(args, specs, env)
lib/spack/spack/cmd/uninstall.py:252: in get_uninstall_list
    spec_envs = dependent_environments(uninstall_list)
lib/spack/spack/cmd/uninstall.py:163: in dependent_environments
    hashes = set(env.all_hashes())
lib/spack/spack/environment.py:1550: in all_hashes
    return list(set(s.dag_hash() for s in self.all_specs()))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <spack.environment.Environment object at 0x7fd08870a730>

    def all_specs(self):
        """Return all specs, even those a user spec would shadow."""
        all_specs = set()
        for h in self.concretized_order:
>           all_specs.update(self.specs_by_hash[h].traverse())
E           KeyError: 'hul5b3wgfnfor3wndznoksqdphdp3ocs'

lib/spack/spack/environment.py:1542: KeyError
______________________________________________________________________________________________________________________ test_relative_rpaths_install_default_layout _______________________________________________________________________________________________________________________

mirror_dir = '/tmp/pytest-of-user/pytest-5/mirror0'

    @pytest.mark.requires_executables(*args)
    @pytest.mark.maybeslow
    @pytest.mark.nomockstage
    @pytest.mark.usefixtures(
        'default_config', 'cache_directory', 'install_dir_default_layout',
        'test_mirror'
    )
    def test_relative_rpaths_install_default_layout(mirror_dir):
        """
        Test the creation and installation of buildcaches with relative
        rpaths into the default directory layout scheme.
        """
        gspec, cspec = Spec('garply').concretized(), Spec('corge').concretized()
    
        # Install buildcache created with relativized rpaths
        buildcache_cmd('install', '-auf', cspec.name)
    
        # This gives warning that spec is already installed
        buildcache_cmd('install', '-auf', cspec.name)
    
        # Uninstall the package and deps
>       uninstall_cmd('-y', '--dependents', gspec.name)

lib/spack/spack/test/bindist.py:310: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
lib/spack/spack/main.py:584: in __call__
    self.returncode = _invoke_command(
lib/spack/spack/main.py:525: in _invoke_command
    return_val = command(parser, args)
lib/spack/spack/cmd/uninstall.py:360: in uninstall
    uninstall_specs(args, specs)
lib/spack/spack/cmd/uninstall.py:316: in uninstall_specs
    uninstall_list, remove_list = get_uninstall_list(args, specs, env)
lib/spack/spack/cmd/uninstall.py:252: in get_uninstall_list
    spec_envs = dependent_environments(uninstall_list)
lib/spack/spack/cmd/uninstall.py:163: in dependent_environments
    hashes = set(env.all_hashes())
lib/spack/spack/environment.py:1550: in all_hashes
    return list(set(s.dag_hash() for s in self.all_specs()))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <spack.environment.Environment object at 0x7fd088ae7100>

    def all_specs(self):
        """Return all specs, even those a user spec would shadow."""
        all_specs = set()
        for h in self.concretized_order:
>           all_specs.update(self.specs_by_hash[h].traverse())
E           KeyError: 'hul5b3wgfnfor3wndznoksqdphdp3ocs'

lib/spack/spack/environment.py:1542: KeyError
____________________________________________________________________________________________________________________________ test_update_sbang[mock_archive0] ____________________________________________________________________________________________________________________________

tmpdir = local('/tmp/pytest-of-user/pytest-5/test_update_sbang_mock_archive0'), test_mirror = '/tmp/pytest-of-user/pytest-5/mirror0'

    @pytest.mark.usefixtures('mock_fetch', 'install_mockery')
    def test_update_sbang(tmpdir, test_mirror):
        """Test the creation and installation of buildcaches with default rpaths
        into the non-default directory layout scheme, triggering an update of the
        sbang.
        """
        scheme = os.path.join(
            '${name}', '${version}',
            '${architecture}-${compiler.name}-${compiler.version}-${hash}'
        )
        spec_str = 'old-sbang'
        # Concretize a package with some old-fashioned sbang lines.
        old_spec = Spec(spec_str).concretized()
        old_spec_hash_str = '/{0}'.format(old_spec.dag_hash())
    
        # Need a fake mirror with *function* scope.
        mirror_dir = test_mirror
        mirror_url = 'file://{0}'.format(mirror_dir)
    
        # Assume all commands will concretize old_spec the same way.
        install_cmd('--no-cache', old_spec.name)
    
        # Create a buildcache with the installed spec.
        buildcache_cmd('create', '-u', '-a', '-d', mirror_dir, old_spec_hash_str)
    
        # Need to force an update of the buildcache index
        buildcache_cmd('update-index', '-d', mirror_url)
    
        # Uninstall the original package.
>       uninstall_cmd('-y', old_spec_hash_str)

lib/spack/spack/test/bindist.py:569: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
lib/spack/spack/main.py:584: in __call__
    self.returncode = _invoke_command(
lib/spack/spack/main.py:525: in _invoke_command
    return_val = command(parser, args)
lib/spack/spack/cmd/uninstall.py:360: in uninstall
    uninstall_specs(args, specs)
lib/spack/spack/cmd/uninstall.py:316: in uninstall_specs
    uninstall_list, remove_list = get_uninstall_list(args, specs, env)
lib/spack/spack/cmd/uninstall.py:252: in get_uninstall_list
    spec_envs = dependent_environments(uninstall_list)
lib/spack/spack/cmd/uninstall.py:163: in dependent_environments
    hashes = set(env.all_hashes())
lib/spack/spack/environment.py:1550: in all_hashes
    return list(set(s.dag_hash() for s in self.all_specs()))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <spack.environment.Environment object at 0x7fd088d5c880>

    def all_specs(self):
        """Return all specs, even those a user spec would shadow."""
        all_specs = set()
        for h in self.concretized_order:
>           all_specs.update(self.specs_by_hash[h].traverse())
E           KeyError: 'hul5b3wgfnfor3wndznoksqdphdp3ocs'

lib/spack/spack/environment.py:1542: KeyError
________________________________________________________________________________________________________________________ test_uninstall_deprecated[mock_archive0] ________________________________________________________________________________________________________________________

mock_packages = <spack.repo.RepoPath object at 0x7fd08b440580>
mock_archive = Archive(url='file:///tmp/pytest-of-user/pytest-5/mock-archive-dir0/spack-src.tar.gz', path='/tmp/pytest-of-user/py...archive_file='/tmp/pytest-of-user/pytest-5/mock-archive-dir0/spack-src.tar.gz', expanded_archive_basedir='spack-src'), mock_fetch = None
install_mockery = None

    def test_uninstall_deprecated(mock_packages, mock_archive, mock_fetch,
                                  install_mockery):
        """Tests that we can still uninstall deprecated packages."""
        install('[email protected]')
        install('[email protected]')
    
        deprecate('-y', '[email protected]', '[email protected]')
    
        non_deprecated = spack.store.db.query()
    
>       uninstall('-y', '[email protected]')

lib/spack/spack/test/cmd/deprecate.py:121: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
lib/spack/spack/main.py:584: in __call__
    self.returncode = _invoke_command(
lib/spack/spack/main.py:525: in _invoke_command
    return_val = command(parser, args)
lib/spack/spack/cmd/uninstall.py:360: in uninstall
    uninstall_specs(args, specs)
lib/spack/spack/cmd/uninstall.py:316: in uninstall_specs
    uninstall_list, remove_list = get_uninstall_list(args, specs, env)
lib/spack/spack/cmd/uninstall.py:252: in get_uninstall_list
    spec_envs = dependent_environments(uninstall_list)
lib/spack/spack/cmd/uninstall.py:163: in dependent_environments
    hashes = set(env.all_hashes())
lib/spack/spack/environment.py:1550: in all_hashes
    return list(set(s.dag_hash() for s in self.all_specs()))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <spack.environment.Environment object at 0x7fd08b4d6ca0>

    def all_specs(self):
        """Return all specs, even those a user spec would shadow."""
        all_specs = set()
        for h in self.concretized_order:
>           all_specs.update(self.specs_by_hash[h].traverse())
E           KeyError: 'hul5b3wgfnfor3wndznoksqdphdp3ocs'

lib/spack/spack/environment.py:1542: KeyError
_______________________________________________________________________________________________________________ test_compiler_bootstrap_from_binary_mirror[mock_archive0] ________________________________________________________________________________________________________________

install_mockery_mutable_config = None, mock_packages = <spack.repo.RepoPath object at 0x7fd0894c21f0>, mock_fetch = None
mock_archive = Archive(url='file:///tmp/pytest-of-user/pytest-5/mock-archive-dir0/spack-src.tar.gz', path='/tmp/pytest-of-user/py...archive_file='/tmp/pytest-of-user/pytest-5/mock-archive-dir0/spack-src.tar.gz', expanded_archive_basedir='spack-src')
mutable_config = <spack.config.Configuration object at 0x7fd08891a850>, monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fd088c632e0>, tmpdir = local('/tmp/pytest-of-user/pytest-5/test_compiler_bootstrap_from_b0')

    def test_compiler_bootstrap_from_binary_mirror(
            install_mockery_mutable_config, mock_packages, mock_fetch,
            mock_archive, mutable_config, monkeypatch, tmpdir):
        """
        Make sure installing compiler from buildcache registers compiler
        """
    
        # Create a temp mirror directory for buildcache usage
        mirror_dir = tmpdir.join('mirror_dir')
        mirror_url = 'file://{0}'.format(mirror_dir.strpath)
    
        # Install a compiler, because we want to put it in a buildcache
        install('[email protected]')
    
        # Put installed compiler in the buildcache
        buildcache(
            'create', '-u', '-a', '-f', '-d', mirror_dir.strpath, '[email protected]'
        )
    
        # Now uninstall the compiler
>       uninstall('-y', '[email protected]')

lib/spack/spack/test/cmd/install.py:908: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
lib/spack/spack/main.py:584: in __call__
    self.returncode = _invoke_command(
lib/spack/spack/main.py:525: in _invoke_command
    return_val = command(parser, args)
lib/spack/spack/cmd/uninstall.py:360: in uninstall
    uninstall_specs(args, specs)
lib/spack/spack/cmd/uninstall.py:316: in uninstall_specs
    uninstall_list, remove_list = get_uninstall_list(args, specs, env)
lib/spack/spack/cmd/uninstall.py:252: in get_uninstall_list
    spec_envs = dependent_environments(uninstall_list)
lib/spack/spack/cmd/uninstall.py:163: in dependent_environments
    hashes = set(env.all_hashes())
lib/spack/spack/environment.py:1550: in all_hashes
    return list(set(s.dag_hash() for s in self.all_specs()))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <spack.environment.Environment object at 0x7fd088dbb5e0>

    def all_specs(self):
        """Return all specs, even those a user spec would shadow."""
        all_specs = set()
        for h in self.concretized_order:
>           all_specs.update(self.specs_by_hash[h].traverse())
E           KeyError: 'hul5b3wgfnfor3wndznoksqdphdp3ocs'

lib/spack/spack/environment.py:1542: KeyError
___________________________________________________________________________________________________________________ test_cache_install_full_hash_match[mock_archive0] ____________________________________________________________________________________________________________________

install_mockery_mutable_config = None, mock_packages = <spack.repo.RepoPath object at 0x7fd089073d90>, mock_fetch = None
mock_archive = Archive(url='file:///tmp/pytest-of-user/pytest-5/mock-archive-dir0/spack-src.tar.gz', path='/tmp/pytest-of-user/py...archive_file='/tmp/pytest-of-user/pytest-5/mock-archive-dir0/spack-src.tar.gz', expanded_archive_basedir='spack-src')
mutable_config = <spack.config.Configuration object at 0x7fd088da48e0>, monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fd088d7a9a0>, tmpdir = local('/tmp/pytest-of-user/pytest-5/test_cache_install_full_hash_m0')

    def test_cache_install_full_hash_match(
            install_mockery_mutable_config, mock_packages, mock_fetch,
            mock_archive, mutable_config, monkeypatch, tmpdir):
        """Make sure installing from cache respects full hash argument"""
    
        # Create a temp mirror directory for buildcache usage
        mirror_dir = tmpdir.join('mirror_dir')
        mirror_url = 'file://{0}'.format(mirror_dir.strpath)
    
        s = Spec('libdwarf').concretized()
        package_id = spack.installer.package_id(s.package)
    
        # Install a package
        install(s.name)
    
        # Put installed package in the buildcache
        buildcache('create', '-u', '-a', '-f', '-d', mirror_dir.strpath, s.name)
    
        # Now uninstall the package
>       uninstall('-y', s.name)

lib/spack/spack/test/cmd/install.py:996: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
lib/spack/spack/main.py:584: in __call__
    self.returncode = _invoke_command(
lib/spack/spack/main.py:525: in _invoke_command
    return_val = command(parser, args)
lib/spack/spack/cmd/uninstall.py:360: in uninstall
    uninstall_specs(args, specs)
lib/spack/spack/cmd/uninstall.py:316: in uninstall_specs
    uninstall_list, remove_list = get_uninstall_list(args, specs, env)
lib/spack/spack/cmd/uninstall.py:252: in get_uninstall_list
    spec_envs = dependent_environments(uninstall_list)
lib/spack/spack/cmd/uninstall.py:163: in dependent_environments
    hashes = set(env.all_hashes())
lib/spack/spack/environment.py:1550: in all_hashes
    return list(set(s.dag_hash() for s in self.all_specs()))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <spack.environment.Environment object at 0x7fd0889060a0>

    def all_specs(self):
        """Return all specs, even those a user spec would shadow."""
        all_specs = set()
        for h in self.concretized_order:
>           all_specs.update(self.specs_by_hash[h].traverse())
E           KeyError: 'hul5b3wgfnfor3wndznoksqdphdp3ocs'

lib/spack/spack/environment.py:1542: KeyError
___________________________________________________________________________________________________________________________ test_mirror_destroy[mock_archive0] ___________________________________________________________________________________________________________________________

install_mockery_mutable_config = None, mock_packages = <spack.repo.RepoPath object at 0x7fd088d7aaf0>, mock_fetch = None
mock_archive = Archive(url='file:///tmp/pytest-of-user/pytest-5/mock-archive-dir0/spack-src.tar.gz', path='/tmp/pytest-of-user/py...archive_file='/tmp/pytest-of-user/pytest-5/mock-archive-dir0/spack-src.tar.gz', expanded_archive_basedir='spack-src')
mutable_config = <spack.config.Configuration object at 0x7fd088e3d130>, monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fd088dc8670>, tmpdir = local('/tmp/pytest-of-user/pytest-5/test_mirror_destroy_mock_archi0')

    def test_mirror_destroy(install_mockery_mutable_config,
                            mock_packages, mock_fetch, mock_archive,
                            mutable_config, monkeypatch, tmpdir):
        # Create a temp mirror directory for buildcache usage
        mirror_dir = tmpdir.join('mirror_dir')
        mirror_url = 'file://{0}'.format(mirror_dir.strpath)
        mirror('add', 'atest', mirror_url)
    
        spec_name = 'libdwarf'
    
        # Put a binary package in a buildcache
        install('--no-cache', spec_name)
        buildcache('create', '-u', '-a', '-f', '-d', mirror_dir.strpath, spec_name)
    
        contents = os.listdir(mirror_dir.strpath)
        assert('build_cache' in contents)
    
        # Destroy mirror by name
        mirror('destroy', '-m', 'atest')
    
        assert(not os.path.exists(mirror_dir.strpath))
    
        buildcache('create', '-u', '-a', '-f', '-d', mirror_dir.strpath, spec_name)
    
        contents = os.listdir(mirror_dir.strpath)
        assert('build_cache' in contents)
    
        # Destroy mirror by url
        mirror('destroy', '--mirror-url', mirror_url)
    
        assert(not os.path.exists(mirror_dir.strpath))
    
>       uninstall('-y', spec_name)

lib/spack/spack/test/cmd/mirror.py:224: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
lib/spack/spack/main.py:584: in __call__
    self.returncode = _invoke_command(
lib/spack/spack/main.py:525: in _invoke_command
    return_val = command(parser, args)
lib/spack/spack/cmd/uninstall.py:360: in uninstall
    uninstall_specs(args, specs)
lib/spack/spack/cmd/uninstall.py:316: in uninstall_specs
    uninstall_list, remove_list = get_uninstall_list(args, specs, env)
lib/spack/spack/cmd/uninstall.py:252: in get_uninstall_list
    spec_envs = dependent_environments(uninstall_list)
lib/spack/spack/cmd/uninstall.py:163: in dependent_environments
    hashes = set(env.all_hashes())
lib/spack/spack/environment.py:1550: in all_hashes
    return list(set(s.dag_hash() for s in self.all_specs()))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <spack.environment.Environment object at 0x7fd088d51bb0>

    def all_specs(self):
        """Return all specs, even those a user spec would shadow."""
        all_specs = set()
        for h in self.concretized_order:
>           all_specs.update(self.specs_by_hash[h].traverse())
E           KeyError: 'hul5b3wgfnfor3wndznoksqdphdp3ocs'

lib/spack/spack/environment.py:1542: KeyError
________________________________________________________________________________________________________________________________ test_install_legacy_yaml ________________________________________________________________________________________________________________________________

test_legacy_mirror = local('/tmp/pytest-of-user/pytest-5/test_install_legacy_yaml0/legacy_yaml_mirror'), install_mockery_mutable_config = None, mock_packages = <spack.repo.RepoPath object at 0x7fd08b4f7670>

    def test_install_legacy_yaml(test_legacy_mirror, install_mockery_mutable_config,
                                 mock_packages):
        install_cmd('--no-check-signature', '--cache-only', '-f', legacy_mirror_dir
                    + '/build_cache/test-debian6-core2-gcc-4.5.0-zlib-' +
                    '1.2.11-t5mczux3tfqpxwmg7egp7axy2jvyulqk.spec.yaml')
>       uninstall_cmd('-y', '/t5mczux3tfqpxwmg7egp7axy2jvyulqk')

lib/spack/spack/test/bindist.py:617: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
lib/spack/spack/main.py:584: in __call__
    self.returncode = _invoke_command(
lib/spack/spack/main.py:525: in _invoke_command
    return_val = command(parser, args)
lib/spack/spack/cmd/uninstall.py:360: in uninstall
    uninstall_specs(args, specs)
lib/spack/spack/cmd/uninstall.py:316: in uninstall_specs
    uninstall_list, remove_list = get_uninstall_list(args, specs, env)
lib/spack/spack/cmd/uninstall.py:252: in get_uninstall_list
    spec_envs = dependent_environments(uninstall_list)
lib/spack/spack/cmd/uninstall.py:163: in dependent_environments
    hashes = set(env.all_hashes())
lib/spack/spack/environment.py:1550: in all_hashes
    return list(set(s.dag_hash() for s in self.all_specs()))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <spack.environment.Environment object at 0x7fd088c17250>

    def all_specs(self):
        """Return all specs, even those a user spec would shadow."""
        all_specs = set()
        for h in self.concretized_order:
>           all_specs.update(self.specs_by_hash[h].traverse())
E           KeyError: 'hul5b3wgfnfor3wndznoksqdphdp3ocs'

lib/spack/spack/environment.py:1542: KeyError
____________________________________________________________________________________________________________________________ test_function_calls[-a-effects5] ____________________________________________________________________________________________________________________________

command_line = '-a', effects = ['stages', 'downloads', 'caches', 'failures'], mock_calls_for_clean = {'caches': 1, 'downloads': 1, 'failures': 1, 'package': 0, ...}

    @pytest.mark.usefixtures(
        'mock_packages', 'config'
    )
    @pytest.mark.parametrize('command_line,effects', [
        ('mpileaks', ['package']),
        ('-s',       ['stages']),
        ('-sd',      ['stages', 'downloads']),
        ('-m',       ['caches']),
        ('-f',       ['failures']),
        ('-a',       all_effects),
        ('',         []),
    ])
    def test_function_calls(command_line, effects, mock_calls_for_clean):
    
        # Call the command with the supplied command line
>       clean(command_line)

lib/spack/spack/test/cmd/clean.py:61: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
lib/spack/spack/main.py:584: in __call__
    self.returncode = _invoke_command(
lib/spack/spack/main.py:525: in _invoke_command
    return_val = command(parser, args)
lib/spack/spack/cmd/clean.py:109: in clean
    uninstall('-a', '-y')
lib/spack/spack/main.py:584: in __call__
    self.returncode = _invoke_command(
lib/spack/spack/main.py:525: in _invoke_command
    return_val = command(parser, args)
lib/spack/spack/cmd/uninstall.py:360: in uninstall
    uninstall_specs(args, specs)
lib/spack/spack/cmd/uninstall.py:316: in uninstall_specs
    uninstall_list, remove_list = get_uninstall_list(args, specs, env)
lib/spack/spack/cmd/uninstall.py:252: in get_uninstall_list
    spec_envs = dependent_environments(uninstall_list)
lib/spack/spack/cmd/uninstall.py:163: in dependent_environments
    hashes = set(env.all_hashes())
lib/spack/spack/environment.py:1550: in all_hashes
    return list(set(s.dag_hash() for s in self.all_specs()))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <spack.environment.Environment object at 0x7fd088bb16a0>

    def all_specs(self):
        """Return all specs, even those a user spec would shadow."""
        all_specs = set()
        for h in self.concretized_order:
>           all_specs.update(self.specs_by_hash[h].traverse())
E           KeyError: 'hul5b3wgfnfor3wndznoksqdphdp3ocs'

lib/spack/spack/environment.py:1542: KeyError
_________________________________________________________________________________________________________________________________ test_mark_one_explicit _________________________________________________________________________________________________________________________________

mutable_database = <spack.database.Database object at 0x7fd0888e4970>

    @pytest.mark.db
    def test_mark_one_explicit(mutable_database):
        mark('-e', 'libelf')
>       uninstall('-y', '-a', 'mpileaks')

lib/spack/spack/test/cmd/mark.py:48: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
lib/spack/spack/main.py:584: in __call__
    self.returncode = _invoke_command(
lib/spack/spack/main.py:525: in _invoke_command
    return_val = command(parser, args)
lib/spack/spack/cmd/uninstall.py:360: in uninstall
    uninstall_specs(args, specs)
lib/spack/spack/cmd/uninstall.py:316: in uninstall_specs
    uninstall_list, remove_list = get_uninstall_list(args, specs, env)
lib/spack/spack/cmd/uninstall.py:252: in get_uninstall_list
    spec_envs = dependent_environments(uninstall_list)
lib/spack/spack/cmd/uninstall.py:163: in dependent_environments
    hashes = set(env.all_hashes())
lib/spack/spack/environment.py:1550: in all_hashes
    return list(set(s.dag_hash() for s in self.all_specs()))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <spack.environment.Environment object at 0x7fd088d83940>

    def all_specs(self):
        """Return all specs, even those a user spec would shadow."""
        all_specs = set()
        for h in self.concretized_order:
>           all_specs.update(self.specs_by_hash[h].traverse())
E           KeyError: 'hul5b3wgfnfor3wndznoksqdphdp3ocs'

lib/spack/spack/environment.py:1542: KeyError
--------------------------------------------------------------------------------------------------------------------------------- Captured stdout setup ----------------------------------------------------------------------------------------------------------------------------------
==> Installing libelf-0.8.13-snduugzfyej6xayqhrz23peuzdto5g37
==> No binary for libelf-0.8.13-snduugzfyej6xayqhrz23peuzdto5g37 found: installing from source
==> libelf: Successfully installed libelf-0.8.13-snduugzfyej6xayqhrz23peuzdto5g37
  Fetch: .  Build: 0.01s.  Total: 0.01s.
[+] /tmp/pytest-of-user/pytest-5/mock_store0/test-debian6-core2/gcc-4.5.0/libelf-0.8.13-snduugzfyej6xayqhrz23peuzdto5g37
==> Installing mpich-3.0.4-my7k6etkgkosk2wdyebtajaiyxfbftgi
==> No binary for mpich-3.0.4-my7k6etkgkosk2wdyebtajaiyxfbftgi found: installing from source
==> mpich: Successfully installed mpich-3.0.4-my7k6etkgkosk2wdyebtajaiyxfbftgi
  Fetch: .  Build: 0.01s.  Total: 0.01s.
[+] /tmp/pytest-of-user/pytest-5/mock_store0/test-debian6-core2/gcc-4.5.0/mpich-3.0.4-my7k6etkgkosk2wdyebtajaiyxfbftgi
==> Installing libdwarf-20130729-l4jgpc5efynz4lag76crxhn6odbibcgv
==> No binary for libdwarf-20130729-l4jgpc5efynz4lag76crxhn6odbibcgv found: installing from source
==> libdwarf: Successfully installed libdwarf-20130729-l4jgpc5efynz4lag76crxhn6odbibcgv
  Fetch: .  Build: 0.01s.  Total: 0.01s.
[+] /tmp/pytest-of-user/pytest-5/mock_store0/test-debian6-core2/gcc-4.5.0/libdwarf-20130729-l4jgpc5efynz4lag76crxhn6odbibcgv
==> Installing dyninst-8.2-oq4xerumwdazt2rinzhrz5jzfio4slr2
==> No binary for dyninst-8.2-oq4xerumwdazt2rinzhrz5jzfio4slr2 found: installing from source
==> dyninst: Successfully installed dyninst-8.2-oq4xerumwdazt2rinzhrz5jzfio4slr2
  Fetch: .  Build: 0.02s.  Total: 0.02s.
[+] /tmp/pytest-of-user/pytest-5/mock_store0/test-debian6-core2/gcc-4.5.0/dyninst-8.2-oq4xerumwdazt2rinzhrz5jzfio4slr2
==> Installing callpath-1.0-iki7b4p4zwfslj5fruemmb7fbwdxwayf
==> No binary for callpath-1.0-iki7b4p4zwfslj5fruemmb7fbwdxwayf found: installing from source
==> callpath: Successfully installed callpath-1.0-iki7b4p4zwfslj5fruemmb7fbwdxwayf
  Fetch: .  Build: 0.02s.  Total: 0.02s.
[+] /tmp/pytest-of-user/pytest-5/mock_store0/test-debian6-core2/gcc-4.5.0/callpath-1.0-iki7b4p4zwfslj5fruemmb7fbwdxwayf
==> Installing mpileaks-2.3-sbxqpp36xwglprdywzpwvmgqb34rgx4u
==> No binary for mpileaks-2.3-sbxqpp36xwglprdywzpwvmgqb34rgx4u found: installing from source
==> mpileaks: Successfully installed mpileaks-2.3-sbxqpp36xwglprdywzpwvmgqb34rgx4u
  Fetch: .  Build: 0.02s.  Total: 0.02s.
[+] /tmp/pytest-of-user/pytest-5/mock_store0/test-debian6-core2/gcc-4.5.0/mpileaks-2.3-sbxqpp36xwglprdywzpwvmgqb34rgx4u
[+] /tmp/pytest-of-user/pytest-5/mock_store0/test-debian6-core2/gcc-4.5.0/libelf-0.8.13-snduugzfyej6xayqhrz23peuzdto5g37
==> Installing mpich2-1.5-nakudp4aztyxigoacdd5jaesujortvut
==> No binary for mpich2-1.5-nakudp4aztyxigoacdd5jaesujortvut found: installing from source
==> mpich2: Successfully installed mpich2-1.5-nakudp4aztyxigoacdd5jaesujortvut
  Fetch: .  Build: 0.01s.  Total: 0.01s.
[+] /tmp/pytest-of-user/pytest-5/mock_store0/test-debian6-core2/gcc-4.5.0/mpich2-1.5-nakudp4aztyxigoacdd5jaesujortvut
[+] /tmp/pytest-of-user/pytest-5/mock_store0/test-debian6-core2/gcc-4.5.0/libdwarf-20130729-l4jgpc5efynz4lag76crxhn6odbibcgv
[+] /tmp/pytest-of-user/pytest-5/mock_store0/test-debian6-core2/gcc-4.5.0/dyninst-8.2-oq4xerumwdazt2rinzhrz5jzfio4slr2
==> Installing callpath-1.0-gdo336gzfl3sbhqgb7vkhbzzkdjymm3i
==> No binary for callpath-1.0-gdo336gzfl3sbhqgb7vkhbzzkdjymm3i found: installing from source
==> callpath: Successfully installed callpath-1.0-gdo336gzfl3sbhqgb7vkhbzzkdjymm3i
  Fetch: .  Build: 0.02s.  Total: 0.02s.
[+] /tmp/pytest-of-user/pytest-5/mock_store0/test-debian6-core2/gcc-4.5.0/callpath-1.0-gdo336gzfl3sbhqgb7vkhbzzkdjymm3i
==> Installing mpileaks-2.3-3bwhm75rcrcp2pgajnc25ywwsssf4lcs
==> No binary for mpileaks-2.3-3bwhm75rcrcp2pgajnc25ywwsssf4lcs found: installing from source
==> mpileaks: Successfully installed mpileaks-2.3-3bwhm75rcrcp2pgajnc25ywwsssf4lcs
  Fetch: .  Build: 0.02s.  Total: 0.02s.
[+] /tmp/pytest-of-user/pytest-5/mock_store0/test-debian6-core2/gcc-4.5.0/mpileaks-2.3-3bwhm75rcrcp2pgajnc25ywwsssf4lcs
[+] /tmp/pytest-of-user/pytest-5/mock_store0/test-debian6-core2/gcc-4.5.0/libelf-0.8.13-snduugzfyej6xayqhrz23peuzdto5g37
==> Installing fake-1.0-yxjepovioa55hhuueayjwcb4wpk7yoap
==> No binary for fake-1.0-yxjepovioa55hhuueayjwcb4wpk7yoap found: installing from source
==> fake: Successfully installed fake-1.0-yxjepovioa55hhuueayjwcb4wpk7yoap
  Fetch: .  Build: 0.01s.  Total: 0.01s.
[+] /tmp/pytest-of-user/pytest-5/mock_store0/test-debian6-core2/gcc-4.5.0/fake-1.0-yxjepovioa55hhuueayjwcb4wpk7yoap
[+] /tmp/pytest-of-user/pytest-5/mock_store0/test-debian6-core2/gcc-4.5.0/libdwarf-20130729-l4jgpc5efynz4lag76crxhn6odbibcgv
==> Installing zmpi-1.0-blrzj3lj3b327rczpabcrafi4gje4gbx
==> No binary for zmpi-1.0-blrzj3lj3b327rczpabcrafi4gje4gbx found: installing from source
==> zmpi: Successfully installed zmpi-1.0-blrzj3lj3b327rczpabcrafi4gje4gbx
  Fetch: .  Build: 0.01s.  Total: 0.01s.
[+] /tmp/pytest-of-user/pytest-5/mock_store0/test-debian6-core2/gcc-4.5.0/zmpi-1.0-blrzj3lj3b327rczpabcrafi4gje4gbx
[+] /tmp/pytest-of-user/pytest-5/mock_store0/test-debian6-core2/gcc-4.5.0/dyninst-8.2-oq4xerumwdazt2rinzhrz5jzfio4slr2
==> Installing callpath-1.0-tll7qk6ypp27wlhzlg4oa7d2bzcbahms
==> No binary for callpath-1.0-tll7qk6ypp27wlhzlg4oa7d2bzcbahms found: installing from source
==> callpath: Successfully installed callpath-1.0-tll7qk6ypp27wlhzlg4oa7d2bzcbahms
  Fetch: .  Build: 0.02s.  Total: 0.02s.
[+] /tmp/pytest-of-user/pytest-5/mock_store0/test-debian6-core2/gcc-4.5.0/callpath-1.0-tll7qk6ypp27wlhzlg4oa7d2bzcbahms
==> Installing mpileaks-2.3-4glifsifafqcrkphplq4rewlcxnomf5l
==> No binary for mpileaks-2.3-4glifsifafqcrkphplq4rewlcxnomf5l found: installing from source
==> mpileaks: Successfully installed mpileaks-2.3-4glifsifafqcrkphplq4rewlcxnomf5l
  Fetch: .  Build: 0.02s.  Total: 0.02s.
[+] /tmp/pytest-of-user/pytest-5/mock_store0/test-debian6-core2/gcc-4.5.0/mpileaks-2.3-4glifsifafqcrkphplq4rewlcxnomf5l
[+] /path/to/external_tool (external externaltool-1.0-z6nog2otsocdkq7k5nhs7r2bbkouvbjv)
[+] /path/to/external_virtual_gcc (external externalvirtual-1.0-culoyhgparxirrrvsjjbyrizhsb5frvr)
==> Installing externaltest-1.0-semfsmmquwrwhw3z3w3vnm7trtcdhaeg
==> No binary for externaltest-1.0-semfsmmquwrwhw3z3w3vnm7trtcdhaeg found: installing from source
==> externaltest: Successfully installed externaltest-1.0-semfsmmquwrwhw3z3w3vnm7trtcdhaeg
  Fetch: .  Build: 0.01s.  Total: 0.01s.
[+] /tmp/pytest-of-user/pytest-5/mock_store0/test-debian6-core2/gcc-4.5.0/externaltest-1.0-semfsmmquwrwhw3z3w3vnm7trtcdhaeg
==> Installing trivial-smoke-test-1.0-xeiuz3vzu3fvfmmagueenita4gpyb674
==> No binary for trivial-smoke-test-1.0-xeiuz3vzu3fvfmmagueenita4gpyb674 found: installing from source
==> trivial-smoke-test: Successfully installed trivial-smoke-test-1.0-xeiuz3vzu3fvfmmagueenita4gpyb674
  Fetch: .  Build: 0.01s.  Total: 0.01s.
[+] /tmp/pytest-of-user/pytest-5/mock_store0/test-debian6-core2/gcc-4.5.0/trivial-smoke-test-1.0-xeiuz3vzu3fvfmmagueenita4gpyb674
--------------------------------------------------------------------------------------------------------------------------------- Captured stderr setup ----------------------------------------------------------------------------------------------------------------------------------
==> Warning: Module file already exists : skipping creation
file : /home/user/spack/share/spack/modules/test-debian6-core2/libelf-0.8.13-gcc-4.5.0-snduugz
spec : [email protected]%[email protected] arch=test-debian6-core2
==> Warning: Module file already exists : skipping creation
file : /home/user/spack/share/spack/modules/test-debian6-core2/libdwarf-20130729-gcc-4.5.0-l4jgpc5
spec : libdwarf@20130729%[email protected] arch=test-debian6-core2 ^[email protected]%[email protected] arch=test-debian6-core2
==> Warning: Module file already exists : skipping creation
file : /home/user/spack/share/spack/modules/test-debian6-core2/dyninst-8.2-gcc-4.5.0-oq4xeru
spec : [email protected]%[email protected] arch=test-debian6-core2 ^libdwarf@20130729%[email protected] arch=test-debian6-core2 ^[email protected]%[email protected] arch=test-debian6-core2
==> Warning: Module file already exists : skipping creation
file : /home/user/spack/share/spack/modules/test-debian6-core2/mpich2-1.5-gcc-4.5.0-nakudp4
spec : [email protected]%[email protected] arch=test-debian6-core2
==> Warning: Module file already exists : skipping creation
file : /home/user/spack/share/spack/modules/test-debian6-core2/callpath-1.0-gcc-4.5.0-gdo336g
spec : [email protected]%[email protected] arch=test-debian6-core2 ^[email protected]%[email protected] arch=test-debian6-core2 ^libdwarf@20130729%[email protected] arch=test-debian6-core2 ^[email protected]%[email protected] arch=test-debian6-core2 ^[email protected]%[email protected] arch=test-debian6-core2
==> Warning: Module file already exists : skipping creation
file : /home/user/spack/share/spack/modules/test-debian6-core2/fake-1.0-gcc-4.5.0-yxjepov
spec : [email protected]%[email protected] arch=test-debian6-core2
==> Warning: Module file already exists : skipping creation
file : /home/user/spack/share/spack/modules/test-debian6-core2/zmpi-1.0-gcc-4.5.0-blrzj3l
spec : [email protected]%[email protected] arch=test-debian6-core2 ^[email protected]%[email protected] arch=test-debian6-core2
==> Warning: Module file already exists : skipping creation
file : /home/user/spack/share/spack/modules/test-debian6-core2/callpath-1.0-gcc-4.5.0-tll7qk6
spec : [email protected]%[email protected] arch=test-debian6-core2 ^[email protected]%[email protected] arch=test-debian6-core2 ^[email protected]%[email protected] arch=test-debian6-core2 ^libdwarf@20130729%[email protected] arch=test-debian6-core2 ^[email protected]%[email protected] arch=test-debian6-core2 ^[email protected]%[email protected] arch=test-debian6-core2
==> Warning: Module file already exists : skipping creation
file : /home/user/spack/share/spack/modules/test-debian6-core2/externaltest-1.0-gcc-4.5.0-semfsmm
spec : [email protected]%[email protected] arch=test-debian6-core2 ^[email protected]%[email protected] arch=test-debian6-core2 ^[email protected]%[email protected] arch=test-debian6-core2
==> Warning: Module file already exists : skipping creation
file : /home/user/spack/share/spack/modules/test-debian6-core2/trivial-smoke-test-1.0-gcc-4.5.0-xeiuz3v
spec : [email protected]%[email protected] arch=test-debian6-core2
_______________________________________________________________________________________________________________________________ test_installed_dependents ________________________________________________________________________________________________________________________________

mutable_database = <spack.database.Database object at 0x7fd088b550d0>

    @pytest.mark.db
    def test_installed_dependents(mutable_database):
        """Test can't uninstall when there are installed dependents."""
        with pytest.raises(SpackCommandError):
>           uninstall('-y', 'libelf')

lib/spack/spack/test/cmd/uninstall.py:38: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
lib/spack/spack/main.py:584: in __call__
    self.returncode = _invoke_command(
lib/spack/spack/main.py:525: in _invoke_command
    return_val = command(parser, args)
lib/spack/spack/cmd/uninstall.py:360: in uninstall
    uninstall_specs(args, specs)
lib/spack/spack/cmd/uninstall.py:316: in uninstall_specs
    uninstall_list, remove_list = get_uninstall_list(args, specs, env)
lib/spack/spack/cmd/uninstall.py:252: in get_uninstall_list
    spec_envs = dependent_environments(uninstall_list)
lib/spack/spack/cmd/uninstall.py:163: in dependent_environments
    hashes = set(env.all_hashes())
lib/spack/spack/environment.py:1550: in all_hashes
    return list(set(s.dag_hash() for s in self.all_specs()))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <spack.environment.Environment object at 0x7fd0890f0bb0>

    def all_specs(self):
        """Return all specs, even those a user spec would shadow."""
        all_specs = set()
        for h in self.concretized_order:
>           all_specs.update(self.specs_by_hash[h].traverse())
E           KeyError: 'hul5b3wgfnfor3wndznoksqdphdp3ocs'

lib/spack/spack/environment.py:1542: KeyError
________________________________________________________________________________________________________________________________ test_recursive_uninstall ________________________________________________________________________________________________________________________________

mutable_database = <spack.database.Database object at 0x7fd088a66a00>

    @pytest.mark.db
    def test_recursive_uninstall(mutable_database):
        """Test recursive uninstall."""
>       uninstall('-y', '-a', '--dependents', 'callpath')

lib/spack/spack/test/cmd/uninstall.py:44: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
lib/spack/spack/main.py:584: in __call__
    self.returncode = _invoke_command(
lib/spack/spack/main.py:525: in _invoke_command
    return_val = command(parser, args)
lib/spack/spack/cmd/uninstall.py:360: in uninstall
    uninstall_specs(args, specs)
lib/spack/spack/cmd/uninstall.py:316: in uninstall_specs
    uninstall_list, remove_list = get_uninstall_list(args, specs, env)
lib/spack/spack/cmd/uninstall.py:252: in get_uninstall_list
    spec_envs = dependent_environments(uninstall_list)
lib/spack/spack/cmd/uninstall.py:163: in dependent_environments
    hashes = set(env.all_hashes())
lib/spack/spack/environment.py:1550: in all_hashes
    return list(set(s.dag_hash() for s in self.all_specs()))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <spack.environment.Environment object at 0x7fd088df47f0>

    def all_specs(self):
        """Return all specs, even those a user spec would shadow."""
        all_specs = set()
        for h in self.concretized_order:
>           all_specs.update(self.specs_by_hash[h].traverse())
E           KeyError: 'hul5b3wgfnfor3wndznoksqdphdp3ocs'

lib/spack/spack/environment.py:1542: KeyError
___________________________________________________________________________________________________________________ test_uninstall_spec_with_multiple_roots[dyninst-8] ___________________________________________________________________________________________________________________

constraint = 'dyninst', expected_number_of_specs = 8, mutable_database = <spack.database.Database object at 0x7fd088e30400>

    @pytest.mark.db
    @pytest.mark.regression('3690')
    @pytest.mark.parametrize('constraint,expected_number_of_specs', [
        ('dyninst', 8), ('libelf', 6)
    ])
    def test_uninstall_spec_with_multiple_roots(
            constraint, expected_number_of_specs, mutable_database
    ):
>       uninstall('-y', '-a', '--dependents', constraint)

lib/spack/spack/test/cmd/uninstall.py:66: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
lib/spack/spack/main.py:584: in __call__
    self.returncode = _invoke_command(
lib/spack/spack/main.py:525: in _invoke_command
    return_val = command(parser, args)
lib/spack/spack/cmd/uninstall.py:360: in uninstall
    uninstall_specs(args, specs)
lib/spack/spack/cmd/uninstall.py:316: in uninstall_specs
    uninstall_list, remove_list = get_uninstall_list(args, specs, env)
lib/spack/spack/cmd/uninstall.py:252: in get_uninstall_list
    spec_envs = dependent_environments(uninstall_list)
lib/spack/spack/cmd/uninstall.py:163: in dependent_environments
    hashes = set(env.all_hashes())
lib/spack/spack/environment.py:1550: in all_hashes
    return list(set(s.dag_hash() for s in self.all_specs()))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <spack.environment.Environment object at 0x7fd0888ec880>

    def all_specs(self):
        """Return all specs, even those a user spec would shadow."""
        all_specs = set()
        for h in self.concretized_order:
>           all_specs.update(self.specs_by_hash[h].traverse())
E           KeyError: 'hul5b3wgfnfor3wndznoksqdphdp3ocs'

lib/spack/spack/environment.py:1542: KeyError
___________________________________________________________________________________________________________________ test_uninstall_spec_with_multiple_roots[libelf-6] ____________________________________________________________________________________________________________________

constraint = 'libelf', expected_number_of_specs = 6, mutable_database = <spack.database.Database object at 0x7fd088883d00>

    @pytest.mark.db
    @pytest.mark.regression('3690')
    @pytest.mark.parametrize('constraint,expected_number_of_specs', [
        ('dyninst', 8), ('libelf', 6)
    ])
    def test_uninstall_spec_with_multiple_roots(
            constraint, expected_number_of_specs, mutable_database
    ):
>       uninstall('-y', '-a', '--dependents', constraint)

lib/spack/spack/test/cmd/uninstall.py:66: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
lib/spack/spack/main.py:584: in __call__
    self.returncode = _invoke_command(
lib/spack/spack/main.py:525: in _invoke_command
    return_val = command(parser, args)
lib/spack/spack/cmd/uninstall.py:360: in uninstall
    uninstall_specs(args, specs)
lib/spack/spack/cmd/uninstall.py:316: in uninstall_specs
    uninstall_list, remove_list = get_uninstall_list(args, specs, env)
lib/spack/spack/cmd/uninstall.py:252: in get_uninstall_list
    spec_envs = dependent_environments(uninstall_list)
lib/spack/spack/cmd/uninstall.py:163: in dependent_environments
    hashes = set(env.all_hashes())
lib/spack/spack/environment.py:1550: in all_hashes
    return list(set(s.dag_hash() for s in self.all_specs()))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <spack.environment.Environment object at 0x7fd0888aea60>

    def all_specs(self):
        """Return all specs, even those a user spec would shadow."""
        all_specs = set()
        for h in self.concretized_order:
>           all_specs.update(self.specs_by_hash[h].traverse())
E           KeyError: 'hul5b3wgfnfor3wndznoksqdphdp3ocs'

lib/spack/spack/environment.py:1542: KeyError
_____________________________________________________________________________________________________________ test_force_uninstall_spec_with_ref_count_not_zero[dyninst-14] ______________________________________________________________________________________________________________

constraint = 'dyninst', expected_number_of_specs = 14, mutable_database = <spack.database.Database object at 0x7fd088b81ee0>

    @pytest.mark.db
    @pytest.mark.parametrize('constraint,expected_number_of_specs', [
        ('dyninst', 14), ('libelf', 14)
    ])
    def test_force_uninstall_spec_with_ref_count_not_zero(
            constraint, expected_number_of_specs, mutable_database
    ):
>       uninstall('-f', '-y', constraint)

lib/spack/spack/test/cmd/uninstall.py:79: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
lib/spack/spack/main.py:584: in __call__
    self.returncode = _invoke_command(
lib/spack/spack/main.py:525: in _invoke_command
    return_val = command(parser, args)
lib/spack/spack/cmd/uninstall.py:360: in uninstall
    uninstall_specs(args, specs)
lib/spack/spack/cmd/uninstall.py:316: in uninstall_specs
    uninstall_list, remove_list = get_uninstall_list(args, specs, env)
lib/spack/spack/cmd/uninstall.py:252: in get_uninstall_list
    spec_envs = dependent_environments(uninstall_list)
lib/spack/spack/cmd/uninstall.py:163: in dependent_environments
    hashes = set(env.all_hashes())
lib/spack/spack/environment.py:1550: in all_hashes
    return list(set(s.dag_hash() for s in self.all_specs()))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <spack.environment.Environment object at 0x7fd088b69b20>

    def all_specs(self):
        """Return all specs, even those a user spec would shadow."""
        all_specs = set()
        for h in self.concretized_order:
>           all_specs.update(self.specs_by_hash[h].traverse())
E           KeyError: 'hul5b3wgfnfor3wndznoksqdphdp3ocs'

lib/spack/spack/environment.py:1542: KeyError
______________________________________________________________________________________________________________ test_force_uninstall_spec_with_ref_count_not_zero[libelf-14] ______________________________________________________________________________________________________________

constraint = 'libelf', expected_number_of_specs = 14, mutable_database = <spack.database.Database object at 0x7fd088dbeb50>

    @pytest.mark.db
    @pytest.mark.parametrize('constraint,expected_number_of_specs', [
        ('dyninst', 14), ('libelf', 14)
    ])
    def test_force_uninstall_spec_with_ref_count_not_zero(
            constraint, expected_number_of_specs, mutable_database
    ):
>       uninstall('-f', '-y', constraint)

lib/spack/spack/test/cmd/uninstall.py:79: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
lib/spack/spack/main.py:584: in __call__
    self.returncode = _invoke_command(
lib/spack/spack/main.py:525: in _invoke_command
    return_val = command(parser, args)
lib/spack/spack/cmd/uninstall.py:360: in uninstall
    uninstall_specs(args, specs)
lib/spack/spack/cmd/uninstall.py:316: in uninstall_specs
    uninstall_list, remove_list = get_uninstall_list(args, specs, env)
lib/spack/spack/cmd/uninstall.py:252: in get_uninstall_list
    spec_envs = dependent_environments(uninstall_list)
lib/spack/spack/cmd/uninstall.py:163: in dependent_environments
    hashes = set(env.all_hashes())
lib/spack/spack/environment.py:1550: in all_hashes
    return list(set(s.dag_hash() for s in self.all_specs()))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <spack.environment.Environment object at 0x7fd0888c3d60>

    def all_specs(self):
        """Return all specs, even those a user spec would shadow."""
        all_specs = set()
        for h in self.concretized_order:
>           all_specs.update(self.specs_by_hash[h].traverse())
E           KeyError: 'hul5b3wgfnfor3wndznoksqdphdp3ocs'

lib/spack/spack/environment.py:1542: KeyError
_______________________________________________________________________________________________________________________ test_force_uninstall_and_reinstall_by_hash _______________________________________________________________________________________________________________________

mutable_database = <spack.database.Database object at 0x7fd08a88fcd0>

    @pytest.mark.db
    def test_force_uninstall_and_reinstall_by_hash(mutable_database):
        """Test forced uninstall and reinstall of old specs."""
        # this is the spec to be removed
        callpath_spec = spack.store.db.query_one('callpath ^mpich')
        dag_hash = callpath_spec.dag_hash()
    
        # ensure can look up by hash and that it's a dependent of mpileaks
        def validate_callpath_spec(installed):
            assert installed is True or installed is False
    
            specs = spack.store.db.get_by_hash(dag_hash, installed=installed)
            assert len(specs) == 1 and specs[0] == callpath_spec
    
            specs = spack.store.db.get_by_hash(dag_hash[:7], installed=installed)
            assert len(specs) == 1 and specs[0] == callpath_spec
    
            specs = spack.store.db.get_by_hash(dag_hash, installed=any)
            assert len(specs) == 1 and specs[0] == callpath_spec
    
            specs = spack.store.db.get_by_hash(dag_hash[:7], installed=any)
            assert len(specs) == 1 and specs[0] == callpath_spec
    
            specs = spack.store.db.get_by_hash(dag_hash, installed=not installed)
            assert specs is None
    
            specs = spack.store.db.get_by_hash(dag_hash[:7],
                                               installed=not installed)
            assert specs is None
    
            mpileaks_spec = spack.store.db.query_one('mpileaks ^mpich')
            assert callpath_spec in mpileaks_spec
    
            spec = spack.store.db.query_one('callpath ^mpich', installed=installed)
            assert spec == callpath_spec
    
            spec = spack.store.db.query_one('callpath ^mpich', installed=any)
            assert spec == callpath_spec
    
            spec = spack.store.db.query_one('callpath ^mpich',
                                            installed=not installed)
            assert spec is None
    
        validate_callpath_spec(True)
    
>       uninstall('-y', '-f', 'callpath ^mpich')

lib/spack/spack/test/cmd/uninstall.py:130: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
lib/spack/spack/main.py:584: in __call__
    self.returncode = _invoke_command(
lib/spack/spack/main.py:525: in _invoke_command
    return_val = command(parser, args)
lib/spack/spack/cmd/uninstall.py:360: in uninstall
    uninstall_specs(args, specs)
lib/spack/spack/cmd/uninstall.py:316: in uninstall_specs
    uninstall_list, remove_list = get_uninstall_list(args, specs, env)
lib/spack/spack/cmd/uninstall.py:252: in get_uninstall_list
    spec_envs = dependent_environments(uninstall_list)
lib/spack/spack/cmd/uninstall.py:163: in dependent_environments
    hashes = set(env.all_hashes())
lib/spack/spack/environment.py:1550: in all_hashes
    return list(set(s.dag_hash() for s in self.all_specs()))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <spack.environment.Environment object at 0x7fd088d30f40>

    def all_specs(self):
        """Return all specs, even those a user spec would shadow."""
        all_specs = set()
        for h in self.concretized_order:
>           all_specs.update(self.specs_by_hash[h].traverse())
E           KeyError: 'hul5b3wgfnfor3wndznoksqdphdp3ocs'

lib/spack/spack/environment.py:1542: KeyError
______________________________________________________________________________________________________________________ test_in_memory_consistency_when_uninstalling ______________________________________________________________________________________________________________________

mutable_database = <spack.database.Database object at 0x7fd088dc8f40>, monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fd088835550>

    @pytest.mark.db
    @pytest.mark.regression('15773')
    def test_in_memory_consistency_when_uninstalling(
            mutable_database, monkeypatch
    ):
        """Test that uninstalling doesn't raise warnings"""
        def _warn(*args, **kwargs):
            raise RuntimeError('a warning was triggered!')
        monkeypatch.setattr(tty, 'warn', _warn)
        # Now try to uninstall and check this doesn't trigger warnings
>       uninstall('-y', '-a')

lib/spack/spack/test/cmd/uninstall.py:174: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
lib/spack/spack/main.py:584: in __call__
    self.returncode = _invoke_command(
lib/spack/spack/main.py:525: in _invoke_command
    return_val = command(parser, args)
lib/spack/spack/cmd/uninstall.py:360: in uninstall
    uninstall_specs(args, specs)
lib/spack/spack/cmd/uninstall.py:316: in uninstall_specs
    uninstall_list, remove_list = get_uninstall_list(args, specs, env)
lib/spack/spack/cmd/uninstall.py:252: in get_uninstall_list
    spec_envs = dependent_environments(uninstall_list)
lib/spack/spack/cmd/uninstall.py:163: in dependent_environments
    hashes = set(env.all_hashes())
lib/spack/spack/environment.py:1550: in all_hashes
    return list(set(s.dag_hash() for s in self.all_specs()))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <spack.environment.Environment object at 0x7fd08b502040>

    def all_specs(self):
        """Return all specs, even those a user spec would shadow."""
        all_specs = set()
        for h in self.concretized_order:
>           all_specs.update(self.specs_by_hash[h].traverse())
E           KeyError: 'hul5b3wgfnfor3wndznoksqdphdp3ocs'

lib/spack/spack/environment.py:1542: KeyError
================================================================================================================================= 3019 tests deselected ==================================================================================================================================
====================================================================================================================== 19 failed, 3019 deselected in 20.57 seconds =======================================================================================================================

Information on your system

  • Spack: 0.16.2-4205-161f0d5045
  • Python: 3.8.11
  • Platform: linux-ubuntu20.04-zen2
  • Concretizer: clingo

General information

  • I have run spack debug report and reported the version of Spack/Python/Platform
  • I have searched the issues of this repo and believe this is not a duplicate
  • I have run the failing commands in debug mode and reported the output

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingtriageThe issue needs to be prioritized

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions