1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-30 12:29:55 +00:00

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>
This commit is contained in:
Jacob Kroon
2014-04-28 19:14:56 +02:00
committed by Richard Purdie
parent 0f717ea4b5
commit 3d34b49f4a
+2 -6
View File
@@ -975,7 +975,6 @@ def get_file_checksums(filelist, pn):
checksums = [] checksums = []
for pth in filelist.split(): for pth in filelist.split():
checksum = None
if '*' in pth: if '*' in pth:
# Handle globs # Handle globs
for f in glob.glob(pth): for f in glob.glob(pth):
@@ -985,15 +984,12 @@ def get_file_checksums(filelist, pn):
checksum = checksum_file(f) checksum = checksum_file(f)
if checksum: if checksum:
checksums.append((f, checksum)) checksums.append((f, checksum))
continue
elif os.path.isdir(pth): elif os.path.isdir(pth):
checksums.extend(checksum_dir(pth)) checksums.extend(checksum_dir(pth))
continue
else: else:
checksum = checksum_file(pth) checksum = checksum_file(pth)
if checksum:
if checksum: checksums.append((pth, checksum))
checksums.append((pth, checksum))
checksums.sort(key=operator.itemgetter(1)) checksums.sort(key=operator.itemgetter(1))
return checksums return checksums