summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2
diff options
context:
space:
mode:
authorTyler Hall <tylerwhall@gmail.com>2012-12-19 18:26:50 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-01-18 12:50:12 +0000
commit0e408df69fd7a380d96501f13e81976eaea26fa4 (patch)
tree46490cc69f4a7851c56ed53a7fc414d519a3fa9e /bitbake/lib/bb/fetch2
parentfe30cbc2cb0719092f19cba3b06a37e93260994c (diff)
downloadpoky-0e408df69fd7a380d96501f13e81976eaea26fa4.tar.gz
bitbake: fetch2: Sort file checksums by value, not path
Changing the path to a file could change the task hash even if the file still has the same checksum. This occurs when the task depends on multiple files and the sort order of their paths changes. Usually the sorting is consistent because layers tend to have the same relative paths, but this should take care of other configuations. The problem arose when using a .bbappend to add files to a recipe in another layer. If the layer is located alongside the other layers and their parent directory is moved, the hash does not change. However, moving the .bbappend layer outside of the common directory can change the path sort order and the task hash. (Bitbake rev: 22bd19d208f0251f5a1f9b98f3cac66181f3fc07) Signed-off-by: Tyler Hall <tylerwhall@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2')
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 150dc3c18f..47463561e3 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -30,6 +30,7 @@ from __future__ import print_function
30import os, re 30import os, re
31import logging 31import logging
32import urllib 32import urllib
33import operator
33import bb.persist_data, bb.utils 34import bb.persist_data, bb.utils
34import bb.checksum 35import bb.checksum
35from bb import data 36from bb import data
@@ -729,7 +730,7 @@ def get_file_checksums(filelist, pn):
729 if checksum: 730 if checksum:
730 checksums.append((pth, checksum)) 731 checksums.append((pth, checksum))
731 732
732 checksums.sort() 733 checksums.sort(key=operator.itemgetter(1))
733 return checksums 734 return checksums
734 735
735 736