@@ -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'])
@@ -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
ERROR: Variable BB_ENV_EXTRAWHITE has been renamed to BB_ENV_PASSTHROUGH_ADDITIONS ERROR: Variable BB_ENV_EXTRAWHITE from the shell environment has been renamed to BB_ENV_PASSTHROUGH_ADDITIONS ERROR: Exiting to allow enviroment variables to be corrected Replace BB_ENV_EXTRAWHITE with new variable BB_ENV_PASSTHROUGH_ADDITIONS In order to be backward compatible with older branches, we must first check for the presence of the bitbake commit which implemented the variable name change, using layerindex.utils.is_commit_ancestor(). Signed-off-by: Tim Orling <tim.orling@konsulko.com> --- Changes in v2: * Use new is_commit_ancestor check to check for the specific bitbake commit that introduced the variable renaming. This provides for backward compatibility in older branches (before bitbake 2.0). layerindex/recipedesc.py | 8 +++++++- layerindex/recipeparse.py | 7 ++++++- 2 files changed, 13 insertions(+), 2 deletions(-)