diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2013-05-09 17:26:17 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-05-10 11:37:16 +0100 |
commit | 15aec44b2d3760152faf373dd6a3fd542996d37c (patch) | |
tree | a77eaa160ef4e9d914b83b36fcf663437f6dd093 /meta/classes | |
parent | e42f0acf46897515ae14c3b3c12632ccb2a378f2 (diff) | |
download | poky-15aec44b2d3760152faf373dd6a3fd542996d37c.tar.gz |
classes/insane: add check for PN in OVERRIDES
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].
(From OE-Core rev: c331f0a5cac765174a1b5de5c12aec7e965d4158)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/insane.bbclass | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass index 4d2392e908..fb1802223a 100644 --- a/meta/classes/insane.bbclass +++ b/meta/classes/insane.bbclass | |||
@@ -907,6 +907,11 @@ python () { | |||
907 | if d.getVar('do_stage', True) is not None: | 907 | if d.getVar('do_stage', True) is not None: |
908 | 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)) | 908 | 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)) |
909 | 909 | ||
910 | overrides = d.getVar('OVERRIDES', True).split(':') | ||
911 | pn = d.getVar('PN', True) | ||
912 | if pn in overrides: | ||
913 | bb.warn('Recipe %s has PN of "%s" which is in OVERRIDES, this can result in unexpected behaviour.' % (d.getVar("FILE", True), pn)) | ||
914 | |||
910 | issues = [] | 915 | issues = [] |
911 | if (d.getVar('PACKAGES', True) or "").split(): | 916 | if (d.getVar('PACKAGES', True) or "").split(): |
912 | for var in 'RDEPENDS', 'RRECOMMENDS', 'RSUGGESTS', 'RCONFLICTS', 'RPROVIDES', 'RREPLACES', 'FILES', 'pkg_preinst', 'pkg_postinst', 'pkg_prerm', 'pkg_postrm', 'ALLOW_EMPTY': | 917 | for var in 'RDEPENDS', 'RRECOMMENDS', 'RSUGGESTS', 'RCONFLICTS', 'RPROVIDES', 'RREPLACES', 'FILES', 'pkg_preinst', 'pkg_postinst', 'pkg_prerm', 'pkg_postrm', 'ALLOW_EMPTY': |