<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
It does not change behavior but it forces the value to be a string,
avoiding related problems when performing comparisons on "strict",
another option as Richard Purdie suggested would be to import the
boolean function from /meta/lib/oe/types.py in OE-Core into a new
types module in bitbake, forcing it to get a "good" value that we
could then use.<br>
<br>
<div class="moz-cite-prefix">On 08/10/14 11:13, Christopher Larson
wrote:<br>
</div>
<blockquote
cite="mid:CABcZAN=+nJjhKpGXnshy-VuFdW85oXwG5V9KsPMe79qm5cWXsQ@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_extra"><br>
<div class="gmail_quote">On Tue, Sep 30, 2014 at 9:21 AM,
Alejandro Hernandez <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:alejandro.hernandez@linux.intel.com"
target="_blank">alejandro.hernandez@linux.intel.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div id=":b1" class="a3s" style="overflow:hidden">Forcing
<span class="il">strict</span> to be a string, to avoid
problems when performing comparisons<br>
<br>
[YOCTO #6762]<br>
<br>
Signed-off-by: Alejandro Hernandez <<a
moz-do-not-send="true"
href="mailto:alejandro.hernandez@linux.intel.com">alejandro.hernandez@linux.intel.com</a>><br>
---<br>
lib/bb/fetch2/__init__.py | 4 ++--<br>
1 file changed, 2 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/lib/bb/fetch2/__init__.py
b/lib/bb/fetch2/__init__.py<br>
index df2f2b0..10c3346 100644<br>
--- a/lib/bb/fetch2/__init__.py<br>
+++ b/lib/bb/fetch2/__init__.py<br>
@@ -543,8 +543,8 @@ def verify_checksum(ud, d):<br>
<br>
if ud.method.recommends_checksum(ud):<br>
# If <span class="il">strict</span> checking
enabled and neither sum defined, raise error<br>
- <span class="il">strict</span> =
d.getVar("BB_STRICT_CHECKSUM", True) or None<br>
- if <span class="il">strict</span> and not
(ud.md5_expected or ud.sha256_expected):<br>
+ <span class="il">strict</span> =
d.getVar("BB_STRICT_CHECKSUM", "1") or "0"<br>
+ if (<span class="il">strict</span> == "1") and
not (ud.md5_expected or ud.sha256_expected):</div>
</blockquote>
</div>
<br>
Why was True (second argument of getVar) changed to "1" here?
It violates our conventions and doesn't actually change
anything in the behavior.<br>
-- <br>
Christopher Larson<br>
clarson at kergoth dot com<br>
Founder - BitBake, OpenEmbedded, OpenZaurus<br>
Maintainer - Tslib<br>
Senior Software Engineer, Mentor Graphics
</div>
</div>
</blockquote>
<br>
</body>
</html>