diff options
author | Harmen Stoppels <harmenstoppels@gmail.com> | 2023-02-16 14:26:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-16 14:26:30 +0100 |
commit | 09eb86e077d1273412862d773c169e03822adb82 (patch) | |
tree | 486284f4d0c91e0c56fab1e9d14762841aa2cf7c /var | |
parent | 50691ccdd9d69a5a5e239bbdaa2d6199f1b8a153 (diff) | |
download | spack-09eb86e077d1273412862d773c169e03822adb82.tar.gz spack-09eb86e077d1273412862d773c169e03822adb82.tar.bz2 spack-09eb86e077d1273412862d773c169e03822adb82.tar.xz spack-09eb86e077d1273412862d773c169e03822adb82.zip |
spack uninstall: follow run/link edges on --dependents (#34058)
`spack gc` removes build deps of explicitly installed specs, but somehow
if you take one of the specs that `spack gc` would remove, and feed it
to `spack uninstall /<hash>` by hash, it complains about all the
dependents that still rely on it.
This resolves the inconsistency by only following run/link type deps in
spack uninstall.
That way you can finally do `spack uninstall cmake` without having to
remove all packages built with cmake.
Diffstat (limited to 'var')
4 files changed, 67 insertions, 0 deletions
diff --git a/var/spack/repos/builtin.mock/packages/diamond-link-bottom/package.py b/var/spack/repos/builtin.mock/packages/diamond-link-bottom/package.py new file mode 100644 index 0000000000..b3f1640945 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/diamond-link-bottom/package.py @@ -0,0 +1,15 @@ +# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class DiamondLinkBottom(Package): + """Part of diamond-link-{top,left,right,bottom} group""" + + homepage = "http://www.example.com" + url = "http://www.example.com/diamond-link-bottom-1.0.tar.gz" + + version("1.0", "0123456789abcdef0123456789abcdef") diff --git a/var/spack/repos/builtin.mock/packages/diamond-link-left/package.py b/var/spack/repos/builtin.mock/packages/diamond-link-left/package.py new file mode 100644 index 0000000000..6b78feec0a --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/diamond-link-left/package.py @@ -0,0 +1,17 @@ +# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class DiamondLinkLeft(Package): + """Part of diamond-link-{top,left,right,bottom} group""" + + homepage = "http://www.example.com" + url = "http://www.example.com/diamond-link-left-1.0.tar.gz" + + version("1.0", "0123456789abcdef0123456789abcdef") + + depends_on("diamond-link-bottom", type="link") diff --git a/var/spack/repos/builtin.mock/packages/diamond-link-right/package.py b/var/spack/repos/builtin.mock/packages/diamond-link-right/package.py new file mode 100644 index 0000000000..28e19f3d3d --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/diamond-link-right/package.py @@ -0,0 +1,17 @@ +# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class DiamondLinkRight(Package): + """Part of diamond-link-{top,left,right,bottom} group""" + + homepage = "http://www.example.com" + url = "http://www.example.com/diamond-link-right-1.0.tar.gz" + + version("1.0", "0123456789abcdef0123456789abcdef") + + depends_on("diamond-link-bottom", type="link") diff --git a/var/spack/repos/builtin.mock/packages/diamond-link-top/package.py b/var/spack/repos/builtin.mock/packages/diamond-link-top/package.py new file mode 100644 index 0000000000..eb8c6e5890 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/diamond-link-top/package.py @@ -0,0 +1,18 @@ +# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class DiamondLinkTop(Package): + """Part of diamond-link-{top,left,right,bottom} group""" + + homepage = "http://www.example.com" + url = "http://www.example.com/diamond-link-top-1.0.tar.gz" + + version("1.0", "0123456789abcdef0123456789abcdef") + + depends_on("diamond-link-left", type="link") + depends_on("diamond-link-right", type="link") |