1 require checksum_control_files.inc
3 python do_checksum_control() {
4 to_check_dico = d.getVarFlags("CTL_CHECKSUM")
5 if to_check_dico is None:
8 src_uri = (d.getVar('SRC_URI') or "").split()
10 c_source=os.path.basename(s)
11 bb.note("Check source: %s " % (c_source))
12 if c_source in to_check_dico:
13 f_data = bb.fetch2.FetchData(s, d, True)
14 f_data.setup_localpath(d)
15 if os.path.exists(f_data.localpath):
16 mdr5_sum=bb.utils.md5_file(f_data.localpath)
17 mdr5_ctl=to_check_dico[c_source]
18 if mdr5_sum != mdr5_ctl:
19 bb.fatal( "File %s hash should be %s but %s find, please update your driver files." % (c_source, mdr5_ctl, mdr5_sum))
22 do_checksum_control[doc] = "Do a checksum of the archives source files"
23 do_checksum_control[vardeps] = "CTL_CHECKSUM"
25 addtask do_checksum_control before do_unpack after do_fetch