Parcourir la source

swupdate-common: Modify sha256 placeholder regex

Updated the regex to detect placeholders for sha256 checksums in JSON
formatted sw-description files in addition to libconfig formatted files.

Signed-off-by: Colin McAllister <colin.mcallister@garmin.com>
Tested-by: Stefano Babic <sbabic@denx.de>
Colin McAllister il y a 4 ans
Parent
commit
d311b384ac
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      classes/swupdate-common.bbclass

+ 1 - 1
classes/swupdate-common.bbclass

@@ -80,7 +80,7 @@ def swupdate_write_sha256(s):
        for line in f:
           shastr = r"sha256.+=.+@(.+\")"
           #m = re.match(r"^(?P<before_placeholder>.+)sha256.+=.+(?P<filename>\w+)", line)
-          m = re.match(r"^(?P<before_placeholder>.+)sha256.+=.+(?P<quote>[\'\"])@(?P<filename>.*)(?P=quote)", line)
+          m = re.match(r"^(?P<before_placeholder>.+)sha256.+[=:].*(?P<quote>[\'\"])@(?P<filename>.*)(?P=quote)", line)
           if m:
               filename = m.group('filename')
               hash = swupdate_get_sha256(s, filename)