[bitbake-devel] [PATCH] fetch2: Fix bug in file checksum generation
Jacob Kroon
jacob.kroon at gmail.com
Sun Apr 6 10:39:06 UTC 2014
Hi Richard,
diff --git a/bitbake/lib/bb/fetch2/__init__.py
b/bitbake/lib/bb/fetch2/__init__.py
> index 4335e7a..8e5342f 100644
> --- a/bitbake/lib/bb/fetch2/__init__.py
> +++ b/bitbake/lib/bb/fetch2/__init__.py
> @@ -969,6 +969,7 @@ def get_file_checksums(filelist, pn):
> checksum = checksum_file(f)
> if checksum:
> checksums.append((f, checksum))
> + continue
> elif os.path.isdir(pth):
> # Handle directories
> for root, dirs, files in os.walk(pth):
> @@ -977,6 +978,7 @@ def get_file_checksums(filelist, pn):
> checksum = checksum_file(fullpth)
> if checksum:
> checksums.append((fullpth, checksum))
> + continue
> else:
> checksum = checksum_file(pth)
>
Perhaps it would be cleaner to do
diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index 4335e7a..03ab234 100644
--- a/lib/bb/fetch2/__init__.py
+++ b/lib/bb/fetch2/__init__.py
@@ -979,9 +979,8 @@ def get_file_checksums(filelist, pn):
checksums.append((fullpth, checksum))
else:
checksum = checksum_file(pth)
-
- if checksum:
- checksums.append((pth, checksum))
+ if checksum:
+ checksums.append((pth, checksum))
checksums.sort(key=operator.itemgetter(1))
return checksums
or am I missing something here ?
/Jacob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/bitbake-devel/attachments/20140406/b0c5b222/attachment-0001.html>
More information about the bitbake-devel
mailing list