Skip to contentSkip to conversation

devtool: do not write md5sums into upgraded recipes

PATCH In review Alexander Kanavin 2 participants 2 messages May 19, 2020 – May 21, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 devtool: do not write md5sums into upgraded recipes

This will drop them md5sums from recipes that still have them, and will not re-add them for recipes where they're already removed.

---
 scripts/lib/devtool/upgrade.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
scripts/lib/devtool/upgrade.py +2 -2
index cb6dce378a..f962a71e41 100644
@@ -391,12 +391,12 @@ def _create_new_recipe(newpv, md5, sha256, srcrev, srcbranch, srcsubdir_old, src
             newvalues['SRC_URI[%s.md5sum]' % name] = None
             newvalues['SRC_URI[%s.sha256sum]' % name] = None
 
-    if md5 and sha256:
+    if sha256:
         if addnames:
             nameprefix = '%s.' % addnames[0]
         else:
             nameprefix = ''
-        newvalues['SRC_URI[%smd5sum]' % nameprefix] = md5
+        newvalues['SRC_URI[%smd5sum]' % nameprefix] = None
         newvalues['SRC_URI[%ssha256sum]' % nameprefix] = sha256
 
     if srcsubdir_new != srcsubdir_old:
Signature · 1 line
2.26.2
#1 lore raw
Quoted 20 lines · Alexander Kanavin

This will drop them md5sums from recipes that still have them, and will not re-add them for recipes where they're already removed.

---
 scripts/lib/devtool/upgrade.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
scripts/lib/devtool/upgrade.py +0 -0
index cb6dce378a..f962a71e41 100644
@@ -391,12 +391,12 @@ def _create_new_recipe(newpv, md5, sha256,

srcrev, srcbranch, srcsubdir_old, src

             newvalues['SRC_URI[%s.md5sum]' % name] = None
             newvalues['SRC_URI[%s.sha256sum]' % name] = None
scripts/lib/devtool/upgrade.py +0 -1
-    if md5 and sha256:

scripts/lib/devtool/upgrade.py def _create_new_recipe(newpv, md5, sha256, srcrev, srcbranch, srcsubdir_old, src · line 402

Quoted 10 lines
scripts/lib/devtool/upgrade.py +2 -1
+    if sha256:
         if addnames:
             nameprefix = '%s.' % addnames[0]
         else:
             nameprefix = ''
-        newvalues['SRC_URI[%smd5sum]' % nameprefix] = md5
+        newvalues['SRC_URI[%smd5sum]' % nameprefix] = None
         newvalues['SRC_URI[%ssha256sum]' % nameprefix] = sha256
 
     if srcsubdir_new != srcsubdir_old:

This broke the devtool selftests but I added a fix to the change before merging.

Cheers,

Richard