Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 8BE81E00DC4; Tue, 11 Oct 2016 13:50:30 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00,HEXHASH_WORD, RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM autolearn=no version=3.3.1 X-Spam-HAM-Report: * -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no * trust * [209.85.213.66 listed in list.dnswl.org] * 0.5 RCVD_IN_SORBS_SPAM RBL: SORBS: sender is a spam source * [209.85.213.66 listed in dnsbl.sorbs.net] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 HEXHASH_WORD Multiple instances of word + hexadecimal hash Received: from mail-vk0-f66.google.com (mail-vk0-f66.google.com [209.85.213.66]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id DD064E00A61 for ; Tue, 11 Oct 2016 13:50:29 -0700 (PDT) Received: by mail-vk0-f66.google.com with SMTP id 2so1418205vkb.1 for ; Tue, 11 Oct 2016 13:50:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization; bh=6jn+/NlNsPaW/U0LRlAwSmm6mfrumw/4Ql8lu8X/Qx0=; b=M7eolZ9stcqDU6/qxkZYyGt2PzM+eYlTPi5dh8w8NUkQtzi2DonprMJkg0A+BcLkkc 2qb63WdOS32+YRKaQN8mrg6C/OGR9ECIbj44eB8sPAxAAeAptBa5yWN1o6ZctQgPU+u5 NhIhO4iO5Q42eIHqvzyrI0CVgahZnJuoEWrExsNwCO83bvFMdyaIvpcNGailJofsMjEC 6pH/u2OqhOIzyc+7ykAPZX19LDSVfLa5L8V1fj4MCNDJFEqtjr5TrKL86GLDNkYfToV+ HA4Xd+HZu05BSzVAWaAJ1JsxYDkmq64pfnfM7jiquZNBiQ+4SFk2c93qNQbdbZpMUly8 7U9w== X-Gm-Message-State: AA6/9RleS/r9SFsOx+jougAEnVvqSSo7LmAuBPuJbgp892b12hL2wwk+fj0Z58pDDZ+UlQ== X-Received: by 10.31.171.75 with SMTP id u72mr3957572vke.22.1476219028882; Tue, 11 Oct 2016 13:50:28 -0700 (PDT) Received: from localhost ([187.23.155.148]) by smtp.gmail.com with ESMTPSA id y72sm2210178vky.9.2016.10.11.13.50.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Oct 2016 13:50:28 -0700 (PDT) Received: by localhost (sSMTP sendmail emulation); Tue, 11 Oct 2016 17:50:21 -0300 From: Otavio Salvador To: meta-freescale Mailing List Date: Tue, 11 Oct 2016 17:50:19 -0300 Message-Id: <20161011205019.9443-1-otavio@ossystems.com.br> X-Mailer: git-send-email 2.10.0 Organization: O.S. Systems Software LTDA. Cc: "Signed-off-by : Jun Zhu" , Otavio Salvador Subject: [PATCH] linux-mfgtool.inc: Fix Taskhash mismatch due kernel version re-evaluation X-BeenThere: meta-freescale@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Usage and development list for the meta-fsl-* layers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Oct 2016 20:50:30 -0000 KERNEL_VERSION is extracted from source code. It is evaluated as None for the first parsing, since the code has not been fetched. After the code is fetched, it will be evaluated as real version number and cause kernel to be rebuilt. To avoid this, make KERNEL_VERSION_NAME and KERNEL_VERSION_PKG_NAME depend on LINUX_VERSION which is a constant. Fixes following error: ,---- | ERROR: Bitbake's cached basehash does not match the one we just | generated (.../linux-imx-mfgtool_4.1.15.bb.do_package)! | ERROR: The mismatched hashes were 9ee4645e51989f32cb456a6a920b08c5 and 6b5111eabd2b77ab1266a02f71200f86 | ERROR: Taskhash mismatch b64a99840810703ae6c0cf2b53de3ff6 versus b3587f37767f2d28aa2f3fd1f4548e85 | for .../linux-imx-mfgtool_4.1.15.bb.do_package `---- Reported-by: Signed-off-by: Jun Zhu Signed-off-by: Otavio Salvador --- recipes-kernel/linux/linux-mfgtool.inc | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/recipes-kernel/linux/linux-mfgtool.inc b/recipes-kernel/linux/linux-mfgtool.inc index 8701aff..945096a 100644 --- a/recipes-kernel/linux/linux-mfgtool.inc +++ b/recipes-kernel/linux/linux-mfgtool.inc @@ -6,7 +6,7 @@ # This file must be included after the original linux-imx.inc file # as it overrides the needed values. # -# Copyright (C) 2014, 2015 O.S. Systems Software LTDA. +# Copyright (C) 2014-2016 O.S. Systems Software LTDA. # Adjust provides PROVIDES = "linux-mfgtool" @@ -18,10 +18,22 @@ KERNEL_IMAGE_BASE_NAME = "${KERNEL_IMAGETYPE}-mfgtool-${PKGE}-${PKGV}-${PKGR}-${ KERNEL_IMAGE_BASE_NAME[vardepsexclude] = "DATETIME" KERNEL_IMAGE_SYMLINK_NAME = "${KERNEL_IMAGETYPE}-mfgtool-${MACHINE}" MODULE_IMAGE_BASE_NAME = "modules-mfgtool-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}" +MODULE_IMAGE_BASE_NAME[vardepsexclude] = "DATETIME" MODULE_TARBALL_SYMLINK_NAME = "modules-mfgtool-${MACHINE}.tgz" STAGING_KERNEL_DIR = "${TMPDIR}/work-shared/${MACHINE}/kernel-mfgtool-source" STAGING_KERNEL_BUILDDIR = "${TMPDIR}/work-shared/${MACHINE}/kernel-mfgtool-build-artifacts" +# KERNEL_VERSION is extracted from source code. It is evaluated as +# None for the first parsing, since the code has not been fetched. +# After the code is fetched, it will be evaluated as real version +# number and cause kernel to be rebuilt. To avoid this, make +# KERNEL_VERSION_NAME and KERNEL_VERSION_PKG_NAME depend on +# LINUX_VERSION which is a constant. +KERNEL_VERSION_NAME = "${@d.getVar('KERNEL_VERSION', True) or ""}" +KERNEL_VERSION_NAME[vardepvalue] = "${LINUX_VERSION}" +KERNEL_VERSION_PKG_NAME = "${@legitimize_package_name(d.getVar('KERNEL_VERSION', True))}" +KERNEL_VERSION_PKG_NAME[vardepvalue] = "${LINUX_VERSION}" + # Ensures we prefer our mfgtool specific files FILESEXTRAPATHS_prepend := "${THISDIR}/${ORIG_PN}-${PV}:${THISDIR}/${ORIG_PN}:" @@ -62,6 +74,7 @@ python () { clsextend.rename_package_variables((d.getVar("PACKAGEVARS", True) or "").split()) clsextend.map_packagevars() + clsextend.map_variable("PROVIDES") clsextend.map_regexp_variable("PACKAGES_DYNAMIC") } -- 2.10.0