Commit Graph

227 Commits

Author SHA1 Message Date
Robert Yang 43713b9e17 insane/package: let package.bbclass inherit insane.bbclass
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>
2013-06-07 16:48:26 +01:00
Robert Yang 51c3e9df28 bbclass: bb.fatal() clean up
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>
2013-05-16 00:09:47 +03:00
Paul Eggleton 15aec44b2d 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>
2013-05-10 11:37:16 +01:00
Richard Purdie 566628d8cd class/lib: Fix up various file access methods
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>
2013-05-09 22:28:04 +01:00
Richard Purdie e1b5647d2c insane: Open file in binary mode
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>
2013-05-09 14:06:51 +01:00
Richard Purdie c3d18afaa5 classes/recipes/lib: Fix various python whitespace issues
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>
2013-05-09 14:06:51 +01:00
Björn Stenberg 44120a053c ptest bug fixes
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>
2013-04-11 12:20:35 +01:00
Nathan Rossi 647caeb0fb insane.bbclass: Updated MicroBlaze machine definitions
* 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>
2013-04-08 16:56:45 +01:00
Richard Purdie c446bbfa8d insane.bbclass: Add ALLOW_EMPTY to list of package specific variables
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>
2013-03-05 13:14:59 +00:00
Kyle Farnsworth 22a5264311 insane.bbclass: Merge linux-gnu entries in machine dictionary and add sh4 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>
2013-03-01 13:03:27 +00:00
Peter Seebach 593ee3698e siteinfo/insane: More n32 fixups
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>
2013-02-25 05:58:19 -08:00
Ross Burton 5dab6274b1 insane: remove unused variable
(From OE-Core rev: 1165a0b161ffc32258b0726e6ef3082d97dfb32a)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-14 23:08:35 +00:00
Martin Jansa 56bc2bb95a insane.bbclass: Add missing R* variables to pkgvarcheck
* 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>
2013-02-06 14:44:49 +00:00
Richard Purdie 1e593e92d2 staging/insane.bbclass: Move legacy do_stage check iinto insane.bbclass
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>
2013-02-06 13:12:59 +00:00
Richard Purdie 9244e4471d insane.bbclass: Add documentation headers for logical code blocks
(From OE-Core rev: ac24487a05834cc9c02a95bbd281927d98c5886e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06 13:12:59 +00:00
Richard Purdie 61c51a1a49 insane.bbclass: Add pkgvarcheck to check for suboptimal usages of variables
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>
2013-02-06 13:12:59 +00:00
Richard Purdie 244f107c1f package: Create global package file list and use throughout PACKAGEFUNCS
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>
2013-02-01 15:54:02 +00:00
Lukas Bulwahn 3f1280da0a insane.bbclass: removing outdated comment
This commit removes an outdated comment that recorded an issue that has been
resolved in the commits 1c75a5df68 and
d2d5456cd3. 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>
2013-02-01 15:54:00 +00:00
Richard Purdie 643bac1e97 insane.bbclass: Fix incorrect getVar call
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>
2013-01-30 14:09:09 +00:00
Philip Balister 7a7f9489d3 insane.bbclass : Disable tests for unsafe references in binaries and scripts.
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>
2012-11-24 15:12:29 +00:00
Constantin Musca 86204fbc69 insane.bbclass: add qa package name check
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>
2012-11-18 16:42:08 +00:00
Phil Blundell fa73df62c6 insane: detect and warn about relocations in .text
(From OE-Core rev: bc08838ddab0d16d889f81244529a0302a9240bc)

Signed-off-by: Phil Blundell <pb@pbcl.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-12 13:36:39 +00:00
Robert Yang 51c7ad682f classes: replace virtclass-native(sdk) with class-native(sdk)
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>
2012-11-02 16:18:27 +00:00
Peter Seebach 8d98171dc2 insane.bbclass and friends: Fix sanity checks and multlib headers for n32
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>
2012-10-27 09:44:56 +01:00
Ross Burton 2df8db417d insane: add a check for Xorg driver ABI dependencies
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>
2012-10-23 12:28:32 +01:00
Phil Blundell 0fd014eada insane: Don't try to run objdump on symlinks
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>
2012-10-18 12:13:49 +01:00
Phil Blundell f8c90bce73 insane: Rationalise phdrs-based QA checks
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>
2012-10-18 12:13:49 +01:00
Saul Wold a6052d6e77 insane.conf: add new libexec test
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>
2012-10-18 12:13:41 +01:00
Marcin Juszkiewicz 72188f5b8d insane.bbclass: add AArch64 support
(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>
2012-10-18 12:13:37 +01:00
Richard Purdie 5fdbda6922 classes: Update to use corrected bb.utils.explode_dep_versions2 API
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>
2012-10-02 11:40:53 +01:00
Richard Purdie 0bfb2094e3 insane.bbclass: Remove copy and paste confusion when using OVERRIDES
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>
2012-10-02 11:40:52 +01:00
Richard Purdie 30b7781650 insane.bbclass: Improve ability to detect enabled tests
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>
2012-09-21 11:17:47 +01:00
Radu Moisan 65d1eb7788 insane.bbclass: add library dir sanity check
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>
2012-09-21 11:17:47 +01:00
Paul Eggleton 272cb74d70 Rename task to packagegroup
"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>
2012-09-04 12:52:55 +01:00
Richard Purdie ad23395cd1 nativesdk: Switch to using nativesdk as a prefix, not a suffix
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>
2012-09-02 05:52:06 -07:00
Andy Ross 40d3579ced insane.bbclass: Fix RPATH warning in the face of funny path strings
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>
2012-08-21 12:15:30 +01:00
Richard Purdie 48619958d5 meta/classes: Various python whitespace fixes
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>
2012-08-21 12:15:30 +01:00
Mark Hatle 17207058b2 insane.bbclass: Make ldd exec_prefix error reporting easier to read
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>
2012-06-08 11:43:21 +01:00
Richard Purdie 0d9e893711 Revert "meta: replace os.popen with subprocess.Popen"
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>
2012-05-30 14:21:29 +01:00
Robert Yang 5996b2b58e meta: replace os.popen with subprocess.Popen
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>
2012-05-30 12:04:45 +01:00
Robert Yang e40995e569 meta: replace os.system with subprocess.call
Replace os.system with subprocess.call since the older function would
fail (more or less) silently if the executed program cannot be found

More info:
http://docs.python.org/library/subprocess.html#subprocess-replacements

[YOCTO #2454]

(From OE-Core rev: a07d03cc6f67c88feb9813ae7deb6e4a93552dfe)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-30 12:04:45 +01:00
Khem Raj 8262a6717f insane.bbclass: Add mips64{el} to known machines
(From OE-Core rev: 77dc886107e1b9cdaf6803141dc97c3ebfc22910)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-21 09:59:01 +01:00
Noor Ahsan 75a604bbf5 insane.bbclass: Add missing variable bpn
* bpn variable was used but it was not defined. Add bpn to resolve that issue.

(From OE-Core rev: 5756d4a7d34fbb370ef54a99dff06afba7a80d8f)

Signed-off-by: Noor Ahsan <noor_ahsan@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-11 13:10:37 +01:00
Robert Yang 54d61ed9f7 insane.bbclass: maybe no log.do_compile or log.do_install
The insane.bbclass grep in log.do_compile and log.do_install
unconditionally, but there maybe no such logs when mirror the pkg from
sstate cache file. We should check whether the log file exists or not
before grep in it.

Additionally, break the one too long line into two (Add a "\n").

[YOCTO #2153]

(From OE-Core rev: bbf38aa898454a2bb9a4ac993eb2696fbd5f4e57)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-22 16:47:06 +00:00
Richard Purdie b1aeaa8b0d meta: Replace bb.data.expand(xxx, d) -> d.expand(xxx)
sed \
 -e 's:bb.data.\(expand([^,()]*\), *\([^) ]*\) *):\2.\1):g' \
 -i `grep -ril bb.data.expand *`

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-05 10:23:53 -08:00
Richard Purdie 6ad11cba63 insane.bbclass: Only depend on desktop-file-utils-native when we need it
There is no point in depending on desktop-file-utils if we're not going to
use it. This patch makes the dependency conditional upon the desktop tests
being enabled.

(From OE-Core rev: f775f76dc01f1a969c00f697507958d8a4f9b088)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-24 00:12:02 +00:00
Saul Wold 7aa33dba3b insane.bbclass: Add test for static .a libraries in non-staticdev packages
This check verifies that non staticdev and non pic packages do not
have static libraries in them. There are a few exceptions for the
libgcc-dev and libgcov-dev packages which are whitelisted, also the
*_nonshared.a need to be part of their respective -dev packages.

This is currently a warning to work out any other issues in the upper
layers but will be moved to ERROR at somepoint in the future.

[YOCTO #663]

(From OE-Core rev: 4f31eb53fb0b1bfdf8be05356e57df607a6e82a9)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-26 20:48:01 +00:00
Nitin A Kamble 8f44e9030b insane.bbclass: fix elf.arch not matching error for x32 kernel
For x32 the user space is 32bit and the kernel is 64bit.
So the elf.arch for vmlinuz is x86_64 and not x86. This commit
fixes this QA error thrown for x32 kernel.

| ERROR: QA Issue: Architecture did not match (62 to 3) on
/work/qemux86_64-poky-linux-gnux32/linux-korg-3.1+git1+e2bf8464ddbf5da24d3d320cded5691828a91a0b-r1/packages-split/kernel-vmlinux/boot/vmlinux-3.1.0-yocto-standard-01628-ge2bf846
(From OE-Core rev: 74686edafa241839d3880e06740ee7450ff94fd8)

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-17 14:53:15 +00:00
Scott Garman 05409821ea insane.bbclass: use bb.process.Popen instead of subprocess.check_output
subprocess.check_output was only introduced in Python v2.7, so we
cannot use it. This refactors the QA test to use bb.process.Popen
instead.

This fixes the error:

AttributeError: 'module' object has no attribute 'check_output'

It no longer checks the return status of prelink-rtld, as that
case was simply adding noise. This QA test is intended to only
warn about specific paths that binaries could be linking to, not
handle the case where there is a missing library.

(From OE-Core rev: 0443487fe0bc628db9b03306bdc9dcdb39a121dc)

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-05 22:17:33 +00:00
Scott Garman 29feb44e05 insane.bbclass: add QA tests for unsafe references to exec_prefix
Files under exec_prefix (commonly /usr) may not be available during
system recovery. exec_prefix may also be kept on a separate partition
that is mounted late in the boot process.

This QA test throws an warning if a binary in base_[bindir|sbindir|libdir]
is dynamically linked to a file under exec_prefix. The intention is to
turn this into an error in the near future.

It also checks executable non-binaries (e.g, shell scripts) in the above
base directories with a simple grep test to look for references to
exec_prefix. This test only produces a warning, since false positives
are likely.

This fixes [YOCTO #1008]

(From OE-Core rev: 3e9c368a8045044736fc7e348404060498c7491b)

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-05 11:24:46 +00:00
Nitin A Kamble 79ec782aae insane.bbclass: avoid errors for x32 kernel
x32 abi of x86_64 has 32bit userspace and the kernel is 64bit.

The qa checking code was reporting this as errors for x32 kernel
files and modules.

This commit extends the condition in the checking code to avoid
throwing the bitsize not matched error for x32 kernel files.

(From OE-Core rev: c9963542b17537f18548616c9ad4f1d92f42bffb)

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-18 10:47:13 +00:00
Richard Purdie c8dee9b92d Convert to use direct access to the data store (instead of bb.data.*Var*())
This is the result of running the following over the metadata:

sed \
-e 's:bb.data.\(setVar([^,()]*,[^,()]*\), *\([^ )]*\) *):\2.\1):g' \
-e 's:bb.data.\(setVarFlag([^,()]*,[^,()]*,[^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^() ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-i `grep -ril bb.data *`

(From OE-Core rev: b22831fd63164c4db9c0b72934d7d734a6585251)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-10 11:51:19 +00:00
Darren Hart c37b2094cb insane.bbclass: print full path on invalid LICENSE_FILES_CHKSUM
Currently only the basename is printed when os.path.isfile() returns a failure
for the license file. If the file is present, but in the wrong directory, this
can be non-obvious to debug. Use the full path instead.

Make a minor grammatical correction in the error message while we're at it.

(From OE-Core rev: 80bd0c774fb691977b20e2d775212d849a33bf2b)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-10-20 17:13:37 +01:00
Richard Purdie b5bdb6a5dc insane: Promote most warnings into QA errors by default
We agreed a while back that we'd start ERRORing on QA issues, not just
WARNING about them. This patch changes the default QA levels to error
on everything except ldflag and useless rpath issues.

It also stops giving out QA warnings about desktop files since it
adds noise to the build and until someone plans to seriously tackle
that problem, its pointless.

We can promote the ldflag and rpath warnings too, when the issues in
OE-Core are resolved (they're mostly there now, just a few more to go).

(From OE-Core rev: f9305dac1926207c0ed580168708a18ce2581891)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-29 16:46:47 +01:00
Dmitry Eremin-Solenikov 1b449dd0b0 insane.bbclass: don't warn on .so files in -nativesdk packages
There is no point in warning against .so symlinks in -nativesdk
packages. They have to contain such links, so shut up the warning.

(From OE-Core rev: 287d02a731e45ce5d843db1fd4d78ba17e9ed487)

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-22 05:12:29 +01:00
Chris Larson f1982dfb52 insane: add linux-gnu to the platform data
(From OE-Core rev: 206f1501b0ccdd971ee40f3d112b4756077a9af9)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-08-12 17:21:52 +01:00
Nitin A Kamble 153ae95c9b insane.bbclass: add entries for linux-gnux32
For x86_64 new ABI : x32, there is a new
name for the TARGET_OS: linux-gnux32

(From OE-Core rev: 9dd0a7bf64ca2ca3613ab45dc779e9dcc1592342)

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-08-09 15:17:57 +01:00
Richard Purdie c18aa8d065 multilib: Add support for compiling recipes against multiple ABIs
This patch adds the core multilib class which can be used along with a
parameter specifying the mutlilib to use in BBCLASSEXTEND.

The MLPREFIX variable is added and can be used in cases where its too
difficult to dynmaically work out where a mutltilib prefix is needed
to be added to a variable.

This includes:
  * SHLIBSDIR and PACKAGE_ARCH fixes from Lianhao Lu.
  * PACKAGE_DYNAMIC mapping from Yu Ke
  * PACKAGE_INSTALL mapping from Yu Ke
  * RPROVIDES mapping from Yu Ke
  * TARGET_VENDOR fix from Mark Hatle
  * Ignorning *-native-runtime dependnecies as well as *-native from Yu Ke
  * Map PKG and ALLOW_EMPTY from Dongxiao Xu
  * Ensure RCONFLICTS and PKG field dependencies are remapped (from Dongxiao Xu)
  * Ensure PN and MLPREFIX are set at the same time to ensure consistent BPN values (Yu Ke)

(From OE-Core rev: 5d9453049915db48ec4b5972e12287417ebb61a2)

Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Xu Dongxiao <dongxiao.xu@intel.com>
Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-27 16:18:40 +01:00
Kumar Gala ea82abad76 insane.bbclass: Recognise powerpc64
(From OE-Core rev: a7a03e7c683b30f525a5858f586f3f99ce2daf57)

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-22 11:56:49 +01:00
Phil Blundell 5608570089 insane: improve diagnostic for redundant rpath
Make it more obvious which file, and which recipe, are at issue.

(From OE-Core rev: 207a2176bdebe217daf81d5c5b1d2ab4ab2e6adc)

Signed-off-by: Phil Blundell <philb@gnu.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-20 22:20:28 +01:00
Phil Blundell 122ccf2657 insane: make GNU_HASH check slightly more robust (avoids false negatives with gold); add check for useless rpaths
It isn't safe to make assumptions about the order of the entries in the dynamic section.  Fix the ldflags test to cope with the case where GNU_HASH comes before NEEDED and/or INIT.

Also, add a new warning for binaries which contain useless (but benign) rpath entries pointing to the default search locations.

(From OE-Core rev: 9adac72a77dafd2a203e29beec0b65f0ef5f2cb6)

Signed-off-by: Phil Blundell <philb@gnu.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-14 15:07:50 +01:00
Paul Eggleton 7354fc9213 insane.bbclass: skip rdepends QA checks for kernel / modules
The kernel and module recipes have very few dbg/dev packages, however
they can easily have false positive results from the rdepends QA checks
(e.g. kernel-module-lirc-dev). Thus disable these tests for any recipe
that inherits kernel or module-base.

(From OE-Core rev: 7a383f8ae8433c14b6995966216b9e6e81ea6a51)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-12 15:22:09 +01:00
Paul Eggleton 18ce7e2ef3 insane.bbclass: fix error/warning status being inverted
Fix package_qa_handle_error so that it returns the correct values in order
to determine error/warning status.

(From OE-Core rev: a66ed717f5f5991ee4072df67428564677e7d220)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-08 17:35:03 +01:00
Paul Eggleton 34ea005d6a insane.bbclass: allow dev-deps to be skipped via INSANE_SKIP
Add the missing check in package_qa_check_rdepends to allow dependencies
from non-development packages on development packages to be skipped.

(From OE-Core rev: 26fd8892337e60aa439cedde51b15c42a6fd8540)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-08 17:35:03 +01:00
Adrian Alonso 0156ed6731 insane: add microblaze little endian target info
* Add microblaze little endian target info to
  package_qa_get_machine_dict

(From OE-Core rev: 33679729f0dafedb143e2dd6174472de46fc36fe)

Signed-off-by: Adrian Alonso <aalonso@secretlab.ca>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-07 13:45:31 +01:00
Richard Purdie e69f0f8796 insane.bbclass: Fix indentation error
(From OE-Core rev: 128261100809f16517304739e30cdd73bd951651)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-05 14:04:29 +01:00
Richard Purdie 88ad4f308a insane.bbclass: Add warnings for packages which are not -dev packages which depend on -dev packages
Based on some code from Phil Blundell but reworked against insae.bbclass changes.

(From OE-Core rev: 2e06a1a843756e9d50291c4533b10096af2d852b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-05 14:01:44 +01:00
Richard Purdie 7e07f03bc4 insane.bbclass: Allow INSANE_SKIP to work on a per test basis
(From OE-Core rev: fbff17f0f01db55c7093f089ec06840179c389bd)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-05 11:39:09 +01:00
Richard Purdie 31ea94b217 insane.bbclass: Start to rework this so specific checks can be easily made warnings/errors
This patch means the warning/error handling can be controlled from local.conf
and/or from the distro level and no longer uses numbers but strings instead.

The system becomes extensible so that other classes can extend the path QA
checks at least.

It also removes all th duplicate error message code, we should have *one*
good error message.

Much work remains including making INSANE_SKIP take the classes of QA test
to skip but its a start.

(From OE-Core rev: 0fbe849b56d6457b6547a1202c4938d35316d8b8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-01 23:27:27 +01:00
Otavio Salvador e646a99972 insane.bbclass: skip license checksum if LICENSE is "CLOSED"
(From OE-Core rev: 2d2d7710cc51c2656e89c3aec3f3fc0a5b65eb30)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-10 09:57:08 +01:00
Adrian Alonso 3e1f013ed3 insane: add micrblaze target info
* package_qa_get_machine_dict
* Add microblaze dic entry for QA
* Prebuilt toolchain triplet microblaze-unknown-linux-gnu-
* TARGET_OS is linux-gnu for this toolchain

(From OE-Core rev: 0fb36b3232de531b4b3d5ca9e39dd610646d5e8c)

Signed-off-by: Adrian Alonso <aalonso@secretlab.ca>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-10 09:56:19 +01:00
Khem Raj 499a7b911c insane.bbclass: Checking for NLS too when checking gettext dependency
Checking for gettext is not needed when --disable-nls is used

Let user know what variant of gettext is missing e.g. gettext-native,
gettext-nativesdk etc, reveals a bit more for user

Check for virtual/gettext

(From OE-Core rev: 7d4cb46017616867dea589be03973897a02991eb)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-04 00:54:47 +01:00
Richard Purdie 0e89459017 gettext.bbclass: Updates to better handle gettext alternatives
* Change gettext dependency to virtual/gettext

* Ensure INHIBIT_DEFAULT_DEPS removes gettext dependencies

* Use BASEDEPENDS to ensure dependencies are added in native/nativesdk cases

(From OE-Core rev: d19735ad5a45f969918fb73ea4845bef48d9ee24)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-04 00:40:40 +01:00
Khem Raj 01102bd2d2 insane.bbclass: Move code to add function to tasks toward the end
Cosmetic change to make syntax highlighters happy

(From OE-Core rev: 1efeeecc33862e4d8c618e1f118ba60258bc6c64)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-04-28 10:45:42 +01:00
Khem Raj 511abe9167 classes: Use linux-uclibceabi instead of linux-uclibgnuceabi for os portion of triplet
(From OE-Core rev: 7aa1671941222e6dcd94fd943ede9e75f6c9f5ed)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-04-04 14:08:10 +01:00
Mark Hatle 78c2b79d54 insane.bbclass: Fix ELF bitsize comparison
Fix the way the ELF size is compared to ensure that incorrectly
sized ELF binaries are captured during the file scan.

lib/oe/qa.py is changed to accept a bitsize as a parameter.  Instead
of previously defining true/false, it now takes "0" undefined, "32"
32-bit, and "64" 64-bit as the size argument.  This allows us to
preserve existing behavior of only loading one ELF type, while
allowing the function to be able to discover the size on it's own.

(From OE-Core rev: 17dae13fabe2932a47ecc86fcafb1d177226513f)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-03-03 16:57:44 +00:00
Mark Hatle 16102e1890 Revise stripping and splitting of debug information
We now support two styles of debug information generation, the '.debug' style,
which is the same as previously implemented.  This style simply splits the
debug information and makes it available in the same general directory.

  /bin/foo -> /bin/.debug/foo

The new 'debug-file-directory' style splits the debug information and places
it into the single debug-file-directory, /usr/lib/debug:

  /bin/foo -> /usr/lib/debug/bin/foo.debug

Both also find and copy all referenced source code to a new /usr/src/debug
directory.  This allows the -dbg files to be used for stand-a-lone debugging
on or off the target device.

File stripping is now handled as a seperate operation from file splitting.
This allows us to split the debug information, but also leave it in the
original file -- or prevent the debug information from being split.

Also enhance the comments within local.conf.sample to provide a better
understanding of the control the user has over debug file generation.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2011-02-25 22:43:33 +00:00
Mark Hatle 2f3a7348b7 insane.bbclass: Fix config.log error message
[BUG #702]

The previous error message was confusing.  It was looking for both library and
include host contamination, but the message only indicated include files.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2011-02-08 17:53:15 +00:00
Scott Garman 6656381714 insane.bbclass: skip checks on .la installed status
Enabling libtool sysroot support triggers these errors but they
are a valid change in behavior.

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
2011-01-21 01:36:15 -08:00
Richard Purdie b939ff53ed insane.bbclass: Make sure QA issues are reported as warnings
Signed-off-by: Richard  Purdie <richard.purdie@linuxfoundation.org>
2011-01-13 16:17:06 +00:00
Richard Purdie 26cd5c2af0 insane.bbclass: Enable the package_qa_hash_style check
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-01-07 16:27:16 +00:00
Saul Wold d2d5456cd3 insane.bbclass: Fix message for LIC_FILES_CHKSUM Errors
Signed-off-by: Saul Wold <sgw@linux.intel.com>
2011-01-06 10:06:32 +00:00
Saul Wold 1c75a5df68 insane.bbclass: make LIC_FILES_CHKSUM failures report errors
Signed-off-by: Saul Wold <sgw@linux.intel.com>
2010-12-23 14:28:22 +00:00
Qing He 85bd3d644a insane.bbclass: fix qa_configure and qa_staging
fix the typo in `postfuncs' and effectively re-enables
qa_configure and qa_staging

Signed-off-by: Qing He <qing.he@intel.com>
2010-11-14 21:08:22 -08:00
Mark Hatle dd81d5882b insane: Update the insane class to check for host contamination
[BUGID #376]

Update to the insane class to detect the new gcc and binutils poison
messages located within the config.log.  (Continue to scan for the old
style message.)

Add a new compile and install log check to the package_qa that scans the
logs for the same types of messages "unsafe for cross-compilation".

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2010-10-01 18:45:32 +01:00
Richard Purdie 47f704ea74 insane.bbclass: Update to match the packaging classes when handling OVERRIDES
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-08-23 15:27:36 +01:00
Nitin A Kamble 23363c990c insane.class: print the recipe name in the warning.
Now Warning includes the package name like zlib is printed bellow:

WARNING: zlib: Recipe file does not have license file information
(LIC_FILES_CHKSUM)

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
2010-07-15 13:46:06 +01:00
Joshua Lock 04472ecf9d insane.bbclass: move license check to after configure
Only checking the license at packaging time means we don't check native builds,
so move the check to after do_configure

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2010-07-15 09:54:48 +01:00
Richard Purdie fae8d5e985 insane.bbclass: Relax fatal errors for now until we get have time to work through the backlog
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-08 23:51:06 +01:00
Richard Purdie b44d32ef41 insane.bbclass: Portions of code were not running, fix this and sync with OE.dev. Also add tests for bad sysroot rpaths in binaries
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-08 10:24:15 +01:00
Kevin Tian 4057e1a811 insane.bbclass: allow reporting all md5 mismatch warnings
instead of exiting when once one md5 mismatch is seen. This would be
helpful to save time on filling md5sum for multiple license check
files.

Signed-off-by Kevin Tian <kevin.tian@intel.com>
2010-06-30 13:19:05 +01:00
Nitin A Kamble fc81ca7d2d insane.bbclass: Throw better error if path is bad
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
2010-06-07 16:05:12 +01:00
Nitin A Kamble 8825d4d455 License Checking: convert an error into warning
If license file md5 information (LIC_FILES_CHKSUMS variable) is
missing in the recipe then just throw a warning instead of the build
failure.
  Once enough recipes' LIC_FILES_CHKSUMS are filled then this warning
will be reverted back to the the fetal error.
  If LIC_FILES_CHKSUMS field is present but invalid then the it still
causes a fetal build error.

Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
2010-05-12 10:54:05 -07:00
Nitin A Kamble 2ca1f78a95 License Change checking:
Added a new variable in recipe : LIC_FILES_CHKSUM

It is a required field for every recipe.

It describes license text location in the source files. And also stores
md5sum of that license text. Any change in this license text triggers build
error. Which enables developer to review any changes in the license and
update the license fields in the recipe accordingly.

For Example: contents of zlib_1.2.3.bb
LICENSE = "zlib"
LIC_FILES_CHKSUM = "file://README;md5=ae764cfda68da96df20af9fbf9fe49bd \
  file://zlib.h;beginline=1;endline=30;md5=6ab03f03a5ee92d06b809797d4d5586d "

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
2010-05-11 16:25:39 -07:00
Joshua Lock e7fa3529f3 Update classes to use lib/oe
Adapt modifications from upstream to make Poky classes use lib/oe for the
common Python functionality.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2010-05-06 12:53:16 +01:00
Richard Purdie 847324b79b classes/conf: Update to handle gcc-runtime
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-03-29 22:28:49 +01:00
Richard Purdie fd34f26511 insane.bbclass: Since we have no legacy packaging, no need to repeatedly scan staging
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-01-26 16:00:13 +00:00
Richard Purdie ed2be0f349 insane.bbclass: Fix typo
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-01-14 11:37:56 +00:00
Richard Purdie 9604ad0ddf cross-canadian: Fix gettext issues
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-01-14 11:25:42 +00:00
Joshua Lock aef159c70c insane.bbclass: Fix multiline string
Earlier commit had created a multiline string without
updating the python string quotation (""" for multiline).

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2010-01-06 13:18:18 +00:00
Joshua Lock aee835ba8f insane.bbclass: enhance gettext error message
Point the user at gettext.bbclass which handles adding the
correct gettext to DEPENDS.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2010-01-06 09:32:41 +00:00
Joshua Lock 8a7fd14ad4 insane.bbclass: special case gettext as it can't depend on itself
Only run the gettext section of the QA configure sanity check if
the package is not gettext as the gettext tools, shipped with
gettext, use the macro employed in the sanity check.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2010-01-04 10:34:00 +00:00
Joshua Lock 2be65803cb insane.bbclass: Fix gettext test
The previous gettext check was broken resulting in many false positives.
This improved version works as follows:
* Adds to the existing os.walk() and builds a list of configure.in and
  configure.ac files
* Tests whether DEPENDS includes an appropriate gettext
* If not greps the configure files in the list for instances of AM_GNU_GETTEXT
* If if an instance is found we bb.fatal with an appropriate message

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2009-12-21 10:51:50 +00:00
Joshua Lock 4859945b11 insane.bbclass: Handle native packages in the gettext test
When the package we are checking is a native package we need to check
for gettext-native rather than gettext in the DEPENDS.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2009-12-17 10:26:05 +00:00
Joshua Lock 71e21a72cd insane.bbclass: Check whether gettext is required but not in DEPENDS
Signed-off-by: Joshua Lock <josh@linux.intel.com>
2009-12-15 21:07:14 +00:00
Joshua Lock 62ab23e067 insane.bbclass: Skip arch check for Cross Canadian
Signed-off-by: Joshua Lock <josh@linux.intel.com>
2009-12-14 11:56:01 +00:00
Richard Purdie b772c8cde5 bitbake.conf/base.bbclass: Rename the staging directory to sysroots and the populate_staging task to populate_sysroot
This change makes the purpose of the staging directory more obvious and
the taskname more true to what it now actually does.

The layout version number is increased due to the change in layout
but code to convert existing directories and insert a symlink for
backwards compatibility is included.

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-11-13 12:15:42 +00:00
Richard Purdie c54117458a classes: Remove and sanitise import statements
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-11-13 12:15:28 +00:00
Richard Purdie 0d7207ca39 sdk.bbclass: Rename to nativesdk.bbclass
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-09-17 22:25:22 +01:00
Richard Purdie be10b46b73 base.bbclass: Use explode_deps from bb.utils and remove the obsolete base.bbclass version 2009-02-05 23:54:11 +00:00
Richard Purdie 1e53b0f578 insane.bbclass: Drop pointless QA_LOG variable, add QA_LOGFILE so QA errors can optionally end up logged in one place for ease of reference. Add sanity check searching for tmpdir references within built packages, not fatal at present.
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4309 311d38ba-8fff-0310-9ca6-ca027cbcb966
2008-04-22 21:22:11 +00:00
Marcin Juszkiewicz fd652ded2e insane.bbclass: use 'desktop-file-validate' from staging not from host system
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4159 311d38ba-8fff-0310-9ca6-ca027cbcb966
2008-04-03 05:17:32 +00:00
Richard Purdie b1e715e233 insane.bbclass: Sync with OE.dev
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4060 311d38ba-8fff-0310-9ca6-ca027cbcb966
2008-03-19 15:53:07 +00:00
Ross Burton a99199d729 insane.bbclass: find desktop-file-validate on the path, so it can be added to ASSUME_PROVIDED
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4053 311d38ba-8fff-0310-9ca6-ca027cbcb966
2008-03-19 14:45:14 +00:00
Ross Burton dad7da8290 insane.bbvlass: split checks so the warnings are precise
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3478 311d38ba-8fff-0310-9ca6-ca027cbcb966
2008-01-13 16:58:42 +00:00
Ross Burton 5477906ca1 insane.bbclass: use bb.error when reporting desktop file problems
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3152 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-11-14 09:48:17 +00:00
Ross Burton ab2a04d843 insane.bbclass: validate desktop files
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3151 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-11-14 09:36:55 +00:00
Marcin Juszkiewicz c67429e4a1 insane.bbclass: fix x86_64 arch name (from OE)
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2910 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-10-19 10:29:34 +00:00
Ross Burton 9694023446 insane.bbclass: don't raise strings, but exceptions
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2679 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-09-03 10:49:33 +00:00
Richard Purdie 5781fe13d6 insane.bbclass: Merge updates from OE
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2644 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-09-02 09:46:35 +00:00
Richard Purdie aca29f112c package.bbclass/insane.bbclass: Don't set task dependencies when PACKAGES is empty
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1455 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-04-10 11:23:14 +00:00
Richard Purdie 409335beae classes: Rework core dependencies to work properly at the task level
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1427 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-04-03 11:31:02 +00:00
Ross Burton 74e0426503 Fix typo when reporting an error
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1258 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-02-04 18:44:37 +00:00
Ross Burton 4292e8199b Remove exclude hack in insane.bbclass and replace it with something a little less foul. This involces adding INSANE_SKIP_package=1 statements to the relevant .bb files
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1197 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-01-22 20:11:19 +00:00
Ross Burton 539b0f853a Add exclude list for now, until insane can handle per-package exclusions
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1196 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-01-22 19:41:29 +00:00
Ross Burton 6e6fdde69b When checking for .so files in non-dev packages, only check for .so symlinks
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1195 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-01-22 17:04:39 +00:00
Ross Burton 248c3ed477 Add insane, from OE (but with fatal warnings)
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1187 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-01-21 21:28:51 +00:00