@@ -33,7 +33,13 @@ if not fetchdir:
sys.exit(1)
# setup bitbake path
-bitbakepath = os.path.join(fetchdir, 'bitbake')
+from layerindex.models import LayerItem
+bitbakeitem = LayerItem()
+bitbakeitem.vcs_url = settings.BITBAKE_REPO_URL
+bitbakepath = os.path.join(fetchdir, bitbakeitem.get_fetch_dir())
+if getattr(settings, 'BITBAKE_PATH', ''):
+ bitbakepath = os.path.join(bitbakepath, settings.BITBAKE_PATH)
+
sys.path.insert(0, os.path.join(bitbakepath, 'lib'))
@@ -31,11 +31,16 @@ import settings
logger = get_logger("HistoryUpgrade", settings)
fetchdir = settings.LAYER_FETCH_DIR
-bitbakepath = os.path.join(fetchdir, 'bitbake')
if not fetchdir:
logger.error("Please set LAYER_FETCH_DIR in settings.py")
sys.exit(1)
+from layerindex.models import LayerItem
+bitbakeitem = LayerItem()
+bitbakeitem.vcs_url = settings.BITBAKE_REPO_URL
+bitbakepath = os.path.join(fetchdir, bitbakeitem.get_fetch_dir())
+if getattr(settings, 'BITBAKE_PATH', ''):
+ bitbakepath = os.path.join(bitbakepath, settings.BITBAKE_PATH)
def run_internal(maintplanlayerbranch, commit, commitdate, options, logger, bitbake_map, initial=False):
from layerindex.models import PythonEnvironment
@@ -33,7 +33,13 @@ if not fetchdir:
sys.exit(1)
# setup bitbake path
-bitbakepath = os.path.join(fetchdir, 'bitbake')
+from layerindex.models import LayerItem
+bitbakeitem = LayerItem()
+bitbakeitem.vcs_url = settings.BITBAKE_REPO_URL
+bitbakepath = os.path.join(fetchdir, bitbakeitem.get_fetch_dir())
+if getattr(settings, 'BITBAKE_PATH', ''):
+ bitbakepath = os.path.join(bitbakepath, settings.BITBAKE_PATH)
+
sys.path.insert(0, os.path.join(bitbakepath, 'lib'))
from layerindex.models import Recipe, LayerBranch
@@ -448,7 +448,13 @@ def generate_history(options, layerbranch_id, commit, logger):
return
# setup bitbake
- bitbakepath = os.path.join(fetchdir, 'bitbake')
+ from layerindex.models import LayerItem
+ bitbakeitem = LayerItem()
+ bitbakeitem.vcs_url = settings.BITBAKE_REPO_URL
+ bitbakepath = os.path.join(fetchdir, bitbakeitem.get_fetch_dir())
+ if getattr(settings, 'BITBAKE_PATH', ''):
+ bitbakepath = os.path.join(bitbakepath, settings.BITBAKE_PATH)
+
if options.bitbake_rev:
bitbake_rev = options.bitbake_rev
if not re.match('^[0-9a-f]{40}$', bitbake_rev):
Since commit[1], the bitbake default path no longer uses the path 'bitbake', but instead uses the same URL processing as the layer fetching. [1] https://git.yoctoproject.org/layerindex-web/commit/?id=c91372587bbddd4c595d7202e51a8740b787a06e Signed-off-by: Yi Zhao <yi.zhao@windriver.com> --- rrs/tools/rrs_distros.py | 8 +++++++- rrs/tools/rrs_upgrade_history.py | 7 ++++++- rrs/tools/rrs_upstream_history.py | 8 +++++++- rrs/tools/upgrade_history_internal.py | 8 +++++++- 4 files changed, 27 insertions(+), 4 deletions(-)