Don't warn about missing source id for external packages (#24125)

This commit is contained in:
Adam J. Stewart 2021-06-04 02:55:09 -05:00 committed by GitHub
parent b03049e938
commit c09eea5947
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1529,8 +1529,9 @@ def content_hash(self, content=None):
# should this attempt to download the source and set one? This # should this attempt to download the source and set one? This
# probably only happens for source repositories which are # probably only happens for source repositories which are
# referenced by branch name rather than tag or commit ID. # referenced by branch name rather than tag or commit ID.
message = 'Missing a source id for {s.name}@{s.version}' if not self.spec.external:
tty.warn(message.format(s=self)) message = 'Missing a source id for {s.name}@{s.version}'
tty.warn(message.format(s=self))
hash_content.append(''.encode('utf-8')) hash_content.append(''.encode('utf-8'))
else: else:
hash_content.append(source_id.encode('utf-8')) hash_content.append(source_id.encode('utf-8'))