diff options
Diffstat (limited to 'bitbake/lib/bb/fetch2')
-rw-r--r-- | bitbake/lib/bb/fetch2/__init__.py | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index c0a4763a8b..378d41e1cb 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/lib/bb/fetch2/__init__.py | |||
@@ -936,22 +936,21 @@ def get_checksum_file_list(d): | |||
936 | ud = fetch.ud[u] | 936 | ud = fetch.ud[u] |
937 | 937 | ||
938 | if ud and isinstance(ud.method, local.Local): | 938 | if ud and isinstance(ud.method, local.Local): |
939 | ud.setup_localpath(d) | 939 | paths = ud.method.localpaths(ud, d) |
940 | f = ud.localpath | 940 | for f in paths: |
941 | pth = ud.decodedurl | 941 | pth = ud.decodedurl |
942 | if '*' in pth: | 942 | if '*' in pth: |
943 | f = os.path.join(os.path.abspath(f), pth) | 943 | f = os.path.join(os.path.abspath(f), pth) |
944 | if f.startswith(dl_dir): | 944 | if f.startswith(dl_dir): |
945 | # The local fetcher's behaviour is to return a path under DL_DIR if it couldn't find the file anywhere else | 945 | # The local fetcher's behaviour is to return a path under DL_DIR if it couldn't find the file anywhere else |
946 | if os.path.exists(f): | 946 | if os.path.exists(f): |
947 | bb.warn("Getting checksum for %s SRC_URI entry %s: file not found except in DL_DIR" % (d.getVar('PN', True), os.path.basename(f))) | 947 | bb.warn("Getting checksum for %s SRC_URI entry %s: file not found except in DL_DIR" % (d.getVar('PN', True), os.path.basename(f))) |
948 | else: | 948 | else: |
949 | bb.warn("Unable to get checksum for %s SRC_URI entry %s: file could not be found" % (d.getVar('PN', True), os.path.basename(f))) | 949 | bb.warn("Unable to get checksum for %s SRC_URI entry %s: file could not be found" % (d.getVar('PN', True), os.path.basename(f))) |
950 | filelist.append(f) | 950 | filelist.append(f + ":" + str(os.path.exists(f))) |
951 | 951 | ||
952 | return " ".join(filelist) | 952 | return " ".join(filelist) |
953 | 953 | ||
954 | |||
955 | def get_file_checksums(filelist, pn): | 954 | def get_file_checksums(filelist, pn): |
956 | """Get a list of the checksums for a list of local files | 955 | """Get a list of the checksums for a list of local files |
957 | 956 | ||
@@ -981,6 +980,10 @@ def get_file_checksums(filelist, pn): | |||
981 | 980 | ||
982 | checksums = [] | 981 | checksums = [] |
983 | for pth in filelist.split(): | 982 | for pth in filelist.split(): |
983 | exist = pth.split(":")[1] | ||
984 | if exist == "False": | ||
985 | continue | ||
986 | pth = pth.split(":")[0] | ||
984 | if '*' in pth: | 987 | if '*' in pth: |
985 | # Handle globs | 988 | # Handle globs |
986 | for f in glob.glob(pth): | 989 | for f in glob.glob(pth): |
@@ -988,14 +991,12 @@ def get_file_checksums(filelist, pn): | |||
988 | checksums.extend(checksum_dir(f)) | 991 | checksums.extend(checksum_dir(f)) |
989 | else: | 992 | else: |
990 | checksum = checksum_file(f) | 993 | checksum = checksum_file(f) |
991 | if checksum: | 994 | checksums.append((f, checksum)) |
992 | checksums.append((f, checksum)) | ||
993 | elif os.path.isdir(pth): | 995 | elif os.path.isdir(pth): |
994 | checksums.extend(checksum_dir(pth)) | 996 | checksums.extend(checksum_dir(pth)) |
995 | else: | 997 | else: |
996 | checksum = checksum_file(pth) | 998 | checksum = checksum_file(pth) |
997 | if checksum: | 999 | checksums.append((pth, checksum)) |
998 | checksums.append((pth, checksum)) | ||
999 | 1000 | ||
1000 | checksums.sort(key=operator.itemgetter(1)) | 1001 | checksums.sort(key=operator.itemgetter(1)) |
1001 | return checksums | 1002 | return checksums |