Skip to contentSkip to conversation

scanpypi: change hash file comments

PATCH New yegorslists at googlemail.com 2 participants 2 messages Jul 4, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scanpypi: change hash file comments

From: Yegor Yefremov <[email protected]>

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.

---
 support/scripts/scanpypi | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
support/scripts/scanpypi +2 -3
index f0d584a..7546cf1 100755
@@ -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',
Signature · 1 line
2.8.1
#1 lore raw

PATCH 1/1 scanpypi: change hash file comments

Hello,

Quoted 11 lines · yegorslists at googlemail.com

From: Yegor Yefremov <[email protected]>

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.

---
 support/scripts/scanpypi | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com