summaryrefslogtreecommitdiff
path: root/support
diff options
context:
space:
mode:
authorYegor Yefremov <yegorslists@googlemail.com>2016-07-04 16:24:03 +0200
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2016-07-04 16:57:10 +0200
commit2f4bd0f339fcd86a0ffe6e082ac49683e4f57447 (patch)
tree137a33565f4785cb2e10a31c91a1553e480c45cd /support
parent1dbd7b991025a8bf39ab5d25c2fd97f47f084bac (diff)
scanpypi: change hash file comments
sha256 checksum will be computed locally either by scanpypi at package creation or by hand by package updates. Define this checksum as 'computed locally' so that one doesn't need to change this comment by package updates. Also put comments for both md5 and sha256 in one line. Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'support')
-rwxr-xr-xsupport/scripts/scanpypi5
1 files changed, 2 insertions, 3 deletions
diff --git a/support/scripts/scanpypi b/support/scripts/scanpypi
index f0d584a15..7546cf164 100755
--- a/support/scripts/scanpypi
+++ b/support/scripts/scanpypi
@@ -482,15 +482,14 @@ class BuildrootPackage():
print('Creating {filename}...'.format(filename=path_to_hash))
lines = []
if self.used_url['md5_digest']:
- md5_comment = '# md5 from {url}\n'.format(url=self.metadata_url)
+ md5_comment = '# md5 from {url}, sha256 locally computed\n'.format(
+ url=self.metadata_url)
lines.append(md5_comment)
hash_line = '{method}\t{digest} {filename}\n'.format(
method='md5',
digest=self.used_url['md5_digest'],
filename=self.filename)
lines.append(hash_line)
- sha256_comment = '# sha256 calculated by scanpypi\n'
- lines.append(sha256_comment)
digest = hashlib.sha256(self.as_string).hexdigest()
hash_line = '{method}\t{digest} {filename}\n'.format(
method='sha256',