From c26604146a74149487a1a2dfc40d40d53aa68bdf Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Wed, 26 Sep 2018 17:17:59 +1200 Subject: [PATCH] recipeparse: fix bitbake-cookerdaemon.log being written out to meta/ Our setup when parsing recipes is a little unusual in that we have no bblayers.conf, thus findTopdir() which is used to find where to put bitbake.lock (and bitbake-cookerdaemon.log as of the recent bitbake commit 1620dbc48ffb2a882371cf9174a7b12648befc8a) defaults to the parent's parent of where bitbake.conf can be found, which is the meta/ subdirectory of the OE-Core repo, thus that's where we now find bitbake-cookerdaemon.log gets written out. We really don't want to be writing anything into the metadata repositories so create a fake conf/bblayers.conf in our temp directory to make findTipdir() pick that instead. Signed-off-by: Paul Eggleton --- TODO | 2 -- layerindex/recipeparse.py | 5 +++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/TODO b/TODO index fcf8943..f8201b9 100644 --- a/TODO +++ b/TODO @@ -1,8 +1,6 @@ TODO: Bugs -* Directory where bitbake-cookerdaemon.log is placed isn't right (meta dir) -* bitbake-cookerdaemon.log should be cleared out every time * Duplication of first maintainer when editing to add a second? * Remote patches in SRC_URI trigger errors * We're wasting time gathering layer info at the start for layers that have not changed diff --git a/layerindex/recipeparse.py b/layerindex/recipeparse.py index bc8a19e..e7b4878 100644 --- a/layerindex/recipeparse.py +++ b/layerindex/recipeparse.py @@ -70,6 +70,11 @@ def init_parser(settings, branch, bitbakepath, enable_tracking=False, nocheckout tempdir = tempfile.mkdtemp(dir=settings.TEMP_BASE_DIR) saved_cwd = os.getcwd() os.chdir(tempdir) + # We need to create a dummy bblayers.conf to avoid bitbake-cookerdaemon.log being created in /meta/ + # (see findTopdir() in bitbake/lib/bb/cookerdata.py) + os.mkdir(os.path.join(tempdir, 'conf')) + with open(os.path.join(tempdir, 'conf', 'bblayers.conf'), 'w') as f: + pass if logger: tinfoil = utils.setup_tinfoil(bitbakepath, enable_tracking, loglevel=logger.getEffectiveLevel())