diff options
| -rw-r--r-- | meta/classes/base.bbclass | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass index 789af3b10b..2c2d0192f1 100644 --- a/meta/classes/base.bbclass +++ b/meta/classes/base.bbclass | |||
| @@ -94,9 +94,26 @@ def extra_path_elements(d): | |||
| 94 | 94 | ||
| 95 | PATH_prepend = "${@extra_path_elements(d)}" | 95 | PATH_prepend = "${@extra_path_elements(d)}" |
| 96 | 96 | ||
| 97 | def get_lic_checksum_file_list(d): | ||
| 98 | filelist = [] | ||
| 99 | lic_files = d.getVar("LIC_FILES_CHKSUM", True) or '' | ||
| 100 | |||
| 101 | urls = lic_files.split() | ||
| 102 | for url in urls: | ||
| 103 | # We only care about items that are absolute paths since | ||
| 104 | # any others should be covered by SRC_URI. | ||
| 105 | try: | ||
| 106 | path = bb.fetch.decodeurl(url)[2] | ||
| 107 | if path[0] == '/': | ||
| 108 | filelist.append(path + ":" + str(os.path.exists(path))) | ||
| 109 | except bb.fetch.MalformedUrl: | ||
| 110 | raise bb.build.FuncFailed(d.getVar('PN', True) + ": LIC_FILES_CHKSUM contains an invalid URL: " + url) | ||
| 111 | return " ".join(filelist) | ||
| 112 | |||
| 97 | addtask fetch | 113 | addtask fetch |
| 98 | do_fetch[dirs] = "${DL_DIR}" | 114 | do_fetch[dirs] = "${DL_DIR}" |
| 99 | do_fetch[file-checksums] = "${@bb.fetch.get_checksum_file_list(d)}" | 115 | do_fetch[file-checksums] = "${@bb.fetch.get_checksum_file_list(d)}" |
| 116 | do_fetch[file-checksums] += " ${@get_lic_checksum_file_list(d)}" | ||
| 100 | do_fetch[vardeps] += "SRCREV" | 117 | do_fetch[vardeps] += "SRCREV" |
| 101 | python base_do_fetch() { | 118 | python base_do_fetch() { |
| 102 | 119 | ||
