1 # Allows tweaks to be amended to a recipe via a .inc in its FILESPATH
3 # Simply drop amend.inc into an appropriate place in a recipe's FILESPATH and
4 # it'll be parsed in after the recipe itself is.
6 # Copyright (c) 2009 MontaVista Software, Inc. All rights reserved.
8 # Released under the MIT license (see LICENSE.MIT for the terms)
15 for base in d.getVar("FILESPATHBASE", True).split(":"):
16 for pkg in d.getVar("FILESPATHPKG", True).split(":"):
17 path = os.path.join(base, pkg, "amend.inc")
23 for amend in __amendfiles():
24 if os.path.exists(amend):
25 bb.parse.handle(amend, d, 1)
27 # Manually add amend.inc files that don't exist to the __depends,
28 # to ensure that creating them invalidates the bitbake cache
29 newdata.append((amend, 0))
34 depends = d.getVar("__depends", False)
35 bbversion = tuple(int(i) for i in bb.__version__.split("."))
36 if bbversion < (1, 11, 0):
43 depends |= set(newdata)
44 d.setVar("__depends", depends)