diff --git a/layerindex/recipedesc.py b/layerindex/recipedesc.py index ee7f2fe..a844186 100644 --- a/layerindex/recipedesc.py +++ b/layerindex/recipedesc.py @@ -39,6 +39,7 @@ def main(): from layerindex.models import LayerItem, Recipe from django.db import transaction import settings + from layerindex.utils import is_commit_ancestor setup_environ(settings) @@ -62,8 +63,13 @@ def main(): print("Unable to find bitbake by searching BITBAKEDIR, specified path '%s' or its parent, or PATH" % basepath) sys.exit(1) + # Commit "bitbake: Rename environment filtering variables" + bb_var_rename_commit = "87104b6a167188921da157c7dba45938849fb22a" # Skip sanity checks - os.environ['BB_ENV_EXTRAWHITE'] = 'DISABLE_SANITY_CHECKS' + if is_commit_ancestor(bitbakepath, bb_var_rename_commit, logger=logger): + os.environ['BB_ENV_PASSTHROUGH_ADDITIONS'] = 'DISABLE_SANITY_CHECKS' + else: + os.environ['BB_ENV_EXTRAWHITE'] = 'DISABLE_SANITY_CHECKS' os.environ['DISABLE_SANITY_CHECKS'] = '1' sys.path.extend([bitbakepath + '/lib']) diff --git a/layerindex/recipeparse.py b/layerindex/recipeparse.py index c918677..6202745 100644 --- a/layerindex/recipeparse.py +++ b/layerindex/recipeparse.py @@ -35,8 +35,13 @@ def init_parser(settings, branch, bitbakepath, enable_tracking=False, nocheckout bitbake_ref = 'origin/%s' % branch.bitbake_branch utils.checkout_repo(bitbakepath, bitbake_ref, logger=logger) + # Commit "bitbake: Rename environment filtering variables" + bb_var_rename_commit = "87104b6a167188921da157c7dba45938849fb22a" # Skip sanity checks - os.environ['BB_ENV_EXTRAWHITE'] = 'DISABLE_SANITY_CHECKS' + if utils.is_commit_ancestor(bitbakepath, bb_var_rename_commit, logger=logger): + os.environ['BB_ENV_PASSTHROUGH_ADDITIONS'] = 'DISABLE_SANITY_CHECKS' + else: + os.environ['BB_ENV_EXTRAWHITE'] = 'DISABLE_SANITY_CHECKS' os.environ['DISABLE_SANITY_CHECKS'] = '1' fetchdir = settings.LAYER_FETCH_DIR