The "fetch2: Ensure cached url data is matched to a datastore" patch (e.g. 4ce50bbd34eefeabfeca89a6a66c71598d3c58f6 in 1.42 branch) causes regressions in recipes which call `bb.fetch2.Fetch()` in early stages. E.g. ------ LICENSE = "CLOSED" SRC_URI = "file://foo;name=bootsplash" def _find_bootsplash(d): fetch = bb.fetch2.Fetch([], d) for url in fetch.urls: urldata = fetch.ud[url] parm = urldata.parm if parm.get('name') == 'bootsplash': return urldata raise Exception("no bootsplash") def get_bootsplash_convert(d): uri = _find_bootsplash(d) if not uri.localpath: # happens in early parsing stage; skip further processing return None ## construct an image magick command to rotate/scale bootsplash ## ... return "true" LOGO_CONVERT_CMD = "${@get_bootsplash_convert(d)}" do_unpack[postfuncs] += "do_logo_preprocess do_unpack_logo" do_logo_preprocess() { ${LOGO_CONVERT_CMD} false } --------- fails after this patch but worked before.
Sorry about the delay in getting to this. The issue is actually an API one. The API is that for localpath to be valid, you need to call: urldata = fetch.ud[url] urldata.setup_localpath(d) and your example doesn't. In previous code you got a cached object that had this called already, with the patch applied, you no longer get the cached object and therefore need the call.