[elbe-devel] [PATCH 4/4] Change md5 to sha256

Bastian Germann bage at linutronix.de
Mon Jul 29 18:07:50 CEST 2019


> From: Olivier Dion <dion at linutronix.de>
> 
> Signed-off-by: Olivier Dion <dion at linutronix.de>

Reviewed-by: Bastian Germann <bage at linutronix.de>

> ---
>  elbepack/dump.py      | 12 ++++++------
>  elbepack/elbexml.py   |  4 ++--
>  elbepack/updatepkg.py |  2 +-
>  3 files changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/elbepack/dump.py b/elbepack/dump.py
> index d73b3789..a1bb5668 100644
> --- a/elbepack/dump.py
> +++ b/elbepack/dump.py
> @@ -121,7 +121,7 @@ def check_full_pkgs(pkgs, fullpkgs, errorname, cache):
>      for p in fullpkgs:
>          name = p.et.text
>          ver = p.et.get('version')
> -        md5 = p.et.get('md5')
> +        sha256 = p.et.get('sha256')
>  
>          pindex[name] = p
>  
> @@ -144,9 +144,9 @@ def check_full_pkgs(pkgs, fullpkgs, errorname, cache):
>              errors += 1
>              continue
>  
> -        if pkg.installed_md5 != md5:
> -            elog.printo("- package %s md5 %s does not match installed md5 %s" %
> -                        (name, md5, pkg.installed_md5))
> +        if pkg.installed_sha256 != sha256:
> +            elog.printo("- package %s sha25 %s does not match installed sha256 %s" %
> +                        (name, sha256, pkg.installed_sha256))
>              errors += 1
>  
>      for cp in cache.get_installed_pkgs():
> @@ -282,13 +282,13 @@ def elbe_report(xml, buildenv, cache, reportname, errorname, targetfs):
>              (p.name,
>               p.installed_version,
>               p.is_auto_installed,
> -             p.installed_md5))
> +             p.installed_sha256))
>          if xml.has("target/pkgversionlist"):
>              f.write(
>                  "%s %s %s\n" %
>                  (p.name,
>                   p.installed_version,
> -                 p.installed_md5))
> +                 p.installed_sha256))
>      outf.table()
>  
>      if xml.has("target/pkgversionlist"):
> diff --git a/elbepack/elbexml.py b/elbepack/elbexml.py
> index ce3371c2..9ffed2d0 100644
> --- a/elbepack/elbexml.py
> +++ b/elbepack/elbexml.py
> @@ -333,10 +333,10 @@ class ElbeXML(object):
>          pak.et.tail = '\n'
>          if aptpkg.installed_version is not None:
>              pak.et.set('version', aptpkg.installed_version)
> -            pak.et.set('md5', aptpkg.installed_md5)
> +            pak.et.set('sha256', aptpkg.installed_sha256)
>          else:
>              pak.et.set('version', aptpkg.candidate_version)
> -            pak.et.set('md5', aptpkg.candidate_md5)
> +            pak.et.set('sha256', aptpkg.candidate_sha256)
>  
>          if aptpkg.is_auto_installed:
>              pak.et.set('auto', 'true')
> diff --git a/elbepack/updatepkg.py b/elbepack/updatepkg.py
> index 4c848a55..75d0f98a 100644
> --- a/elbepack/updatepkg.py
> +++ b/elbepack/updatepkg.py
> @@ -70,7 +70,7 @@ def gen_update_pkg(project, xml_filename, upd_filename,
>          for p in xmlpkgs:
>              name = p.et.text
>              ver = p.et.get('version')
> -            md5 = p.et.get('md5')
> +            sha256 = p.et.get('sha256')
>  
>              xmlindex[name] = p
>  
> 



More information about the elbe-devel mailing list