hc
2023-11-06 15ade055295d13f95d49e3d99b09f3bbfb4a43e7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Copyright (C) 2019, Fuzhou Rockchip Electronics Co., Ltd
# Released under the MIT license (see COPYING.MIT for the terms)
#
# This bbclass is extremely hacky, should be replaced by something like:
#   https://patchwork.openembedded.org/patch/154265/
#
 
def undo_allarch_inherit(d):
    val = d.getVar('__inherit_cache', False) or []
    deps = (d.getVar('__depends', False) or [])
    f = os.path.join('classes', 'allarch.bbclass')
 
    for v in val:
        if v.endswith(f):
            val.remove(v)
    d.setVar('__inherit_cache', val)
 
    new_deps = []
    for v in deps:
        if not v[0].endswith(f):
            new_deps.append(v)
    d.setVar('__depends', new_deps)
 
    return ''
 
inherit ${@oe.utils.ifelse(d.getVar('MULTILIB_VARIANTS'), undo_allarch_inherit(d), 'allarch-core')}