fetch2: fix Exception parameters when BB_STRICT_CHECKSUM enabled
PATCH 1/1 fetch2: fix Exception parameters when BB_STRICT_CHECKSUM enabled
BB_STRICT_CHECKSUM caused a backtrace as the FetchError parameters are incorrectly specified such that FetchError is being passed 8 params when it's expecting 3. This fixes the parameters so we're passing a formatted string and the url.
Signed-off-by Joshua Lock <[email protected]>
--- lib/bb/fetch2/__init__.py | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
lib/bb/fetch2/__init__.py +3 -3
@@ -274,9 +274,9 @@ def verify_checksum(u, ud, d): strict = d.getVar("BB_STRICT_CHECKSUM", True) or None if (strict and ud.md5_expected == None and ud.sha256_expected == None): raise FetchError('No checksum specified for %s, please add at least one to the recipe:\n' - 'SRC_URI[%s] = "%s"\nSRC_URI[%s] = "%s"', u, - ud.localpath, ud.md5_name, md5data, - ud.sha256_name, sha256data) + 'SRC_URI[%s] = "%s"\nSRC_URI[%s] = "%s"' % + (ud.localpath, ud.md5_name, md5data, + ud.sha256_name, sha256data), u) # Log missing sums so user can more easily add them if ud.md5_expected == None:
Signature · 1 line
1.7.7.3
Richard Purdie
AppliedQuoted 9 lines · Joshua Lock
BB_STRICT_CHECKSUMcaused a backtrace as the FetchError parameters are incorrectly specified such that FetchError is being passed 8 params when it's expecting 3. This fixes the parameters so we're passing a formatted string and the url.Signed-off-by Joshua Lock <[email protected]>--- lib/bb/fetch2/__init__.py | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
Merged to master, thanks.
Richard