summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2014-04-06 11:08:22 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-04-06 11:31:26 +0100
commitbb66113bde5361b869dce2bdaece5b938f077ea8 (patch)
tree742ce28c72f0fa46d37b0f65f65a2e60bc018ade /bitbake
parent025021ee5c59c9794c35fc2a4f8397b1a17e7354 (diff)
downloadpoky-bb66113bde5361b869dce2bdaece5b938f077ea8.tar.gz
bitbake: fetch2: Fix bug in file checksum generation
For a while its been puzzling me why connman-gnome rebuilds as often as it does. It turns out you can trigger this with a new checkout of the metadata. The SRC_URI that is causing the problems is: SRC_URI = "file://images/*" and rather oddly the results in checksums for a file "." being added to the tree, e.g.: ('.', 'ab48a68186f0e0f277c21ef4cb390b4b') The problem is that when iterating files lists, the checksum variable can become set yet we don't break the out from the for loop, which leads to odd (and non-deterministic) entries being added into the file checksum list. The exact item added probably depends on the order of items on the disk. Before this change, bitbake-diffsigs on connman-gnome:do_fetch would report: This task depends on the checksums of files: [ ('connman-signal-03.png', 'f6c16aee57b37b73793a2f1dea433ffa'), ('connman-signal-02.png', 'ad0cd22710c097d8174121fc1023c3be'), ('connman-signal-01.png', '8842bd83d2fa9ba56480df34c727c629'), ('null_check_for_ipv4_config.patch', 'a23271e41c9fe81551244d875106af10'), ('connman-signal-05.png', '808589e7e8d502b44c7b007e9e68d48c'), ('connman-signal-04.png', 'ab48a68186f0e0f277c21ef4cb390b4b'), ('null_check_for_ipv4_config.patch', 'a23271e41c9fe81551244d875106af10'), ('0001-Removed-icon-from-connman-gnome-about-applet.patch', 'e2d8269357c1e8c84291606da24eea85'), ('0001-Removed-icon-from-connman-gnome-about-applet.patch', 'e2d8269357c1e8c84291606da24eea85'), ('.', 'ab48a68186f0e0f277c21ef4cb390b4b')] Afterwards: This task depends on the checksums of files: [ ('connman-signal-03.png', 'f6c16aee57b37b73793a2f1dea433ffa'), ('connman-signal-02.png', 'ad0cd22710c097d8174121fc1023c3be'), ('connman-signal-01.png', '8842bd83d2fa9ba56480df34c727c629'), ('null_check_for_ipv4_config.patch', 'a23271e41c9fe81551244d875106af10'), ('connman-signal-05.png', '808589e7e8d502b44c7b007e9e68d48c'), ('connman-signal-04.png', 'ab48a68186f0e0f277c21ef4cb390b4b'), ('null_check_for_ipv4_config.patch', 'a23271e41c9fe81551244d875106af10'), ('0001-Removed-icon-from-connman-gnome-about-applet.patch', 'e2d8269357c1e8c84291606da24eea85'), ('0001-Removed-icon-from-connman-gnome-about-applet.patch', 'e2d8269357c1e8c84291606da24eea85')] which is correct and deterministic without the "." entry. (Bitbake rev: f9416e76e272ba3249abff099f6f3a47fe82e03e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 4335e7a0d8..8e5342f494 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):
969 checksum = checksum_file(f) 969 checksum = checksum_file(f)
970 if checksum: 970 if checksum:
971 checksums.append((f, checksum)) 971 checksums.append((f, checksum))
972 continue
972 elif os.path.isdir(pth): 973 elif os.path.isdir(pth):
973 # Handle directories 974 # Handle directories
974 for root, dirs, files in os.walk(pth): 975 for root, dirs, files in os.walk(pth):
@@ -977,6 +978,7 @@ def get_file_checksums(filelist, pn):
977 checksum = checksum_file(fullpth) 978 checksum = checksum_file(fullpth)
978 if checksum: 979 if checksum:
979 checksums.append((fullpth, checksum)) 980 checksums.append((fullpth, checksum))
981 continue
980 else: 982 else:
981 checksum = checksum_file(pth) 983 checksum = checksum_file(pth)
982 984