All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Anuj Mittal" <anuj.mittal@intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [hardknott][PATCH 03/10] yocto-check-layer: Avoid bug when iterating and autoadding dependencies
Date: Thu, 29 Apr 2021 12:41:00 +0800	[thread overview]
Message-ID: <280596107b2744de63e6f34007324e5e2c857758.1619667368.git.anuj.mittal@intel.com> (raw)
In-Reply-To: <cover.1619667368.git.anuj.mittal@intel.com>

From: Richard Purdie <richard.purdie@linuxfoundation.org>

If iterating a layer with multiple components and auto-adding dependencies
the tests can break since layers are never removed and order isn't guaranteed
to account for that.

Fix this by resetting the layer list back to the original list each time
before auto-adding the dependencies in each case.

This fixes scanning of meta-openembedded in particular where the sublayers
may not be added in order of minimal dependency.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit bf1b467dacf345379cd5d84a1c9b3b0d844d5c91)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
---
 scripts/yocto-check-layer | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/scripts/yocto-check-layer b/scripts/yocto-check-layer
index b7c83c8b54..deba3cb4f8 100755
--- a/scripts/yocto-check-layer
+++ b/scripts/yocto-check-layer
@@ -138,6 +138,9 @@ def main():
                 layer['type'] == LayerType.ERROR_BSP_DISTRO:
             continue
 
+        # Reset to a clean backup copy for each run
+        shutil.copyfile(bblayersconf + '.backup', bblayersconf)
+
         if check_bblayers(bblayersconf, layer['path'], logger):
             logger.info("%s already in %s. To capture initial signatures, layer under test should not present "
                "in BBLAYERS. Please remove %s from BBLAYERS." % (layer['name'], bblayersconf, layer['name']))
-- 
2.30.2


  parent reply	other threads:[~2021-04-29  4:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-29  4:40 [hardknott][PATCH 00/10] review request Anuj Mittal
2021-04-29  4:40 ` [hardknott][PATCH 01/10] glib-2.0: fix CVE-2021-28153 Anuj Mittal
2021-04-29  4:40 ` [hardknott][PATCH 02/10] libssh2: fix build failure with option no-ecdsa Anuj Mittal
2021-04-29  4:41 ` Anuj Mittal [this message]
2021-04-29  4:41 ` [hardknott][PATCH 04/10] kernel-yocto.bbclass: chdir to ${WORKDIR} for do_kernel_checkout Anuj Mittal
2021-04-29  4:41 ` [hardknott][PATCH 05/10] cmake.bbclass: remove ${B} before cmake_do_configure Anuj Mittal
2021-04-29  4:41 ` [hardknott][PATCH 06/10] oeqa: tear down oeqa decorators if one of them raises an exception in setup Anuj Mittal
2021-04-29  4:41 ` [hardknott][PATCH 07/10] meta/lib/oeqa/core/tests/cases/timeout.py: add a testcase for the previous fix Anuj Mittal
2021-04-29  4:41 ` [hardknott][PATCH 08/10] weston: fix build failure due to race condition Anuj Mittal
2021-04-29  4:41 ` [hardknott][PATCH 09/10] patchelf: Backport fix from upstream for note section overlap error Anuj Mittal
2021-04-29  4:41 ` [hardknott][PATCH 10/10] rsync: fix CVE-2020-14387 Anuj Mittal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=280596107b2744de63e6f34007324e5e2c857758.1619667368.git.anuj.mittal@intel.com \
    --to=anuj.mittal@intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.