From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga03.intel.com ([143.182.124.21]) by linuxtogo.org with esmtp (Exim 4.72) (envelope-from ) id 1UaTxL-00057K-H0 for openembedded-core@lists.openembedded.org; Thu, 09 May 2013 18:44:42 +0200 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by azsmga101.ch.intel.com with ESMTP; 09 May 2013 09:26:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.87,641,1363158000"; d="scan'208";a="331475656" Received: from unknown (HELO helios.amr.corp.intel.com) ([10.255.12.169]) by fmsmga001.fm.intel.com with ESMTP; 09 May 2013 09:26:19 -0700 From: Paul Eggleton To: openembedded-core@lists.openembedded.org Date: Thu, 9 May 2013 17:26:17 +0100 Message-Id: <1368116777-23778-1-git-send-email-paul.eggleton@linux.intel.com> X-Mailer: git-send-email 1.8.1.2 Subject: [PATCH] classes/insane: add check for PN in OVERRIDES X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 May 2013 16:44:53 -0000 If a recipe is named such that its PN value matches something already in OVERRIDES (such as when PN happens to be the same as MACHINE or DISTRO), it can have unexpected consequences. Assignments such as FILES_${PN} = "xyz" effectively turn into FILES = "xyz". Implements [YOCTO #4288]. Signed-off-by: Paul Eggleton --- meta/classes/insane.bbclass | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass index 809aa45..c19af84 100644 --- a/meta/classes/insane.bbclass +++ b/meta/classes/insane.bbclass @@ -904,6 +904,11 @@ python () { if d.getVar('do_stage', True) is not None: bb.fatal("Legacy staging found for %s as it has a do_stage function. This will need conversion to a do_install or often simply removal to work with OE-core" % d.getVar("FILE", True)) + overrides = d.getVar('OVERRIDES', True).split(':') + pn = d.getVar('PN', True) + if pn in overrides: + bb.warn('Recipe %s has PN of "%s" which is in OVERRIDES, this can result in unexpected behaviour.' % (d.getVar("FILE", True), pn)) + issues = [] if (d.getVar('PACKAGES', True) or "").split(): for var in 'RDEPENDS', 'RRECOMMENDS', 'RSUGGESTS', 'RCONFLICTS', 'RPROVIDES', 'RREPLACES', 'FILES', 'pkg_preinst', 'pkg_postinst', 'pkg_prerm', 'pkg_postrm', 'ALLOW_EMPTY': -- 1.8.1.2