From 5792a805fc0a3867df30f14234e62a983cb0d395 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 16 Feb 2017 13:21:24 -0600 Subject: core: quick fix for packages without URLs Some packages do not have a `url` and are instead downloaded via `git`, `hg`, or `svn`. Some packages like `spectrum-mpi` cannot be downloaded at all, and are placeholder packages for system installations. Previously, `__init__()` in `PackageBase` crashed if a package did not have a `url` attribute defined. I hacked this section of code out, but I have no idea what the repercussions of that are. --- lib/spack/spack/package.py | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'lib') diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index 3b4c5fa394..8d6b2b99f5 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -494,17 +494,6 @@ class PackageBase(with_metaclass(PackageMeta, PackageViewMixin, object)): self._fetcher = None self.url = getattr(self.__class__, 'url', None) - # Fix up self.url if this package fetches with a URLFetchStrategy. - # This makes self.url behave sanely. - if self.spec.versions.concrete: - # TODO: this is a really roundabout way of determining the type - # TODO: of fetch to do. figure out a more sane fetch - # TODO: strategy/package init order (right now it's conflated with - # TODO: stage, package, and the tests make assumptions) - f = fs.for_package_version(self, self.version) - if isinstance(f, fs.URLFetchStrategy): - self.url = self.url_for_version(self.spec.version) - # Set a default list URL (place to find available versions) if not hasattr(self, 'list_url'): self.list_url = None -- cgit v1.2.3-60-g2f50