'Recursively construct a spec from a hash in a YAML database.
Does not do any locking.'

def _read_spec_from_dict(self, hash_key, installs):

    spec_dict = installs[hash_key]['spec']
    for name in spec_dict:
        spec_dict[name]['hash'] = hash_key
    spec = spack.spec.Spec.from_node_dict(spec_dict)
    return spec
