diff options
author | Jacob Kroon <jacob.kroon@mikrodidakt.se> | 2014-04-28 19:14:56 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-04-29 17:33:58 +0100 |
commit | 3d34b49f4a4e2bc05ade5503d845d92f4051be43 (patch) | |
tree | aa109f3e26291d73ccd566cc47adbe06774633da /bitbake/lib | |
parent | 0f717ea4b59ce649ded811c1415d6f38799b246f (diff) | |
download | poky-3d34b49f4a4e2bc05ade5503d845d92f4051be43.tar.gz |
bitbake: fetch2: Cleanup file checksum generation, v2
The initial version of this patch was reverted in
0a94e568152de550dedc8135a766beb18bf064ab
However, it was later agreed upon that it was reverted due to
a misunderstanding during code review; the patch is ok.
This version of the patch also removes an unneeded initialization of
the 'checksum' variable outside the scopes it is being used in.
(Bitbake rev: 9ee19a3ca2f8e11a91f0289ea3486310c61d40f2)
Signed-off-by: Jacob Kroon <jacob.kroon@mikrodidakt.se>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r-- | bitbake/lib/bb/fetch2/__init__.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index 5a03a0e46e..5a9c72f016 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/lib/bb/fetch2/__init__.py | |||
@@ -975,7 +975,6 @@ def get_file_checksums(filelist, pn): | |||
975 | 975 | ||
976 | checksums = [] | 976 | checksums = [] |
977 | for pth in filelist.split(): | 977 | for pth in filelist.split(): |
978 | checksum = None | ||
979 | if '*' in pth: | 978 | if '*' in pth: |
980 | # Handle globs | 979 | # Handle globs |
981 | for f in glob.glob(pth): | 980 | for f in glob.glob(pth): |
@@ -985,15 +984,12 @@ def get_file_checksums(filelist, pn): | |||
985 | checksum = checksum_file(f) | 984 | checksum = checksum_file(f) |
986 | if checksum: | 985 | if checksum: |
987 | checksums.append((f, checksum)) | 986 | checksums.append((f, checksum)) |
988 | continue | ||
989 | elif os.path.isdir(pth): | 987 | elif os.path.isdir(pth): |
990 | checksums.extend(checksum_dir(pth)) | 988 | checksums.extend(checksum_dir(pth)) |
991 | continue | ||
992 | else: | 989 | else: |
993 | checksum = checksum_file(pth) | 990 | checksum = checksum_file(pth) |
994 | 991 | if checksum: | |
995 | if checksum: | 992 | checksums.append((pth, checksum)) |
996 | checksums.append((pth, checksum)) | ||
997 | 993 | ||
998 | checksums.sort(key=operator.itemgetter(1)) | 994 | checksums.sort(key=operator.itemgetter(1)) |
999 | return checksums | 995 | return checksums |