summaryrefslogtreecommitdiffstats
path: root/meta/classes/insane.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* insane: don't abort if workdir is not TMPDIR/workRoss Burton2013-09-221-4/+1
| | | | | | | | | | The BASE_WORKDIR variable can be used instead of enforcing WORKDIR being TMPDIR/work (and aborting the build if it isn't). (From OE-Core rev: 176a36ace1624f3bbe498307aeabbd7935de14e6) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: Don't use deprecated bitbake APIRichard Purdie2013-09-011-1/+1
| | | | | | | | | | These have been deprecated for a long time, convert the remaining references to the correct modules and prepare for removal of the compatibility support from bitbake. (From OE-Core rev: 6a39835af2b2b3c7797fe05479341d71a3f3aaf6) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory: use package_qa_handle_error for version-going-backwardsMartin Jansa2013-08-121-0/+1
| | | | | | | | | | | * this way it's easier for distro to select if such issue should be error, warning or ignored and also it gets recorded in qa.log (From OE-Core rev: 44624853de8c88abdcae2ccd0902b390ff546d4c) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/insane: allow libdir QA check to be skipped using INSANE_SKIPPaul Eggleton2013-07-181-14/+24
| | | | | | | | | | | | | | | | | | This path check isn't handled in the normal way where a QA check function is called for every file (there's some minor setup that we want to avoid doing for every file) so we need to check INSANE_SKIP explicitly. In the process, change the code structure a little bit so that we can report the package that contains the errant file. Fixes [YOCTO #4822]. (From OE-Core rev: 3bdbec1bdecc52828cbbf8108786ff076c981845) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/insane: fix regression in libdir QA regexPaul Eggleton2013-07-181-1/+1
| | | | | | | | | | | There was a slight mistake in the recent change to the lib_re regex - it still needs to begin with a /. (From OE-Core rev: 194e47e6d8d9b9ee98e0203f0ebb574084277c46) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: Added QA warning for shipping /usr/share/info/dirMihai Prica2013-07-051-1/+11
| | | | | | | | | | | | | | /usr/share/info/dir should be generated at install time in a postinst. Added QA warning to check at build time for this file. The warning is disabled by default. [YOCTO #3969] (From OE-Core rev: be93fa1d8fd601d95147980938217142c7d98c62) Signed-off-by: Mihai Prica <mihai.prica@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/insane: fix libdir check regexesPaul Eggleton2013-07-051-2/+2
| | | | | | | | | | | | Ensure these do not pick up e.g. /lib/systemd/system/uuidd.socket, but ensure we pickup e.g. /usr/lib/libnss3.so.1d (example from Debian). This also fixes the broken exec_re regex (lib*.). (From OE-Core rev: 391a361190d7da19ad3381121649a41a28516cb5) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/insane: remove la2 check which no longer exists from ERROR_QAPaul Eggleton2013-06-281-1/+1
| | | | | | | | | | | | | | This check was actually removed a very long time ago in 6656381714c5956f71ca634f5a5f4aa4661bbf7e, before we even changed the QA checks to use names instead of numbers - the name was probably added ERROR_QA mistakenly because it hadn't also been removed from the comment listing the QA checks or the function that determined which ones were errors. (From OE-Core rev: ff65497cd9a96d5ab49b16ba1f7e30a216ff4a42) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: quiet package errors not in *_QAChristopher Larson2013-06-111-2/+4
| | | | | | | | | | | | | | | Currently, if a package QA type from package.bbclass is not listed in ERROR_QA, it gets shown, regardless of whether it's in WARN_QA. This differs from the behavior of the rest of the QA handling (which doesn't call package_qa_handle_error at all if it's in neither _QA variable), and is nonintuitive. Change this to use bb.note() if it's listed neither in ERROR_QA nor WARN_QA, so it ends up in the task logs, but doesn't clutter up the user's output. (From OE-Core rev: 8f5675e6d3eb8473f367de72d2d3d8a702011a47) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane/package: refactor packaging sanity testsRobert Yang2013-06-071-11/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor packaging sanity tests from package.bbclass to insane.bbclass so that the message can respect WARN_QA (print the warning message and go on the task) and ERROR_QA (print the error message and fail the task). - For the bb.warn(), give it a message name and add it to WARN_QA, then use package_qa_handle_error() to handle it. - For the bb.error(), give it a message name and add it to ERROR_QA, then use package_qa_handle_error() to handle it. - All the bb.warn() and bb.error() have been replaced in package.bbclass. - A few bb.warn() and bb.error() in insane.bbclass have been kept since they can not be replaced or doesn't have to, for example the bb.error() in package_qa_check_license(), it will print the error message and then invoke bb.fatal() to fail the task, I think that we don't have to replace it with package_qa_handle_error(). - Put all the WARN_QA and ERROR_QA in one line, so that they can be redefined by the user easily. [YOCTO #3190] [YOCTO #4396] (From OE-Core rev: 2f117ee615b703db07d3274ac592e2bd653743dd) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane/package: let package.bbclass inherit insane.bbclassRobert Yang2013-06-071-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RP's comment: "What we're trying to do is move everything to use a standard mechanism for reporting issues of this type (do_package). With insane.bbclass, you can elect whether a given type of error is a warning or error and fails the task." * The package.bbclass had used package_qa_handle_error() which is from insane.bbclass, and we will use it for handling other warnings and errors, so let package.bbclass inherit insane.bbclass, this change will make the insane as a requirement (always included). * Change the "PACKAGEFUNCS ?=" to "+=", otherwise there would be an error like: Exception: variable SUMMARY references itself! This is because we let package.bbclass inherit insane.bbclass, and PACKAGEFUNCS has been set in insane.bbclass, so the "PACKAGEFUNCS ?=" will set nothing, then the "emit_pkgdata" doesn't run which will cause this error. * Add a QA_SANE variable in insane.bbclass, once the error type is ERROR_QA, it will fail the task and stop the build. [YOCTO #3190] [YOCTO #4396] (From OE-Core rev: 852dead71387c66ec0cba7c71e3814a74e409560) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bbclass: bb.fatal() clean upRobert Yang2013-05-161-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bb.fatal() is defined as: def fatal(*args): logger.critical(''.join(args)) sys.exit(1) So anything after bb.fatal() in the same code block doesn't have any effect, e.g.: bb.fatal("%s_%s: %s" % (var, pkg, e)) raise e The "raise e" should be removed. I searched all the files which use bb.fatal(), only the following 3 classes have this issues: insane.bbclass package.bbclass package_rpm.bbclass [YOCTO #4461] (From OE-Core rev: 4c47525c5a171b1282615c9fbc7d84addef85f92) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/insane: add check for PN in OVERRIDESPaul Eggleton2013-05-101-0/+5
| | | | | | | | | | | | | | 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>
* class/lib: Fix up various file access methodsRichard Purdie2013-05-091-11/+14
| | | | | | | | | | | | | | There are various bits of cruft that have built up around our file accesses. This patch cleans some of them up, specifically: * Remove pointless "from __builtin__ import file" * Use open(), not file() * Wrap file usage in a with container to ensure files are closed * Add missing .close() calls in some cases (From OE-Core rev: a43e0a8ecd0441131e929daf998c3cd454d9c8f3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Open file in binary modeRichard Purdie2013-05-091-1/+1
| | | | | | | | | We open the file we're writing to in binary mode so open the input stream with the same mode so things match. This avoids errors with python3. (From OE-Core rev: 4f47b3a4726dd47e8a6db228fcaf25d1890e3e52) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/recipes/lib: Fix various python whitespace issuesRichard Purdie2013-05-091-13/+13
| | | | | | | | | There are some left over tab characters in the python functions. This removes them and resolves python 3 errors. (From OE-Core rev: fafeb381c48291fa65c634c01c244843c8d7fad3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ptest bug fixesBjörn Stenberg2013-04-111-3/+3
| | | | | | | | | | | | | | | | | | | Move ${PN}-ptest to start of PACKAGES to ensure all ptest files are packaged in the -ptest package. Add QA exclusions to insane.bbclass to ensure -ptest packages can contain any files they need. Disable ptest for native packages. Don't emit errors on missing _ptest functions. (From OE-Core rev: 01bea4ef932e46eb2fcc8b4be7ff5e2b5b2a0978) Signed-off-by: Björn Stenberg <bjst@enea.com> Signed-off-by: Anders Roxell <anders.roxell@enea.com> Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: Updated MicroBlaze machine definitionsNathan Rossi2013-04-081-2/+2
| | | | | | | | | | | | | | * Removed existing definition with machine 47787, this definition is outdated, a sanity error should occur if an ELF uses this value. * Added new definition with machine 189. This value replaces the existing value since August 2009. See binutils thread for more information. (http://sourceware.org/ml/binutils/2009-08/msg00127.html) (From OE-Core rev: 0c60d3b04eb77629abc3bbc2a6d8a2b8f0a44309) Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: Add ALLOW_EMPTY to list of package specific variablesRichard Purdie2013-03-051-1/+1
| | | | | | | | | ALLOW_EMPTY should have a package specified so extend sanity checks to cover it. (From OE-Core rev: 02849a54d38c0b98db7ff6b52b4974ee0d88bfb4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: Merge linux-gnu entries in machine dictionary and add sh4 ↵Kyle Farnsworth2013-03-011-3/+2
| | | | | | | | | | machine. (From OE-Core rev: 6e569c1aa66b2496b18d33803a18b99508152064) Signed-off-by: Kyle Farnsworth <kyle@farnsworthtech.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* siteinfo/insane: More n32 fixupsPeter Seebach2013-02-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | For perfectly sound reasons, n32 MIPS is a mips64 subset denoted by an ABI change, thus, "mips64-vendor-linux-gnun32" rather than "mips-vendor-linux-gnu". A previous change had fixed up insane.bbclass to recognize these, which mostly worked, but left SITEINFO_BITS set to 64. Since bit-32 is processed first, and there are specific checks for linux-gnun32, modify the mips64-linux-gnun32 lines to specify "bit-32", so things that check SITEINFO_BITS get the right answer. Also, drop the mips{,el}-linux-gnun32 lines, because that's not a valid combination; n32 only makes sense for mips64. Also, the insane.bbclass change spelled "mips64el" as "mipsel64", which no one noticed because no one's using little-endian n32, apparently. (From OE-Core rev: 0c243a550f5a0e539823fe168bcc7b2bbb9f19e1) Signed-off-by: Peter Seebach <peter.seebach@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: remove unused variableRoss Burton2013-02-141-1/+0
| | | | | | | (From OE-Core rev: 1165a0b161ffc32258b0726e6ef3082d97dfb32a) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: Add missing R* variables to pkgvarcheckMartin Jansa2013-02-061-1/+1
| | | | | | | | | * check also RSUGGESTS, RCONFLICTS, RPROVIDES, RREPLACES (From OE-Core rev: 63d9926dde562fd2447fc26482745c3b6f232c12) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging/insane.bbclass: Move legacy do_stage check iinto insane.bbclassRichard Purdie2013-02-061-0/+3
| | | | | | | | We might as well put all the sanity checks in one place. (From OE-Core rev: 05be11c7508984cc4aa757becb7a8f47c5b7e919) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: Add documentation headers for logical code blocksRichard Purdie2013-02-061-0/+17
| | | | | | (From OE-Core rev: ac24487a05834cc9c02a95bbd281927d98c5886e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: Add pkgvarcheck to check for suboptimal usages of variablesRichard Purdie2013-02-061-1/+9
| | | | | | | | | | | | | | | Check through the variables: 'RDEPENDS', 'RRECOMMENDS', 'FILES', 'pkg_preinst', 'pkg_postinst', 'pkg_prerm', 'pkg_postrm' and if there is a variable set which isn't package specific, inform the user of this. Using these variables without a package suffix is bad practise and complicates dependencies of packages unnecessarily as well as complicates the code. Lets convert the remaining issues and then we can take the small performance gain. (From OE-Core rev: 316228948e65f376f6c5be13ccd0c964ea630edf) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: Create global package file list and use throughout PACKAGEFUNCSRichard Purdie2013-02-011-3/+1
| | | | | | | | | | | | | Currently we do a signficant amount of tree traversal in many different places which in inefficient. We can assume that the files don't change and cache the file list which gives an efficiency improvement which this patch does using a global variable. (From OE-Core rev: 2d7608842d2dab07065e60aab729a5c8fd6b7907) (From OE-Core rev: 5c7c8347eb1bc25d194be6f4be142ba0924e2600) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: removing outdated commentLukas Bulwahn2013-02-011-2/+0
| | | | | | | | | | | | This commit removes an outdated comment that recorded an issue that has been resolved in the commits 1c75a5df6845090480deff20f469f177501d2182 and d2d5456cd3b3bd3e52a5dedccca4d46e3a7986d1. Probably, the comment was missed when changing the behavior in those commits. (From OE-Core rev: fb1b51e902186b6a7d05e511fe3c3f03c10e3444) Signed-off-by: Lukas Bulwahn <lukas.bulwahn@oss.bmw-carit.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: Fix incorrect getVar callRichard Purdie2013-01-301-1/+1
| | | | | | | | | | | | | On a trace I was a bit puzzled why getVar was making 180 calls to len(d). This is an expensive operation that should be very rarely called and certainly not by getVar. In perl's do_package it was resulting in ~1.5 million function calls from those 180 cases. Ultimately this typo was why. Lets fix it and save the CPU cyles. (From OE-Core rev: a8ba821d0002e4395fc5c80649fe14f93a7971fe) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass : Disable tests for unsafe references in binaries and scripts.Philip Balister2012-11-241-1/+1
| | | | | | | | | | | | | | These test look for programs in / that depend on programs in /usr. After a brief discussion in #oe, we decided these tests should be disabled so we can focus on more serious QA issues. If you are working on a system where / and /usr are on different partitions, you should turn these tests back on and resolving the QA warnings. (From OE-Core rev: 2fb58da56e8e7044de21fd10fe9164d204587236) Signed-off-by: Philip Balister <philip@balister.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: add qa package name checkConstantin Musca2012-11-181-0/+8
| | | | | | | | | | | | Check if package names match the [a-z0-9.+-]+ regular expression [YOCTO #3139] (From OE-Core rev: 55dd271be1aee21e36d130359f4f21841623c425) Signed-off-by: Constantin Musca <constantinx.musca@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: detect and warn about relocations in .textPhil Blundell2012-11-121-1/+25
| | | | | | | (From OE-Core rev: bc08838ddab0d16d889f81244529a0302a9240bc) Signed-off-by: Phil Blundell <pb@pbcl.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: replace virtclass-native(sdk) with class-native(sdk)Robert Yang2012-11-021-2/+2
| | | | | | | | | | | | | The overrides virtclass-native and virtclass-nativesdk are deprecated, which should be replaced by class-native and class-nativesdk. [YOCTO #3297] (From OE-Core rev: 9fbeab63315fef0dbcc91c5e7051665764758a6e) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass and friends: Fix sanity checks and multlib headers for n32Peter Seebach2012-10-271-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | The n32 architecture is odd, in that it's a mips64 ABI which happens to be 32-bit. To handle this, we need something in the environment which can be used to distinguish it. The obvious place to stash this is the ABI suffix, so we use "n32" as an ABI suffix. This allows a couple of improved checks: 1. In insane.bbclass, we can use "linux-gnun32" to discern that it's okay for a mips64 binary to be a 32-bit binary in some cases. 2. In multilib_header, we can check for the n32 ABI, and use a distinct value. 3. In siteinfo, add linux-gnun32 as a synonym for linux, similar to what's done for linux-gnux32, and tell the mips*-linux-gnun32 variants to pick up the corresponding mips-linux site configs. Note that the multilib header wrapper already has n32 hooks in it, there was just nothing creating -n32 header variants. (From OE-Core rev: c8e8e8ba22eaa335ac72f0e5b317f804035133e2) Signed-off-by: Peter Seebach <peter.seebach@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: add a check for Xorg driver ABI dependenciesRoss Burton2012-10-231-1/+19
| | | | | | | | | | | | | Now that xserver provides driver ABI names, all drivers should depend on the ABI version that they have been built against. All drivers that include xorg-driver-input.inc or xorg-driver-video.inc will get these automatically, so this should only impact binary drivers. (From OE-Core rev: 800b256390b22c3d3d8d6a69f6fb668376a5030b) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Don't try to run objdump on symlinksPhil Blundell2012-10-181-0/+6
| | | | | | | | | | | | | If the link is absolute then we might end up reading from a host binary or a nonexistent path, neither of which will produce useful results and may result in objdump failure and python backtrace spew. If the link does point to a binary within the installation root then we will scan the pointed-to file at some point anyway so there is no need to do it again. (From OE-Core rev: 91769af1c1175ac9bb43d16d05fb1c8736dd9287) Signed-off-by: Phil Blundell <pb@pbcl.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Rationalise phdrs-based QA checksPhil Blundell2012-10-181-23/+18
| | | | | | | | | | | | | | | | | | Various different QA checks are based on essentially the same data from the ELF program headers. Calling objdump to extract it repeatedly is inefficient, particularly if the shell is involved. Instead, let's cache the output from objdump inside the qa.elf object and allow it to be reused by multiple tests. Also, using objdump instead of scanelf to check for bad RPATHs (in the same way that the useless-rpaths check was doing already) allows the dependency on pax-utils-native to be dropped. (From OE-Core rev: bf19eeb9f65e91bf2b5d89e7c0b099c55d7c15ff) Signed-off-by: Phil Blundell <philb@gnu.org> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.conf: add new libexec testSaul Wold2012-10-181-0/+14
| | | | | | | | | | | | | | | | This tests for /usr/libexec as we are moving things to /lib/. the test is ignored if the distro defaults to /usr/libexec. Currently this test will be disabled by default since the current value of ${libexecdir} is "/usr/libexec". Also this tests needs to be enabled in the WARN_QA list. [YOCTO #2915] (From OE-Core rev: 4c60c2779dde6962f342f9c9b61713cf2d3a564c) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: add AArch64 supportMarcin Juszkiewicz2012-10-181-0/+1
| | | | | | | | (From OE-Core rev: 39d71c8c41276091688decb64d418e1e3637e2b6) Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: Update to use corrected bb.utils.explode_dep_versions2 APIRichard Purdie2012-10-021-2/+42
| | | | | | | | | | | | | | | | | The bb.utils.explode_dep_versions function has issues where dependency information can be lost. The API doesn't support maintaining the correct information so this changes to use a new function which correctly handles the data. This patch also fixes various points in the code to ensure that we do not have any duplicates in things that use explode_dep_versions. A new sanity test to test the contents of the R* variables is also added. [Some changes from Mark Hatle <mark.hatle@windriver.com>] (From OE-Core rev: 16a892431d0c0d03f8b561b92909cf2f11af4918) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: Remove copy and paste confusion when using OVERRIDESRichard Purdie2012-10-021-15/+2
| | | | | | | | | People keep copying this code and its confusing and unnecessary. Remove the bad examples to try and stop this happening. (From OE-Core rev: 48aa4b00cfb7f01195c6d20b7ba660715fe792ef) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: Improve ability to detect enabled testsRichard Purdie2012-09-211-3/+5
| | | | | | | | | | Define an ALL_QA variable which can be used to determine which tests to run. Improve the libdir test to work in the case it is set to raise an error rather than a warning. (From OE-Core rev: 069992a502658e8e44b870601e2e189cd9596ec9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: add library dir sanity checkRadu Moisan2012-09-211-1/+38
| | | | | | | | | | | | | | | Check in ${PKGD} for libraries in wrong locations. Trigger a warning if so. Eg. Catch recipe installing /lib/bar.so when ${base_libdir}="lib32" or installing in /usr/lib64 when ${libdir}="/usr/lib" [Yocto #2038] (From OE-Core rev: 534fa3a55de19f249583207aaeec58fec8154a1d) Signed-off-by: Radu Moisan <radu.moisan@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Rename task to packagegroupPaul Eggleton2012-09-041-1/+1
| | | | | | | | | | | | "Package group" is a much more appropriate name for these than task, since we use the word task to describe units of work executed by BitBake. (From OE-Core rev: 424dcf7046e4ad09dcc664eb1992201195247fcf) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* nativesdk: Switch to using nativesdk as a prefix, not a suffixRichard Purdie2012-09-021-2/+2
| | | | | | | | | | | | | | | As discussed on the mailing lists, using a suffix to package names is hard and has lead to many recipes having to do PKGSUFFIX games. Its looking extremely hard to scale nativesdk much further without hacking many recipes. By comparison, using a prefix like multilib does works much better and doesn't involve "hacking" as many recipes. This change converts nativesdk to use a prefix using the existing multilib infrastructure. (From OE-Core rev: 81813c0e322dc04ce4b069117188d8a54dfddb8c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: Fix RPATH warning in the face of funny path stringsAndy Ross2012-08-211-1/+4
| | | | | | | | | | | In toolchain edge cases it's possible for the RPATH of a library to be set to something like "/usr/lib/../lib". This should be detected as "/usr/lib" and generate a warning. (From OE-Core rev: 72a924d0686389d648338efd3f675fc85ee2d181) Signed-off-by: Andy Ross <andy.ross@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/classes: Various python whitespace fixesRichard Purdie2012-08-211-14/+14
| | | | | | | | | | | It was pointed out we have a number of weird indentations in the python functions. This patch cleans up 3, 7 and other weird indentations for the core bbclass files. It also fixes some wierd (odd) shell function indentation which my searches picked up. (From OE-Core rev: 8385d6d74624000d68814f4e3266d47bc8885942) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: Make ldd exec_prefix error reporting easier to readMark Hatle2012-06-081-4/+16
| | | | | | | | | | | | | | | | | | | | | Remove the long obtuse sysroot path from the ldd output. Make the error message significantly easier to read and understand. Old Style: WARNING: QA Issue: keyutils: /home/mhatle/git/oss/oe-core/build-i386/tmp-eglibc/work/i586-oe-linux/keyutils-1.5.5-r1/packages-split/keyutils/sbin/request-key links to something under exec_prefix WARNING: QA Issue: ldd reports: libkeyutils.so.1 => /home/mhatle/git/oss/oe-core/build-i386/tmp-eglibc/sysroots/qemux86/usr/lib/libkeyutils.so.1 (0xdead1000) libc.so.6 => /home/mhatle/git/oss/oe-core/build-i386/tmp-eglibc/sysroots/qemux86/lib/libc.so.6 (0xdead2000) /lib/ld-linux.so.2 => /home/mhatle/git/oss/oe-core/build-i386/tmp-eglibc/sysroots/qemux86/lib/ld-linux.so.2 (0xdead3000) New style: WARNING: QA Issue: keyutils: /sbin/request-key, installed in the base_prefix, requires a shared library under exec_prefix (/usr): libkeyutils.so.1 => /usr/lib/libkeyutils.so.1 (0xdead1000) (From OE-Core rev: 1583a8e2db6dd4843ff45acee458d4924f7d6ced) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "meta: replace os.popen with subprocess.Popen"Richard Purdie2012-05-301-20/+11
| | | | | | | | | This reverts commit e83d8e58a6b107eea87df0ec233a1bc932b2c6e as the conversion is not correct. Its replacing readlines() calls which generate an array with what are effectively strings. There are split("\n") calls missing in many cases so this needs to be reverted until it gets fixed. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: replace os.popen with subprocess.PopenRobert Yang2012-05-301-11/+20
| | | | | | | | | | | | | | | | | | | | | | Replace os.popen with subprocess.Popen since the older function would fail (more or less) silently if the executed program cannot be found There are both bb.process.run() and bb.process.Popen() which wraps the subprocess module, use it for simplifying the code. Note: We don't need the "2>/dev/null" or "2>&1" since bb.process.run() can handle it, it will raise exception when error occurs, we should handle the exception ourselves if we want to ignore the error. More info: http://docs.python.org/library/subprocess.html#subprocess-replacements [YOCTO #2454] (From OE-Core rev: e83d8e58a6b107eea87df0ec233a1bc932b2c6ea) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>