Age | Commit message (Collapse) | Author | Files |
|
See GNU Savannah bug 30612 -- make 3.82 is known to be broken.
A number of vendors are providing a modified version, so checking
for just the version string is not enough. We also need to check
if the patch for the issue has been applied. We use a modified
version of the reproduced to check for the issue.
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|
|
We need to expand the COREBASE variable, no idea how these tests were
previously working at all...
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The @ character is not escaped properly in too many places within the system
to easily support it so add the character to the list of blacklisted characters.
Also tweak the other messages and ensure that all appropriate error messages
are disabled in one go.
[YOCTO #4772]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
I started trying to make some changes in sanity.bbclass and couldn't stand
the current code. This patch splits out the one big function into a number
of smaller units and adds a status class which handles queuing of messages
and issues like network errors and whether a reparse is required. It also
cleans up some syntax and obsolete code.
The other fundamental change is the tests are split into ones which run
once and those which run at every build. This was always the way the
class was intended to work but that got lost somewhere along the way.
This patch fixes that.
Its still far from perfect but it is hopefully an improvement
and sets the scene for other improvements to be built on top of this.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
We once needed to do this, things seem to work fine without this now,
thankfully.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Now that bitbake supports masking events for event handlers, lets use
this so event handlers are only called for events they care about. This
lets us simplify the code indentation a bit at least as well as mildly
improving the event handling performance.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
We're finding bugs in python 2.6 and starting to require unittest
functionality in python 2.7.x. Its time to bump the minimum version
requirement. Anyone without python 2.7.x can use the buildtools-tarball
out to install a standalone python/git/tar setup which will work
with the system.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Migrate tests for correct git and tar versions from the wrapper script
to the sanity class.
This sets the scene to allow us to remove the bitbake wrapper script.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
A non-zero status from the march test for gcc means that the "march" flag
is needed. Correct the logic to return True in this case.
Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Components of the Standard Library should be available. Add a sanity
check for xml.parsers.expat; we might add more in the future.
[YOCTO #4424]
Signed-off-by: Jesse Zhang <sen.zhang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The tuning changes to sanity.bbclass were almost right, but one of
the messages had a %s with no % operator.
Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
|
|
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
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
I mistakenly thought subprocess had getcmdstatus in python 2. It doesn't so lets
add a wrapper and have this work in both worlds.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The commands module is removed in python3. Use the subprocess module instead
and the pipes module to replace the mkargs usage.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
In python 3 print is a function call. In some cases bb.note is a more
appropriate call to make.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
file() syntax is removed in python 3, use open() instead.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Update older code to use modern exception handling syntax which
is the form accepted by python 3.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Fix the fairly long-standing problem of treating a newer bblayers.conf
in the same manner as an older one (reporting that it had been updated
even if nothing was done). The recent work to do a reparse without
having to manually re-run bitbake turned this from an annoyance into an
endless loop, so it had to be fixed.
As part of fixing this the following changes have been made:
* Extensions are now implemented using a function list, so distro layers
can add their own functions which should either succeed (indicating
they have successfully updated the file) or raise an exception
(indicating nothing could be done). The functions are called in
succession until one succeeds, at which point we reparse.
* If we can't do the update, the error message now says "older/newer"
instead of just "older" since we only know the version is different.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
1. check if gcc_test is really generate before os.remove("gcc_test") to avoid
following error:
ERROR: Execution of event handler 'check_sanity_eventhandler' failed
Traceback (most recent call last):
File "check_sanity_eventhandler(e)", line 4, in check_sanity_eventhandler(e=<bb.event.ConfigParsed object at 0x3151450>)
File "sanity.bbclass", line 107, in check_sanity(sanity_data=<bb.data_smart.DataSmart object at 0x11ba110>)
File "sanity.bbclass", line 22, in check_gcc_march(sanity_data=<bb.data_smart.DataSmart object at 0x11ba110>)
OSError: [Errno 2] No such file or directory: 'gcc_test'
2. set result to False when build failed with -march=native to ensure
-march=native is appended to BUILD_CFLAGS when host gcc really supports this flag,
otherwise following error appears when build native packages.
| cap_text.c:1: error: bad value (native) for -march= switch
| cap_text.c:1: error: bad value (native) for -mtune= switch
Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
1, There are a set of GCC built-in functions for atomic memory access. The
definition given in the Intel documentation allows only for the use of the
types int, long, long long as well as their unsigned counterparts. GCC will
allow any integral scalar or pointer type that is 1, 2, 4, 8 or 16 bytes in
length, suffix `_n' where n is the size of the data type.Such as:
__sync_fetch_and_add_n
__sync_fetch_and_sub_n
__sync_fetch_and_or_n
__sync_fetch_and_and_n
__sync_fetch_and_xor_n
__sync_fetch_and_nand_n
The above builtins are intended to be compatible with those described in the
Intel Itanium Processor-specific Application Binary Interface, section 7.4.
2, The glib-2.0-native and qemu-native invoke the above builtin function with
suffix `_4', and glib-2.0-native uses __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 to
test the existance.
3, Not all above builtin functions are supported by all target processors.Such
as i386 does not support the functions with suffix `_4', but i486 or later
support.
4, Prior to GCC 4.5, on the Intel's processor, the default arch is i386 unless
GCC is built with the --with-arch switch. Since GCC 4.5 the default arch is
implied by the target.
5, If your host GCC is older than 4.5 and it is built without the --with-arch
switch, when you use the GCC to compile target, you should specify -march to
tell GCC what the target's arch is, otherwise i386 is used as default.
Above all, when use older GCC to compile glib-2.0-native or glib-2.0-native,
and the GCC incorrectly uses i386 as default, the above builtin function
with suffix `_4' is not referenced. We should have a check in sanity.bbclass
to tell the user if necessary to add march to BUILD_CFLAGS in this situation.
http://gcc.gnu.org/onlinedocs/gcc-4.7.2/gcc/_005f_005fsync-Builtins.html#_005f_005fsync-Builtins
http://gcc.gnu.org/ml/gcc-help/2009-06/msg00037.html
http://gcc.gnu.org/gcc-4.5/changes.html
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47460
http://llvm.org/bugs/show_bug.cgi?id=11174
http://download.intel.com/design/itanium/downloads/245370.pdf
[YOCTO #3563]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|
|
* even when /etc/redhat-release or /etc/SuSE-release exists
* don't read /etc/lsb-release manually, NATIVELSBSTRING is not
reading it too
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
* distro_identifier returns lsb_data['Distributor ID']-lsb_data['Release']
which in some cases is different then lsb_release -d -s, e.g.
Distributor ID: Ubuntu
Description: Ubuntu 12.04 LTS
Release: 12.04
Codename: precise
But we probably don't need to sanity list each point release in LTS
and sstate is already using distro_identifier as prefix for native
sstate archives
* This will need update to SANITY_TESTED_DISTROS (at least
s/Ubuntu 12.04 LTS/Ubuntu-12.04/g etc), that's why sending as RFC
first.
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|
|
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>
|
|
When bblayers.conf is updated(when sanity check is running), it should
tell to bitbake to reparse configuration files. I will send a patch to
bitbake-devel, with the actions needed in bitbake and hob.
[YOCTO #3213]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|
|
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This avoids tracebacks from bitbake if the directory doesn't already
exist.
[YOCTO #3640]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
- skip the non-packagegroup allarch recipes in multilib_virtclass_handler
- extend PROVIDES/RPROVIDES for allarch recipes which are not packagegroups
- use variants from MULTILIB_GLOBAL_VARIANTS (lib32 lib64 libx32) to create
additional pkgdata files for multilib allarch: ${pkgdatadir}/${variant}-${PN}
and ${pkgdatadir}/runtime/${variant}-${pkg}
- use variants from MULTILIB_VARIANTS to create additional pkgdata files
for multilib kernel/module-base recipes
- add a sanity check to determine if the current multilib is in
MULTILIB_GLOBAL_VARIANTS
[YOCTO #2918]
[YOCTO #3440]
[YOCTO #3565]
[YOCTO #3568]
Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|
|
directories for WORKDIR and STAMP
This means some of the hacks we have to tell where the package name ends and
the version starts in the directory layout becomes obsolete, simplifying the
work of some of the cleanup scripts. It also makes the layout slightly more
intuitive to the user.
It does force a rebuild onto the user but it will reuse sstate successfully.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The network tests in sanity.bbclass can now be trigerred explicitly
by firing the NetworkTest event. This is part of the fix for bug #3026.
[YOCTO #3026]
Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The test for network error in sanity.bbclass was negated.
Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
If we fail a network test, a special flag is set in the SanityChekFailed
event. This helps Hob identify the network error properly and display
a special message to the user.
[YOCTO #3025]
Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|
|
- add check_bblayers_conf bitbake function which does the bblayers.conf
v4 -> v5 update if necessary (every layer should make its specific
bblayers.conf upgrades appending to the check_bblayers_conf function)
- we ask the user to re-run bitbake because we can't trigger reparsing
without being invasive
[YOCTO #3082]
Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|
|
We can now rely upon the minimum BitBake version having the
SanityCheckFailed event, so remove the code to handle if this is not
there.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|
|
If there is no valid machine configuration it's almost guaranteed that
the tune checks will fail, so just suppress them in that case.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|
|
If we don't do this, users can get extremely confused errors since the sanity tests
happen too late (after parsing) and don't see the warnings.
Also cleanup messages about merging configuration file changes to give better
hints at where the updated files may be.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
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.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
texi2html is not actually required to build world of OE-Core anymore,
so we don't need to mandate it. The only difference without it (verified
with buildhistory) is that groff doesn't produce HTML documentation; the
rest of its docs are still produced and packaged and no other packages
are affected.
Part of the work towards [YOCTO #2423].
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Many people don't understand the nuances of PATH/BBPATH, so help them by clarifying
the warning and displaying the parsed list element-by-element.
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The bb and os modules are always imported so having these extra import calls
are a waste of space/execution time. They also set a bad example for people
copy and pasting code so clean them up.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Many people don't understand the nuances of PATH, so help them by clarifying
the warning and displaying the parsed PATH element-by-element.
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Originally, git was something new, not installed everywhere and had commandline
stability problems. This has changed and git it no longer makes sense to
continually build this when the system installed version is likely sufficient.
This speeds up build since recipes no longer have to wait for git-native to build
if they're fetched from a git:// SRC_URI.
Also add git to the sanity checks and drop the no unneeded svn reference.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
There will be errors when the length of the tmpdir is longer than 410:
1) Longer than 420:
Can't exec "/bin/sh": Argument list too long at /usr/lib/perl/5.10/IO/File.pm line 66.
This error happens on both Ubuntu 10.04 and 10.10 when the pkg needs run
"autoreconf", this is because it passes many files with absolute path to
aclocal, aclocal passes them to perl, this is a limitation of the perl
on Ubuntu 10.04 and 10.10, and the perl-native is not ready at this very
early stage.
2) Longer than 490:
bitbake/lib/bb/persist_data.py", line 197, in connect(database=...)
> return sqlite3.connect(database, timeout=5, isolation_level=None)
OperationalError: unable to open database file
This error happens on Ubuntu 10.04, 10.10 and Fedora 17. This is because
the length of the database in sqlite3 module (host's) can't be longer
than 490 (or little smaller). The python-native is not ready at this
very early stage.
The 2 errors are host related, I think that limit the length of the
TMPDIR to 410 is OK for most of the build, rarely build sets TMPDIR's
longer than 410.
[YOCTO #2434]
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
|
|
If BBPATH references the working directory, the user is warned and asked
to fix the problem.
[Yocto #1465]
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
In order to show a friendlier error message within Hob that does not
bury the actual sanity error in our typical preamble about disabling
sanity checks, use a separate event to indicate that sanity checks
failed.
This change is intended to work together with the related change to
BitBake, however it has a check to ensure that it does not fail with
older versions that do not include that change.
Fixes [YOCTO #2336].
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The variable name has been typo'd as TARGE_ARCH since it was introduced
some time ago, so the check has never worked. Fixing the typo shows that
the test is not quite functional, so let's just remove it:
http://lists.linuxtogo.org/pipermail/openembedded-core/2011-October/010613.html
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
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]
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This enables a user to use bitbake -e even when the sanity checks are
failing.
Signed-off-by: Joshua Lock <josh@linux.intel.com>
|