poky/meta/classes/image-postinst-intercepts.bbclass
Richard Purdie 971d5f7b81 classes: Add copyright statements to files without one
Where there isn't a copyright statement, add one to make it explicit.
Also drop editor config lines where they were present.

(From OE-Core rev: 880c1ea3edc8edef974e65b2d424fc36809ea034)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-12 11:58:01 +01:00

28 lines
1.1 KiB
Plaintext

#
# Copyright OpenEmbedded Contributors
#
# Gather existing and candidate postinst intercepts from BBPATH
POSTINST_INTERCEPTS_DIR ?= "${COREBASE}/scripts/postinst-intercepts"
POSTINST_INTERCEPTS_PATHS ?= "${@':'.join('%s/postinst-intercepts' % p for p in '${BBPATH}'.split(':'))}:${POSTINST_INTERCEPTS_DIR}"
python find_intercepts() {
intercepts = {}
search_paths = []
paths = d.getVar('POSTINST_INTERCEPTS_PATHS').split(':')
overrides = (':' + d.getVar('FILESOVERRIDES')).split(':') + ['']
search_paths = [os.path.join(p, op) for p in paths for op in overrides]
searched = oe.path.which_wild('*', ':'.join(search_paths), candidates=True)
files, chksums = [], []
for pathname, candidates in searched:
if os.path.isfile(pathname):
files.append(pathname)
chksums.append('%s:True' % pathname)
chksums.extend('%s:False' % c for c in candidates[:-1])
d.setVar('POSTINST_INTERCEPT_CHECKSUMS', ' '.join(chksums))
d.setVar('POSTINST_INTERCEPTS', ' '.join(files))
}
find_intercepts[eventmask] += "bb.event.RecipePreFinalise"
addhandler find_intercepts