Patchwork [bitbake-devel] lib/bb/fetch2: fix comments for verify_checksum

login
register
mail settings
Submitter Paul Eggleton
Date May 24, 2012, 3:47 p.m.
Message ID <1337874475-5086-1-git-send-email-paul.eggleton@linux.intel.com>
Download mbox | patch
Permalink /patch/28617/
State New
Headers show

Comments

Paul Eggleton - May 24, 2012, 3:47 p.m.
This function no longer returns a value, it raises errors instead, so
update the comments to reflect this.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 bitbake/lib/bb/fetch2/__init__.py |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
Richard Purdie - May 25, 2012, 10:11 a.m.
On Thu, 2012-05-24 at 16:47 +0100, Paul Eggleton wrote:
> This function no longer returns a value, it raises errors instead, so
> update the comments to reflect this.
> 
> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
> ---
>  bitbake/lib/bb/fetch2/__init__.py |    9 +++------
>  1 file changed, 3 insertions(+), 6 deletions(-)

Merged to master, thanks.

Richard

Patch

diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index d4b6c3e..6ae69cd 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -274,13 +274,10 @@  def verify_checksum(u, ud, d):
     """
     verify the MD5 and SHA256 checksum for downloaded src
 
-    return value:
-        - True: a checksum matched
-        - False: neither checksum matched
+    Raises a FetchError if one or both of the SRC_URI checksums do not match
+    the downloaded file, or if BB_STRICT_CHECKSUM is set and there are no
+    checksums specified.
 
-    if checksum is missing in recipes file, "BB_STRICT_CHECKSUM" decide the return value.
-    if BB_STRICT_CHECKSUM = "1" then return false as unmatched, otherwise return true as
-    matched
     """
 
     if not ud.method.supports_checksum(ud):