From edc3a3d19b749f0fcb612dfede4d990d2cd38797 Mon Sep 17 00:00:00 2001 From: Peter Josef Scheibel Date: Thu, 20 Oct 2022 09:54:42 -0600 Subject: [PATCH] temporarily undo everything in this PR to check if it could somehow be causing a failure in an unrelated test --- lib/spack/spack/repo.py | 16 +--------------- lib/spack/spack/test/concretize_preferences.py | 16 ---------------- 2 files changed, 1 insertion(+), 31 deletions(-) diff --git a/lib/spack/spack/repo.py b/lib/spack/spack/repo.py index f16997e66df..3d8d60f5a65 100644 --- a/lib/spack/spack/repo.py +++ b/lib/spack/spack/repo.py @@ -1362,21 +1362,7 @@ def get_pkg_class(self, pkg_name): if not inspect.isclass(cls): tty.die("%s.%s is not a class" % (pkg_name, class_name)) - new_cfg_settings = ( - spack.config.get("packages").get(pkg_name, {}).get("package_attributes", {}) - ) - overidden_attrs = getattr(cls, "overidden_attrs", {}) - for key, val in overidden_attrs.items(): - setattr(cls, key, val) - # Keep track of every class attribute that is overidden by the config: - # if the config changes between calls to this method, we make sure to - # restore the original config values (in case the new config no longer - # sets attributes that it used to) - new_overidden_attrs = {} - for key, val in new_cfg_settings.items(): - new_overidden_attrs[key] = getattr(cls, key) - setattr(cls, key, val) - setattr(cls, "overidden_attrs", dict(new_overidden_attrs)) + # TODO: restore logic here return cls diff --git a/lib/spack/spack/test/concretize_preferences.py b/lib/spack/spack/test/concretize_preferences.py index 4129ed22a5b..7bae90cb2cc 100644 --- a/lib/spack/spack/test/concretize_preferences.py +++ b/lib/spack/spack/test/concretize_preferences.py @@ -179,22 +179,6 @@ def test_preferred_providers(self): spec = concretize("mpileaks") assert "zmpi" in spec - def test_config_set_url_for_package(self, mutable_mock_repo): - """Test preferred providers of virtual packages are - applied correctly - """ - update_packages( - "mpileaks", - "package_attributes", - {"url": "http://www.somewhereelse.com/mpileaks-1.0.tar.gz"}, - ) - spec = concretize("mpileaks") - assert spec.package.fetcher[0].url == "http://www.somewhereelse.com/mpileaks-2.3.tar.gz" - - update_packages("mpileaks", "package_attributes", {}) - spec = concretize("mpileaks") - assert spec.package.fetcher[0].url == "http://www.llnl.gov/mpileaks-2.3.tar.gz" - def test_preferred(self): """ "Test packages with some version marked as preferred=True""" spec = Spec("python")