summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2021-06-04 02:55:09 -0500
committerGitHub <noreply@github.com>2021-06-04 09:55:09 +0200
commitc09eea59474b6c92fdbaec8d7fe3ccdb2c733dfc (patch)
treeab0b3604373084dc5c4a8046bc4d1c084792ae15 /lib
parentb03049e938e954200a5f304bb28dcfbbb237cc18 (diff)
downloadspack-c09eea59474b6c92fdbaec8d7fe3ccdb2c733dfc.tar.gz
spack-c09eea59474b6c92fdbaec8d7fe3ccdb2c733dfc.tar.bz2
spack-c09eea59474b6c92fdbaec8d7fe3ccdb2c733dfc.tar.xz
spack-c09eea59474b6c92fdbaec8d7fe3ccdb2c733dfc.zip
Don't warn about missing source id for external packages (#24125)
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/package.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py
index 9958f16efe..051f135667 100644
--- a/lib/spack/spack/package.py
+++ b/lib/spack/spack/package.py
@@ -1529,8 +1529,9 @@ class PackageBase(six.with_metaclass(PackageMeta, PackageViewMixin, object)):
# should this attempt to download the source and set one? This
# probably only happens for source repositories which are
# referenced by branch name rather than tag or commit ID.
- message = 'Missing a source id for {s.name}@{s.version}'
- tty.warn(message.format(s=self))
+ if not self.spec.external:
+ message = 'Missing a source id for {s.name}@{s.version}'
+ tty.warn(message.format(s=self))
hash_content.append(''.encode('utf-8'))
else:
hash_content.append(source_id.encode('utf-8'))