From fed0ed82928e6a7846fbad233ac657bd17bcefc7 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Fri, 5 May 2017 12:25:25 +0200 Subject: archiver.bbclass: do not cause kernel rebuilds Adding or removing archiver.bbclass from a build configuration causes rebuilds of linux-yocto-based kernels because of the do_kernel_configme->do_unpack_and_patch task dependency. This particular dependency can be ignored for the do_kernel_configme sstate signature calculcation. Idea for the fix from Richard Purdie. Note that building the kernel and adding archiver.bbclass later to archive sources leads to do_unpack_and_patch running after do_kernel_configme (because that already ran in the first build), which might be problematic. This is independent of the change here. The use case in YOCTO #11441 is to removed archiver.bbclass between a production build with archiving enabled and builds via oe-selftests without archiving. That direction is fine. Fixes: YOCTO #11441 Signed-off-by: Patrick Ohly Signed-off-by: Ross Burton --- meta/classes/archiver.bbclass | 5 ++++- meta/lib/oe/sstatesig.py | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'meta') diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass index ea00ab33da..647d2cf2d7 100644 --- a/meta/classes/archiver.bbclass +++ b/meta/classes/archiver.bbclass @@ -442,7 +442,10 @@ do_deploy_all_archives() { } python () { - # Add tasks in the correct order, specifically for linux-yocto to avoid race condition + # Add tasks in the correct order, specifically for linux-yocto to avoid race condition. + # sstatesig.py:sstate_rundepfilter has special support that excludes this dependency + # so that do_kernel_configme does not need to run again when do_unpack_and_patch + # gets added or removed (by adding or removing archiver.bbclass). if bb.data.inherits_class('kernel-yocto', d): bb.build.addtask('do_kernel_configme', 'do_configure', 'do_unpack_and_patch', d) } diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py index f087a019e1..b8dd4c869e 100644 --- a/meta/lib/oe/sstatesig.py +++ b/meta/lib/oe/sstatesig.py @@ -20,8 +20,12 @@ def sstate_rundepfilter(siggen, fn, recipename, task, dep, depname, dataCache): def isImage(fn): return "/image.bbclass" in " ".join(dataCache.inherits[fn]) - # Always include our own inter-task dependencies + # (Almost) always include our own inter-task dependencies. + # The exception is the special do_kernel_configme->do_unpack_and_patch + # dependency from archiver.bbclass. if recipename == depname: + if task == "do_kernel_configme" and dep.endswith(".do_unpack_and_patch"): + return False return True # Quilt (patch application) changing isn't likely to affect anything -- cgit 1.2.3-korg s='sub right'>Grokmirror user
summaryrefslogtreecommitdiffstats
blob: f8b38849431e29739ad58a3a4f869a6acacf8474 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
zlib License


  This software is provided `as-is`, without any express or implied
  warranty.  In no event will the authors be held liable for any damages
  arising from the use of this software.

  Permission is granted to anyone to use this software for any purpose,
  including commercial applications, and to alter it and redistribute it
  freely, subject to the following restrictions:

  1. The origin of this software must not be misrepresented; you must not
     claim that you wrote the original software. If you use this software
     in a product, an acknowledgment in the product documentation would be
     appreciated but is not required.
  2. Altered source versions must be plainly marked as such, and must not be
     misrepresented as being the original software.
  3. This notice may not be removed or altered from any source distribution.