summaryrefslogtreecommitdiffstats
path: root/meta/classes/insane.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* insane: consider INSANE_SKIP without package-specifier tooRoss Burton2018-03-041-1/+2
| | | | | | | | | | | | | | | | | | | this is needed for the updated linux-firmware as it needs this INSANE_SKIP support (From OE-Core rev: 618093c6b7c919f25094f56b82610bee7c97f99f) (From OE-Core rev: 4c1de18cb5d2bf4067246bf7242abde0f0917a3a) Signed-off-by: Ross Burton <ross.burton@intel.com> (cherry picked from commit 604939186cc08ab0429ebe00f3e32661847f0cf0) Adjusted for pyro context Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Adjusted for morty contect Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: fix override handling in RDEPENDS QAGan Yau Wai2017-08-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | The package_qa_check_rdepends() in insane.bbclass has incorrectly replace its localdata OVERRIDES value with the package name. Fixing it by appending the package name to the existing OVERRIDES value. This resolves RDEPENDS QA error when setting PACKAGECONFIG using a pn- override at local.conf. Cherry picked from master 60d28dd72daee235150ab6605cbf953f1ea691df and modified to work with older bitbake where 2nd parameter in localdata.getVar was mandatory. [YOCTO #11374] (From OE-Core rev: 15fabf4d6507d2a3f9b98ad56e822eba35950662) Signed-off-by: Gan Yau Wai <yau.wai.gan@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: remove broken unsafe-references-in-binaries testRoss Burton2017-05-251-41/+0
| | | | | | | | | | | | | | | | | | | | | This test aims to detect binaries in /bin which link to libraries in /usr/lib, for the case where the user has /usr on a separate filesystem to /. However it doesn't scan both image/ and the sysroot, so if a binary in /bin links to a library in /usr/lib that was built by the same recipe then it will error out. This test isn't enabled by default, and because of this serious bug I suspect nobody else is enabling it either. As /usr being on a separate partition to / is a very rare configuration these days I think we should delete the test: if someone cares sufficiently they should write a test that actually works. (From OE-Core rev: a6af5bbf3dad6f0951c67a0aae13ef86a8906893) (From OE-Core rev: 2f5b5685f75fc63489b628b540fcdd4c7cb27096) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: rewrite the expanded-d test as a QAPKGTESTRoss Burton2017-01-111-19/+13
| | | | | | | | | | | | | | | | | Instead of being executed for every file in every package, this is now just called for each package. It is also now correctly called for packages which don't have any content but do have postinst scripts. [ YOCTO #10711 ] (From OE-Core rev: afda72b2424528eaff9054327530bdf5654bec66) (From OE-Core rev: b653bfb800a470894ec93c8bb4acd12a143716a6) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: add QAPKGTEST, a package-wide equivilant to QAPATHTESTRoss Burton2017-01-111-0/+20
| | | | | | | | | | | | | | | | QAPATHTEST defines a function that is executed for every file in every package. For tests which just need to look at the datastore this is massive overkill. Add QAPKGTEST, which is invoked for each package in the recipe. (From OE-Core rev: acc3cc26099c77e4eeb44c75bc7167ab58ef1147) (From OE-Core rev: e7751fa0bdb5bc9b217a0bf267a9c658bec997fa) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: factor out the test matrix processingRoss Burton2017-01-111-21/+25
| | | | | | | | | | | | | Pull the test matrix processing out as a function so it can be reused. (From OE-Core rev: 3caccd3f6079b7e284d32e1eb0217107425e7bf8) (From OE-Core rev: 3b21c285d4ff08ae6f613700c5936e39e7e3051d) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: fix expanded-d testRoss Burton2017-01-111-2/+1
| | | | | | | | | | | | | | | This test should be looking for the expanded value of ${D} in the expanded value of pkg_postinst and so on, but one of the getVar() calls was passing expand=False so the test would never be true. (From OE-Core rev: cc545044cba51317bee32e3bf674723e422e3a8a) (From OE-Core rev: 9d4f094a7c9cbff0d3db5f339d084b2b7c70df86) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Add aarch64 baremetal mappings to the QA arch testAlexandre Belloni2017-01-111-0/+2
| | | | | | | | | | | | | | | Add mappings for aarch64-elf and aarch64_be-elf to binary lookup table which allows for the generation of baremetal toolchains. (From OE-Core rev: e90a1c4b8fd7baa738eb4683e5eac60905e04296) (From OE-Core rev: 9a8a4fe56901f88f143e86652edc7039345d49fc) Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass:buildpaths: open() file with 'rb'Robert Yang2016-11-161-2/+2
| | | | | | | | | | | | | | | | | | | open() is default to 'rt' which may cause decoding errors when open binary file: $ bitbake xcursor-transparent-theme [snip] Exception: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xfd in position 18: invalid start byte [snip] (From OE-Core rev: ddbab61f47efd9b4fde38ef8f0f3482c78abe37c) (From OE-Core rev: 8364558a2904d21c9b31d29bfb8f2d9cbeac8659) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: fix package_qa_check_arch() for mips64-o32Robert Yang2016-10-151-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed: MACHINE = "qemumips64" DEFAULTTUNE = "mips64-o32" $ bitbake linux-yocto ERROR: linux-yocto-4.8+gitAUTOINC+03bf3dd731_674818dad5-r0 do_package_qa: QA Issue: Bit size did not match (32 to 64) linux-yocto on /work/qemumips64-poky-linux/linux-yocto/4.8+gitAUTOINC+03bf3dd731_674818dad5-r0/packages-split/kernel-module-parport/lib/modules/4.8.0-yocto-standard/kernel/drivers/parport/parport.ko [arch] The mips64-n32 works since it would set ABIEXTENSION to "n32" so that TARGET_OS is linux-gnun32, and it will skip the check, but "mips64-o32" doesn't set ABIEXTENSION to "o32", "n32" or "32", so the error happend. Skip the check if mips64.*32 matches DEFAULTTUNE can fix the problem. Another way to fix the problem is define ABIEXTENSION to "o32" or "32" for mips64-o32, but that may make things confused since "o32" is purely 32 bit. [YOCTO #10305] (From OE-Core rev: 4e61d8d6f4619dbfaeb5ca642449de7cf4b3e92d) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: Additional "mips" and "mipsel" machine definitionsJuro Bystricky2016-10-151-0/+2
| | | | | | | | | | | | | | Add "mips" and "mipsel" to "machdata" table. Although there is a way to add entries to the "machdata" table from a BSP without modifying the insane.bbclass directly, MIPS is already supported in poky and as such the relevant entries should be present in insane.bbclass. (From OE-Core rev: 3ba03d1affa6f647e9a03c8ba4389606a0da8e8b) Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: display names instead of ELF machine numbersRoss Burton2016-10-111-2/+2
| | | | | | | | | | | The 'arch' QA test currently simply outputs the ELF machine field as a number which isn't helpful. Display this as a human-readable name to make it clearer to the user what the problem is. (From OE-Core rev: 607a2a1de4b77818c3e801a4de7ff0888229e036) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: Add mipsisa{32, 64}r6{el, }Zubair Lutfullah Kakakhel2016-10-071-0/+4
| | | | | | | | | Add support for MIPS release 6 of the ISA (From OE-Core rev: 6613ee0155de1e0afd30cd8d8290eda3f7486337) Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity: make license QA failures fatal againRoss Burton2016-09-161-6/+8
| | | | | | | | | | | | | | | | Previous work to clean up the license QA code (oe-core fbdf977) had the side effect that failing the license sanity check (bad or missing LIC_FILES_CHKSUM) would emit an error message but wouldn't actually abort the build. Solve this by changing populate_lic_qa_checksum() so that it tracks if the message class was in ERROR_QA and if so, aborts the function. [ YOCTO #10280 ] (From OE-Core rev: 5ba1a7505b904a4aa2118fa9614d76df97597af8) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: improve package_qa_clean_pathRoss Burton2016-08-231-3/+8
| | | | | | | | | | | | | Instead of just removing TMPDIR from the path for display, optionally allow a package to be passed and remove PKGDEST/package too. This means that messages that specify a package name can pass that name and the resulting path will be absolute inside that package. (From OE-Core rev: 55061a43926baf6ff0e17aed02efd299ebba3c24) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: only check ${S} exists if we had sources to fetchRoss Burton2016-07-261-3/+2
| | | | | | | | | | | | | | Only check that ${S} actually exists if there was something in ${SRC_URI} to fetch, the argument being that if SRC_URI is empty the the recipe won't be using ${S} at all. In general recipes that have no sources can remove the unpack task, but expecting all recipes to do this relatively advanced operation isn't realistic. (From OE-Core rev: 8cba511ab6ea557fab9f7838dfe1fc8284bbdd68) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Add mechanism to extend QA machine information from BSP layerRichard Purdie2016-07-261-3/+13
| | | | | | | | | | | | | | | | | | | | | | In order to add a new architecture or sub-architecture to OE, you currently need to tweak the table in insane.bbclass. This adds a mechanism so this can be done from a BSP layer. It needs a function definition which needs a class file but can then be done with something like: def my_testfunc(machdata, d): machdata["testmachine"] = { "test64": ( 8, 0, 0, False, 32), "testel": ( 8, 0, 0, True, 32), } return machdata PACKAGEQA_EXTRA_MACHDEFFUNCS = "my_testfunc" [YOCTO #8554] (From OE-Core rev: c57550c9cca598315ba4408e44b138cecc22b8a0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/lib: Update to use python3 command pipeline decodingRichard Purdie2016-06-021-4/+4
| | | | | | | | | | | In python3, strings are unicode by default. We need to encode/decode from command pipelines and other places where we interface with the real world using the correct locales. This patch updates various call sites to use the correct encoding/decodings. (From OE-Core rev: bb4685af1bffe17b3aa92a6d21398f38a44ea874) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: return line-feeds to qa.logMartin Jansa2016-06-011-1/+1
| | | | | | | (From OE-Core rev: f97c40fd6cf0a722c5355623e0392755cb0a0107) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/scripts: python3: rename file -> openRichard Purdie2016-05-211-3/+2
| | | | | | | | | | | | file() API doesn't exist in python 3, convert to open(). Also handle some cases where files aren't closed. Compatible with python 2.7. [Contributions from Ed and Richard] (From OE-Core rev: 0f4ec13e11bb8abe21aba2a28547dfb9372bc377) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/insane: do not force LIC_FILES_CHKSUM unless SRC_URI is setPaul Eggleton2016-05-111-3/+3
| | | | | | | | | | | | | | | Recipes such as images and packagegroups don't actually fetch or build any source, so there's really no point having LIC_FILES_CHKSUM set. Forcing users to set it (as we have done for images inheriting image.bbclass) just makes things more difficult for the user for no discernable benefit. The easiest way to adjust this check is simply to skip it if SRC_URI is not set since this is a pretty good indicator that no source is being pulled in. (From OE-Core rev: c269547ae8e90a78349f6003385137e4145e145f) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: package_qa_check_license -> populate_lic_qa_checksumRobert Yang2016-05-061-9/+6
| | | | | | | | | | | | | The package_qa_check_license() was in do_qa_configure which had a potential problem, when the recipe sets do_configure[noexec] = "1", then the license checking won't run, which may hidden license issues. Rename it to populate_lic_qa_checksum() and run in do_populate_lic[postfuncs] which is more reasonable (when no populate license, no license checking). (From OE-Core rev: b7811bbec1ba373d62ace5c4fc56918e53c69d50) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: remove workdir from package_qa_check_license()Robert Yang2016-05-061-2/+2
| | | | | | | | | The parameter workdir is not used in package_qa_check_license() (From OE-Core rev: 9da177c149c657dc337a1f0d241175f1496fa07d) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: avoid false positives on library locationBill Randle2016-04-031-2/+17
| | | | | | | | | | | | | | package_qa_check_libdir() reports that the file libsoletta.so.0.0.1-gdb.py in /usr/share/gdb/auto-load is in the wrong location. Before generating a warning for files in non-standard locations, check that the file is an actual elf file (and hence a real library file). [YOCTO #9215] (From OE-Core rev: a3ad36b9a435e7c3d97f114809561198b8abe6cf) Signed-off-by: Bill Randle <william.c.randle@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane/prelink: Handle nonstandard library pathsRichard Purdie2016-03-071-0/+5
| | | | | | | | | | | | | | | | | | | | | | Prelink contains some hardcoded assumptions about the path layout of the target system. Unfortunately if the system doesn't match, prelink doesn't work. This breaks: a) prelink of those images b) the unsafe-references-in-binaries QA test (which uses prelink-rtld) One way to work around this is to construct an ld.so.conf file which lists the library paths in question. We do this in sanity QA check and in the rootfs prelink code, being careful not to trample any existing target ld.so.conf. There is an additional problem that $LIB references in RPATHs won't be handled correctly, I've not see any system use these in reality though so this change at least improves things. (From OE-Core rev: 7fd1d7e639c2ed7e0699937a5cb245c187b7c811) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: make the checking stricter for unsafe references in scriptsChen Qi2016-03-071-1/+1
| | | | | | | | | | | | | | | | | | | | Previously, the checking for unsafe references is not strict enough. It only checks whether '/usr/' is in the script. As a result, any script containing statements like below will match this check. PATH="/bin:/sbin:/usr/bin:/usr/sbin" However, as we can see, this is actually not an unsafe reference. What we really want to check is something like '/usr/bin/tail', so we should make the checking stricter. This patch solves the QA warning in gzip and nfs-utils. (From OE-Core rev: f818f7359c1a5db2c5c041c42eecb9f0434d9800) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/qa: add explicit exception for 'file isn't an ELF'Ross Burton2016-02-281-2/+1
| | | | | | | (From OE-Core rev: 4c1fe0cbcb98b0a69ad5b3a04432055d773ee4ba) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: print more info for build-deps and file-rdepsRobert Yang2016-02-191-3/+6
| | | | | | | | | | | | | | | | | | | | | This is useful for oe newbie: * build-deps: print recipe name, and suggest fixing from DEPENDS or PACKAGECONFIG, for example: WARNING: QA Issue: patch rdepends on libattr, but it isn't a build dependency, missing attr in DEPENDS or PACKAGECONFIG? [build-deps] * file-rdeps: print RDEPENDS_pkg rather than RDEPENDS, for example: WARNING: QA Issue: /sbin/osd_login contained in package nfs-utils requires /bin/bash, but no providers found in RDEPENDS_nfs-utils? [file-rdeps] Fix a bug in file-rdeps, there was "@underscore@" in file-rdeps: WARNING: QA Issue: /sbin/osd@underscore@login_nfs-utils contained in [snip] [YOCTO #8922] [YOCTO #8847] (From OE-Core rev: f8754281451bbb64c3d26bbdbf1e596271534469) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: wrap autotools checks in inherits_class(autotools) checksRoss Burton2016-02-181-11/+13
| | | | | | | | | | | | There's no point doing the autotools sanity checks if a recipe didn't inherit autotools, so check the inherits before doing the checks. Also pass -F (fixed strings) and -q (quiet) to grep. (From OE-Core rev: 75ae572427d9cd3f0b3e9e7d4d0e7a93a4f04690) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/qa.py: raise ValueError if file isn't an ELFRoss Burton2016-02-161-1/+3
| | | | | | | | | | | | | Instead of raising a generic Exception that can't be handled specifically, raise a ValueError. Also update the callers so any unexpected exceptions are not ignored. Also, rename isBigEngian() to isBigEndian(). (From OE-Core rev: c136652f9c0b35aafa393e63567daf029ae03929) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Add --disable-static to UNKNOWN_CONFIGURE_WHITELISTRichard Purdie2016-02-151-1/+1
| | | | | | | | | | | With the addition of a common class passing in this option, add it to the list of standard "unknown" configure options which are known about. Its not interesting/productive to go and update every recipe to handle this flag. (From OE-Core rev: f879f452dc69989aa227b8dc60b7cb0354203575) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: Support MicroBlaze with muslNathan Rossi2016-02-111-0/+3
| | | | | | | | | | MicroBlaze is supported by musl, add entries for the 3 variants. (From OE-Core rev: 1c4a5dbcc738434bbd31f41c99e8acc72655839e) Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Fix populate_sysroot sanity test pathRichard Purdie2016-02-041-1/+1
| | | | | | | | | | This was correct for native/cross paths but not for target ones which meant the tests weren't running in some cases. Fix the path to be correct in both cases. (From OE-Core rev: 3739aaf644d5a0f28e85fd07c67cecbfa5b8fb8a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: add test for -dev packaging containing real librariesRoss Burton2016-02-021-1/+12
| | | | | | | | | | | | PN-dev packages should generally contain the link-time symlinks from libfoo.so to the real libraries. If a recipe installs a real library named libfoo.so there's a very good chance that it's a loadable module and should be in another package. (From OE-Core rev: 47d38d4d86ec6a8c143603ef4d0f056f5a5d9ceb) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: remove unused variable assignmentRoss Burton2016-01-261-6/+4
| | | | | | | (From OE-Core rev: 6b3cfcf90a0eb51356318f197faf6db4dc06a3e9) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Drop do_stage testRichard Purdie2016-01-241-3/+0
| | | | | | | | do_stage was obsoleted years ago, drop the test now. (From OE-Core rev: 59360521880a6ffbf893235bdc556533fab0a152) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: fix package_qa_walk()Robert Yang2016-01-241-2/+2
| | | | | | | | | | | The parameter "path" would be redefined inside package_qa_walk() which is useless, so remove it. (From OE-Core rev: b07d06d02cb675f5ed00ebe603441254f5671088) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: print all the QA messagesRobert Yang2016-01-241-27/+33
| | | | | | | | | | | | | | | | | | Fixed: If more than one files have the same QA issue, it only prints the last one, others are overrided, for example: messages["host-user-contaminated"] = "foo1" messages["host-user-contaminated"] = "foo2" Only foo2 will be printed. Add package_qa_add_message() to hanlde messages, so that all of them will be printed. The package_qa_add_message() is from RP. (From OE-Core rev: 1dcb38ca9d632887dd99ea9fa32dd955561dc18d) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass:buildpaths: ignore ipkg/dpkg's CONTROL dirRobert Yang2016-01-241-0/+4
| | | | | | | | | | | | | | | | | | | | | | | Fixed race issue when: WARN_QA_append = " buildpaths" PACKAGE_CLASSES = "package_ipk" $ bitbake e2fsprogs [snip] *** 0595: with open(path) as f: 0596: file_content = f.read() 0597: if tmpdir in file_content: 0598: messages["buildpaths"] = "File %s in package contained reference to tmpdir" % package_qa_clean_path(path,d) 0599: Exception: IOError: [Errno 2] No such file or directory: '/path/to/tmp/work/core2-64-poky-linux/e2fsprogs/1.42.9-r0/packages-split/e2fsprogs-ptest/CONTROL/control' The similar to package_deb. (From OE-Core rev: cd4313339853d2eddebf93a49d0f45a305985a31) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Start to clean up do_configure_qa codeRichard Purdie2016-01-191-15/+21
| | | | | | | | | | | | | | | | This cleans up the do_configure_qa code so that the exit status from package_qa_handle_error is handled correctly. It also converts package_qa_check_license to use our standard QA check configuration interface through package_qa_handle_error rather than a mix of return values, bb.fatal and bb.build.FuncFailed. Due to the merging of multiple lines into one message, we need to tweak a QA test to account for this. (From OE-Core rev: fbdf977a8094bb1e0baca85ffb3ed7f326986639) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Clean up horrible return value processing codeRichard Purdie2016-01-191-39/+16
| | | | | | | | | | | Whilst in theory return values are nice, handling the complex aggregation of the return values is ugly. The code already uses QA_SANE as a marker to signal problems. Whilst that isn't as idealistic, it makes the code massively cleaner, so rely on this instead. (From OE-Core rev: ebee3caeaa18daf4974ea90e264d64467681f57a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane/package: Fix cases where QA errors aren't fatalRichard Purdie2016-01-151-0/+3
| | | | | | | | | | | | | | | | | | | | | When using package_qa_handle_error(), we need to check QA_SANE and give a fatal error if issues were raised. The main insane checks do this, the anonymous python in insane does not, nor does the code in package.bbclass. This was likely missed when the function was introduced to package.bbclass. The impact is that errors can be shown but don't stop the build (do_package succeeds), the initial build fails due to the errors shown but subsequent builds succeed. This is clearly broken. The solution is to check QA_SANE in places we use the handle_error function. [YOCTO #8907] (From OE-Core rev: 7e36d13212763fe409747aba011c020c9aeba6d7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: in libdir test allow libraries in libexecdirJuro Bystricky2015-12-121-1/+2
| | | | | | | | | | | Some recipes, such as sudo and gcc, put libraries into libexecdir. Allow this in the sanity test so that we don't have to whitelist the libdir check. (From OE-Core rev: 9f5ad12a9532687a7a82e24b7c4506cabc13bba2) Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: Avoid libdir QA check if ↵Jian Liu2015-11-241-0/+3
| | | | | | | | | | | | | | PACKAGE_DEBUG_SPLIT_STYLE='debug-file-directory' If PACKAGE_DEBUG_SPLIT_STYLE='debug-file-directory', debuglibdir will be "/usr/lib/debug". Usually 64bit libs should be put under "/usr/lib64". This often cause an warning, so skip the checking. (From OE-Core rev: f18a917c1493d4107c7f9db1d9ba19ec368f9b48) Signed-off-by: Jian Liu <jian.liu@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Don't depend on BB_TASKDEPDATARichard Purdie2015-11-241-0/+1
| | | | | | | | | | | | | The dependency data in BB_TASKDEPDATA is encoded into the sstate checksum in a much more reliable format. This dependency runs the risk of depending on the string representation of a dict which is a bad idea. Therefore remove the dependency. (From OE-Core rev: 1eefc83e6aeb3cd5501b8e593dda052b1e183cc5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/insane: rename invalid-pkgconfig QA check to invalid-packageconfigPaul Eggleton2015-10-271-2/+2
| | | | | | | | | | | We have enough confusing name clashes already, let's not precipitate another one. (From OE-Core rev: a40e69508e66268e0743502334797374dee31125) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: remove misleading path in warningMaxin B. John2015-10-121-1/+1
| | | | | | | | | | | | | cross-compilation warning from insane.bbclass is slightly misleading. So, remove the misleading path from warning. [YOCTO #7540] (From OE-Core rev: fd0c6de410856ec42e20762163575f0efde44541) Signed-off-by: Maxin B. John <maxin.john@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: make package_qa_clean_path return a relative pathRobert Yang2015-09-241-1/+1
| | | | | | | | | | Make package_qa_clean_path() return something like "work/path/to/file" rather than "/work/path/to/file", the relative path is a little clear. (From OE-Core rev: 67a1e4b087a39db04370685616d5b439b0f2b505) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Add nios2 supportMarek Vasut2015-09-231-0/+1
| | | | | | | | | | | | | | Add support information for the Altera NIOS-II soft processor. Based on previous work by Walter Goossens <waltergoossens@home.nl> at https://github.com/wgoossens/meta-nios2 . (From OE-Core rev: 4e8175cf0f0a5b9e75e451b030b73643e7b33791) Signed-off-by: Marek Vasut <marex@denx.de> Cc: Walter Goossens <waltergoossens@home.nl> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: drop extra line-feed in pkgname checkMartin Jansa2015-09-231-1/+1
| | | | | | | | | | | | * it was causing QA checck name to be shown on separate line like this: sblim-sfcCommon-1.0.1: sblim-sfcCommon-dev doesn't match the [a-z0-9.+-]+ regex [pkgname] (From OE-Core rev: 8df8b942fa570de42910dcd8a1416063cbe1ddbe) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>