[bitbake-devel] [PATCH 1/2] fetch2: improve usability of checksums

Joshua Lock josh at linux.intel.com
Wed Oct 19 17:22:16 UTC 2011



On 10/11/2011 10:07 AM, Joshua Lock wrote:
>      if ud.sha256_expected != sha256data:
> -        raise SHA256SumError(ud.localpath, ud.sha256_expected, sha256data, u)
> +        sha256mismatch = True
> +
> +    # We want to alert the user if a checksum is defined in the recipe but
> +    # it does not match.
> +    msg = ""
> +    if md5mismatch and ud.md5_expected:
> +        msg = msg + "\nFile: '%s' has %s checksum %s when %s was expected (from URL: '%s')" % (ud.localpath, 'md5', ud.md5_expected, md5data, u)
> +
> +    if sha256mismatch and ud.sha256_expected:
> +        msg = msg + "\nFile: '%s' has %s checksum %s when %s was expected (from URL: '%s')" % (ud.localpath, 'sha256', ud.sha256_expected, sha256data, u)
> +

Just realised I was passing the expected and data parameters in the
wrong order - I've pushed a fix to the same branch.

Cheers,
Joshua
-- 
Joshua Lock
        Yocto Project "Johannes factotum"
        Intel Open Source Technology Centre




More information about the bitbake-devel mailing list