Explorar el Código

Raise a warning if old syntax for sha256 is used

Generation of attributes in sw-description should be done by separate
function. The old syntax with '@<artifact name>' is still allowed for
compatibility reason, but it will be removed in future.

Signed-off-by: Stefano Babic <sbabic@denx.de>
Stefano Babic hace 3 años
padre
commit
7c2c518611
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      classes/swupdate-common.bbclass

+ 1 - 1
classes/swupdate-common.bbclass

@@ -57,10 +57,10 @@ def swupdate_write_sha256(s):
     with open(os.path.join(s, "sw-description"), 'r') as f:
        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|version).+[=:].*(?P<quote>[\'\"])@(?P<filename>.*)(?P=quote)", line)
           if m:
               filename = m.group('filename')
+              bb.warn("Syntax for sha256 changed, please use $swupdate_get_sha256(%s)" % filename)
               hash = swupdate_get_sha256(None, s, filename)
               write_lines.append(line.replace("@%s" % (filename), hash))
           else: