Commit Graph

232 Commits

Author SHA1 Message Date
Stefan Stanacar e678a4552a oeqa/utils/sshcontrol: increase and log timeout in output
Increase a bit the timeout for ssh commands and also
write in the output that the command timed out (it's
easier to see that in a test fail than checking the ssh log)

(From OE-Core rev: 652a1762c8adc3b8cb1c6db2ee4a5234a7436c8d)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-03 10:33:02 +01:00
Andre McCurdy cc94000792 lib/oe/terminal.py: add support for MATE desktop terminals
A simple clone of the corresponding Gnome class. Without this, devshell
fails completely on a default installation of MATE desktop Linux Mint 15.

(From OE-Core rev: 8cc078a9c679845464c59028f584d7aba098cc1f)

Signed-off-by: Andre McCurdy <andre.mccurdy@entropic.com>
Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-31 06:59:55 +01:00
Stefan Stanacar 3dee534f1e lib/oeqa: fix dependecy check
Adds missing skip for smart test and fix the check (which I somehow broke
a while ago).

(From OE-Core rev: cf1790d992f067be8d5f9894458f55f6f1bdc61f)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-16 10:04:17 +01:00
Stefan Stanacar 656a8b97c1 testimage.bbclass, lib/oeqa: add headers and comments
Adds some comments to testimage.bbclass and the files it calls,
just to give an ideea of what it does.

(From OE-Core rev: 8bbb7116cf02466dfc59a17dc7bb51287aeea55b)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-16 10:04:17 +01:00
Stefan Stanacar 655da29dac classes/testimage.bbclass: use a copy of rootfs for tests
Make a copy of the rootfs and test that.
We can now drop the snapshot option.

(From OE-Core rev: ba58f1fe8fb7a0e3ff9320dfc108235d484da6a1)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-16 10:04:16 +01:00
Alexandru Palalau 2079a30b1f lib/oeqa/runtime: add tests for syslog and df
Add tests for free space and syslog.

Changed in v2:
    - limit df's output to /
    - syslog: fix restart in case of systemd

(From OE-Core rev: 1b39d57e7b5c9b69d565cf4d188ebc2f14e66ae6)

Signed-off-by: Alexandru Palalau <alexandru.palalau@intel.com>
Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-16 10:04:16 +01:00
Stefan Stanacar 7f57d3c524 lib/oeqa/oetest.py: provide a ps command for all tests
Many tests will use 'ps' but we need to know if it's busybox
or standard ps.
Drop the existing check from the connman test.

(From OE-Core rev: 1515d33d2c5b7275a3ac20e07c1db1d8273de796)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-16 10:04:16 +01:00
Stefan Stanacar b69f91f786 lib/oeqa/runtime/multilib.py: use readelf instead of file
file was pulled by rpm in sato images, readelf comes with binutils
so it's in ipk/deb too.
Also the test was looking at connmand instead of connman-applet
(which is what the testcase says and the AB nightly-multilib target installs)

(From OE-Core rev: c2c47a002996b8dbcf9b311dff677202b1f11a64)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-16 10:04:15 +01:00
Stefan Stanacar 9c4a02b6c6 testimage.bbclass, lib/oeqa/utils/qemurunner.py: make boot timeout configurable and increase it
On a loaded host (such as an AB setup where multiple builds run)
the 200 seconds timeout might not be enough to reach the login prompt.
Also make it configurable so we can set it from local.conf/auto.conf

(From OE-Core rev: e828571683333e6f18ed56a84e114b5e54975bc7)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-16 10:04:15 +01:00
Stefan Stanacar 1552f33a3e lib/oeqa/utils/sshcontrol.py: fix passing command to subprocess
Don't use shlex.split in subprocess call and also prepend
. /etc/profile, because PATH over ssh is always
/usr/bin:/bin which isn't what many tests expect.

Changed in v2:
 We now need to use a separate call for scp command.

(From OE-Core rev: 1988de2fad86e8e34070ed6573a7be09fff5c0a2)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-16 10:04:15 +01:00
Stefan Stanacar 46d3bb502f lib/oeqa/runtime/dmesg.py: whitelist dmesg message for systemd net interface name
Messages such as:
"systemd-udevd[79]: error changing net interface name eth0 to enp0s3: Device or resource busy"
are harmless as systemd can't rename interfaces in qemu (the interface is already active).
Alternatively, passing net.ifnames=0 to the kernel will stop systemd renaming the interfaces.

(From OE-Core rev: c072fed6531f2ce3c687f8342a97f593ebf37653)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-16 10:04:15 +01:00
Stefan Stanacar 4285e856aa lib/oeqa/runtime: add gcc test
gcc compile test and support files.

(From OE-Core rev: ccbce75335971abf5098a492755e92ca60cf67bd)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-09 10:53:45 +01:00
Stefan Stanacar 06d6f9d52e lib/oeqa/runtime: image sanity tests
These are basic sanity tests. A test can be force run by setting
TEST_SUITES = "ping ssh <module-name>" in local.conf.
By default there are suites for minimal, sato and sato-sdk images.

(From OE-Core rev: dd3dc2804395f050df74fa936e65ce5e911442eb)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Radu Moisan <radu.moisan@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-09 10:53:45 +01:00
Radu Moisan 54f3848397 lib/oeqa/utils/decorators.py: decorators for test methods
Some skip decorators meant only for test methods, providing
some kind of test methods dependency.
They are used together with a test method name not a condition.
These are complementary to python's unittest skip decorators.

(From OE-Core rev: 79cb89648702aa80ec986e0026c62948de905b87)

Signed-off-by: Radu Moisan <radu.moisan@intel.com>
Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-09 10:53:45 +01:00
Radu Moisan 88a6eb8027 lib/oeqa/utils/qemurunner.py: class to handle qemu instance
Handles qemu instances (launch, kill, restart, serial connection, logging)
Launch is blocking until login prompt and returns to the task. A qemu
serial connection is used to save the boot log and get the ip from the image.
Changed runqemu script not to error out when using custom serial option.

(From OE-Core rev: ee7d64dfcc02ba8f568b17d181e0a58d3c810076)

Signed-off-by: Radu Moisan <radu.moisan@intel.com>
Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-09 10:53:45 +01:00
Stefan Stanacar 962c0a1fc0 lib/oeqa/utils/oeqemuconsole.py: handle qemu serial console connection
Python's telnetlib Telnet class connects only to AF_INET sockets, but we
want to use Unix domain socket for the qemu serial connection, so that's
why we override it.
Also we add a new read_all_timeout method similar to Telnet's read_all,
that read until a match or timeout and logs all output.

(From OE-Core rev: 1cfec2f0a1a1ee84cc6b2b6ad890688da85c5e81)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-09 10:53:44 +01:00
Stefan Stanacar ac341af8fa lib/oeqa/utils/sshcontrol.py: helper module for running remote commands
Provides a class for setting up ssh connections,
running commands and copying files to/from a target.

(From OE-Core rev: 683cac9768e0d38fa15ddc5451e6b2333f184033)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-09 10:53:44 +01:00
Stefan Stanacar 12bf6262f6 lib/oeqa/oetest.py: base module for all runtime unittests
This module contains the base class for all runtime tests
and some helper methods.

(From OE-Core rev: 7765c27705e90381975fb2b89ea2181287517761)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Radu Moisan <radu.moisan@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-09 10:53:43 +01:00
Tyler Hall 85186302de TmuxRunning: handle multi-word commands
Just as in f8ed7446755eeb88191e16749350efa1e7e6197c, tmux wants a single
argument for its command. This applies to the "split-window" command as
well as "new."

Note that this alone is not enough to fix the TmuxRunning devshell when
using pseudo because tmux does not preserve the environment that pseudo
requires.

(From OE-Core rev: 36fb9799d6a449d86acca3be354af56ad87c3151)

Signed-off-by: Tyler Hall <tylerwhall@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-02 22:23:51 +01:00
Paul Eggleton 785b49e5c2 lib/oe/lsb.py: fall back to /etc/os-release for host distro ID
The new standard for host distribution identification [1] is
/etc/os-release, and a number of newer distributions provide this file,
so add support for this in order to pick up more distributions.
Additionally, handle "rolling release" style distributions that don't
report a version number, e.g. Arch Linux.

With this change we can identify the most common distributions, so this
should satisfy [YOCTO #4271]. Note that this doesn't imply support for
these distros as build hosts, just that we can identify them.

[1] http://www.freedesktop.org/software/systemd/man/os-release.html

(From OE-Core rev: bff50b747cde04007ead65dde4207b16a8e1bf08)

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>
2013-07-02 22:23:48 +01:00
Peter Seebach 1f99e74e00 handle two-word commands with tmux
Trying to make a devshell using tmux can fail because "tmux new"
expects a single command, not a series of arguments. It does, however,
split strings in a suitable way. So you can quote the command.

The failure mode is particularly arcane, in that you end up
with a message like:

	ERROR: Unable to spawn terminal auto: \
	Execution of 'pseudo /bin/bash' failed with exit code 1:
	usage: new-session [-d] [-n window-name] [-s session-name] \
	[-t target-session] [command]

which is confusing because there's no "new-session" anywhere in
sight (that's actually "tmux new"), and because what failed to execute
wasn't either pseudo or bash.

(From OE-Core rev: f8ed7446755eeb88191e16749350efa1e7e6197c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-11 15:55:58 +01:00
Ross Burton 81c378287b test_utils: import functions directly for conciseness
(From OE-Core rev: 2a147008cf81838cfc569640a30df0c1bfd74e08)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-07 16:48:25 +01:00
Ross Burton a32d16cb29 test-utils: handle import bb failing and skip the test
Instead of reporting an error when bb cannot be imported, skip the test
instead. This makes it a lot easier to iterate a test suite when we don't care
about this particular test.

(From OE-Core rev: c4a5bd810ca92d57c334113c528bd1d233b3eac4)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-07 16:48:24 +01:00
Ross Burton fcfba0ddd9 utils: add trim_version() function
Add a helper function that returns just the first <num_parts> of <version>,
split by periods.  For example, trim_version("1.2.3", 2) will return "1.2".

This should help reduce the spread of numerous copies of this idea across
classes and recipes.

(From OE-Core rev: 17a12e3c62807a7d60fcbf0aa4fd9cf4a739a204)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-30 20:59:09 +01:00
Robert Yang 941584f539 cachedpath.py: global name 'error' is not defined
The error is not global since we don't use "from os import *", so it
should be os.error.

[YOCTO #4489]

(From OE-Core rev: ac0e2781c2723257bd380cac170d4c8b97e36747)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-15 19:27:11 +03:00
Paul Eggleton e42f0acf46 classes/buildhistory: track contents of selected files in images
Add a BUILDHISTORY_IMAGE_FILES variable specifying a space-separated
list of files within an image to copy into buildhistory, so that changes
to them can be tracked. Typically this would be used for configuration
files, and by default this includes /etc/passwd and /etc/group, but the
user is free to extend this list by setting the variable in local.conf.

Implements [YOCTO #4154].

(From OE-Core rev: ed6bb6e3db518082d3a9c45d548bc1339be2c5ca)

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 b54339d633 classes/lib: Fix getcmdstatus breakage
I mistakenly thought subprocess had getcmdstatus in python 2. It doesn't so lets
add a wrapper and have this work in both worlds.

(From OE-Core rev: 2253e9f12734c6e6aa489942b5e4628eca1fa29d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 16:05:08 +01:00
Richard Purdie 534325fd1f image/kernel-module-split/eglibc-ld.inc: Remove has_key() usage
The has_key() attribute has been removed in python 3 since there is better
syntax available. Use the improved syntax.

(From OE-Core rev: 3dff13793e875ff58cc38c4a960caca9b6969843)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 14:06:51 +01:00
Richard Purdie e16faa55da sanity/patch.py: Remove commands module usage
The commands module is removed in python3. Use the subprocess module instead
and the pipes module to replace the mkargs usage.

(From OE-Core rev: e2e1dcd74bc45381baccf507c0309dd792229afe)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 14:06:51 +01:00
Richard Purdie feeffdb5b6 meta/lib/oe: Replace StandardError with Exception
StandardError is removed in python3, replace with Exception class instead.

(From OE-Core rev: a37ae30b9766df346ca57755530024a0b7d5f86b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 14:06:51 +01:00
Richard Purdie 3512f797f9 classes/lib: Update to use print as a function call
In python 3 print is a function call. In some cases bb.note is a more
appropriate call to make.

(From OE-Core rev: 754874e68d1037c76fc4cc7d35d3fa12946d00f8)

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
Richard Purdie 2ac4f8b397 clases/lib: Use modern exception syntax
Update older code to use modern exception handling syntax which
is the form accepted by python 3.

(From OE-Core rev: b010501cd089e649a68f683be0cf4d0aac90fbe3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 14:06:50 +01:00
Richard Purdie 61823f6194 path.py: Deal with race issue
The change to use copyhardlinktree in some of the sstate code instead of
copytree exposed a race condition. This is due to cp failing if it finds
a directory doesn't exist yet some other process creates it while cp was
trying to create it itself. tar doesn't error in this case.

To fix this we need to create the directory structure with tar, then
use cp to hardlink the files. Messy but probably worth doing.

I also took the opportunity to remove src_bak since the code is neater
without it.

(From OE-Core rev: 2f954a9a6932f1e6c564e7e7aacaac628a75eed7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-03 16:19:19 +01:00
Robert Yang c51e8b4532 sstate.bbclass: make hard links for staging files
Make hard links for staging files instead of copy to save the disk space
(3G will be saved for a core-image-sato build), and it doesn't affect
much on the build time.

The following directories are affected:
1) The sysroot
2) The DEPLOY_DIR
3) The pkgdata

[YOCTO #4372]

(From OE-Core rev: 5853e0f482b22258c909268fe71673a29e31989b)

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-02 17:41:53 +01:00
Christopher Larson d61d0a1fc8 oe.terminal: add tmux classes
This adds two new Terminal classes. It's separated into two, so that opening
a split inside a tmux window is preferred to the other terminal types, but
opening a tmux session is prioritized only slightly higher than screen.

- tmuxrunning: Open a new pane in the current running tmux window. Requires
  that the TMUX variable be added to the env whitelist to use it.
- tmux: Open a new tmux session

(From OE-Core rev: 10f64d202ceb230c3c79e09dce182ffce94d1117)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-15 15:57:29 +01:00
Paul Eggleton 9e9ea0a40a lib/oe/classextend.py: avoid extending any kernel package
For multilib and other uses of classextend, we don't want any
dependencies on kernel packages to be extended since there should only
be one kernel variant.

Fixes [YOCTO #2918] (where kernel-dev was being extended.)

(From OE-Core rev: b684c0f0d5d93f5147dee79951647eb3ddf4c840)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-05 17:36:34 +01:00
Ross Burton 0e904db7da utils: add helper to get all non-system packages
For example if PACKAGES is "foo foo-data foo-dev foo-doc", this will return
"foo-data".

(From OE-Core rev: 3115187e468398a8c1edaf3e5369a2d10fb112f4)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-04 23:52:21 +01:00
Christopher Larson 59e425455f oe.terminal: add tmux classes
This adds two new Terminal classes. It's separated into two, so that opening
a split inside a tmux window is preferred to the other terminal types, but
opening a tmux session is prioritized only slightly higher than screen.

- tmuxrunning: Open a new pane in the current running tmux window. Requires
  that the TMUX variable be added to the env whitelist to use it.
- tmux: Open a new tmux session

(From OE-Core rev: 31c58d584f838738a6b6258b87b1c7e6ca173086)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-04 23:52:21 +01:00
Cristian Iorga e9866ee0ff meta/lib/oe/lsb.py: extract only the needed info from lsb-release
Instead of running lsb_release -a, a lsb_release -ir will be run.
This will prevent issue with distros that don't have all the needed
info in /etc/lsb-release file, in which case lsb_release won't generate
an error code.

Partial fix for [YOCTO #4071]

(From OE-Core rev: 79a2252545ab50c79e00e02c328191c1163f917d)

Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-30 09:08:11 +00:00
Cristian Iorga bacdb99a42 meta/lib/oe/lsb.py: fix data extraction from /etc/lsb-release
In some cases, /etc/lsb-release file is used to extract
info about poky build host machine. But the strings are
not stripped of end of line special characters. As such,
when this info is concatenated and used as a directory
entry in sstate_cache, this is an issue.
Usually, this issue is masked by the fact that distro
related info is extracted from the output of lsb_release
command. In case of Yocto Linux, running "lsb_release -a"
will give an error code because CODENAME info is not present.
As such, bitbake will extract the info from /etc/lsb-release,
running into the above issue.
Consequence is that building under BA will crash.

Partial fix for [YOCTO #4071]

(From OE-Core rev: 5d0839bef631dceb4395fcf204779a76966a1061)

Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-29 09:37:38 +00:00
Richard Purdie add11fa1ab package: Add cachedpath optimisation
Currently, various standard library operations like os.walk(),
os.path.isdir() and os.path.islink() each call stat or lstat which
involves a syscall into the kernel. There is no caching since they could
conceivably have changed on disk. The result is that for something like
the do_package task of the kernel we're spending over two minutes making
868,000 individual stat calls for 23,000 files. This is suboptimal.

This patch adds lib/oe/cachedpath.py which are a set of replacement
functions for these operations which use cached stat data rather than
hitting the kernel each time. It gives a nice performance improvement
halving the build time of the kernel do_package.

(From OE-Core rev: 556dee0c4d6d8a87c0cddbd2f60fe5917d009f18)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-18 21:26:40 +00:00
Paul Eggleton 062a5f6c69 lib/oe/lsb: enable getting distro ID when lsb_release is not installed
If lsb_release is not installed (as it may not be on headless/minimal
installations on distros whose LSB package has a long list of
dependencies) we need to gather the information directly from files in
/etc.

Fixes [YOCTO #4012].

(From OE-Core rev: 106a7bcdb5ad9956f1d78f508408bfbcf7ff5120)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-14 16:37:09 +00:00
Ross Burton 0aad8decf0 base.bbclass: don't backfill features that already exist
It's too easy to cause rebuilds because the DISTRO_FEATURES have changed in
meaningless ways (such as re-ordering or duplicate items).  Help stop this by
checking if the feature to be back-filled is already present.

(From OE-Core rev: 63c7192119d54b92d908441109ed4e4fff761cba)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-10 04:36:52 +00:00
Anders Roxell 02d2a5e68c distro_check: Remove creation of empty Meego filelist.
This fixes permissions errors when running distrodata.

(From OE-Core rev: c58e6cf352774e147038e6543ac95ab0060f2327)

Signed-off-by: Anders Roxell <anders.roxell@enea.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-12 13:22:44 +00:00
Enrico Scholz 8c22531e49 lib/oe/path.py: support missing directory components in realpath()
Some use cases in OE operate on symlinks which dangling path components.
Assume that these are directories instead of raising ENOENT.

(From OE-Core rev: a96e2c84f24c15b77ee1fbc1f998b8b4796b8664)

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-11 22:45:25 +00:00
Enrico Scholz 21b6ff9bc3 lib: implemented oe.path.realpath()
Various parts of the buildsystem have to work with symlinks. Resolving
them is not trivial because they are always relative to a sysroot
directory.

Patch adds a function which returns the destination of a symlink by
assuming a given path as the / toplevel directory.  A testsuite was
added too.

(From OE-Core rev: 76e0bd7f8e3a3bd052a6e329f88e2d8099e899c4)

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-11 14:46:11 +00:00
Paul Eggleton 98755bd799 buildhistory_analysis: handle more R* variables
Report changes to RPROVIDES, RREPLACES, and RCONFLICTS. As RSUGGESTS
isn't widely used and isn't of huge concern if it changes, it is not
reported by default.

Implements [YOCTO #3391].

(From OE-Core rev: d20011571db96da79a8a0e056c6cef8e4c083608)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-11 14:46:10 +00:00
Richard Purdie b34fd60d8f package: Process package stripping in parallel
(From OE-Core rev: 981fed49ee80560fb067b3f47aeada1fdee792ca)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06 13:12:59 +00:00
Richard Purdie d81aa06ece package.bbclass: Multithread per file dependency generation code
(From OE-Core rev: b659eb0f2070149d9516c129b3853b41fbbd1033)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06 13:12:59 +00:00
Richard Purdie dd61d22584 sstate/path.py: Add copyhardlinktree() function and use for performance optimisation
Add a function which copys a tree as a set of hardlinks to the original
files, then use this in sstate to reduce some of the overhead of sstate
package creation since the file isn't actually copied.

(From OE-Core rev: 8e373e69acac853213a62afb8bbdf0adc0c5045a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06 13:12:59 +00:00
Constantin Musca 10f05d5b58 classextend.py: use explode_dep_versions2 in order to preserve versions too
(From OE-Core rev: a5136a9bf70f3a6d7d0b599678cb901c8e45c7f7)

Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06 09:37:26 +00:00
Bruce Ashfield 12e76e123f multilib: skip packages that provide virtual/kernel
Rather than keying on recipes that inherit kernel.bbclass, we should
be checking for providers of virtual/kernel when skipping kernel
recipes in multlib builds.

Not all providers of virtual/kernel inherit kernel.bbclass (notably
linux-dummy), so checking on the provider is a more complete check.

We need to be sure to check for inheritance of module-base as well, this
allows for packages that provides modules to avoid the multilib renaming.

(From OE-Core rev: dc7d181ab03ceab87a24d932130109003334dbf8)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-01 15:54:00 +00:00
Martin Jansa 2f1aba504c prservice.py: fix NameError: global name 'host' is not defined
* http://git.openembedded.org/openembedded-core/commit/?id=e00f49de8b1f79c3e07b887d257bd75a46052fa0
  removed host and port variables

(From OE-Core rev: 494439c95d33b2ad457cc205413680b0bf176560)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-25 14:12:36 +00:00
Constantin Musca 8aa508970a prserv: change PRSERV_HOST semantics
- remove PRSERV_PORT variable
- use 'hostname:port' as PRSERV_HOST format
- remove USE_PR_SERV variable
- one can activate PRS by setting PRSERV_HOST

[YOCTO #3744]

(From OE-Core rev: e00f49de8b1f79c3e07b887d257bd75a46052fa0)

Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-25 12:42:43 +00:00
Richard Purdie e651c1a109 lib/oe/patch: Use force option when creating symlinks to patches
Under the scenario where you have an existing source tree and you then
change one of the patches, maybe to be architecture or machine specific,
then rebuild, the build will fail since the symlink already exists
but should now point at a different file.

The easiest fix is to tell the system to remove and recreate the link
which is done with the force option.

(From OE-Core rev: 4741b90b170bc96e3a24f9c1dce871af060bc4d5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-17 17:24:57 +00:00
Paul Eggleton b660a10e47 buildhistory_analysis: fix broken list length checks
Fix erroneous use of .count instead of len(), which unfortunately is not
reported by Python as an error in a numeric comparison.

(From OE-Core rev: 63fd76190f503660119dcc8efdcfc6fbff406c26)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-06 13:51:38 +00:00
Muhammad Shakeel ef05a7fe17 qa.py: Toolchain path should not be hardcoded to execute objdump
Currently objdump command is invoked from the STAGING_BINDIR_TOOLCHAIN
directory. In case of external toolchain if this directory doesn't
exist then objdump fails to execute. Instead of hardcoding the path
it should search PATH to find it.

(From OE-Core rev: a3a0e29d5d796fdf6755503cc31e45199b79d756)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Muhammad Shakeel <muhammad_shakeel@mentor.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-06 12:31:13 +00:00
Paul Eggleton 3e47343675 meta/lib/oe/sstatesig: fix locating stamp files
Fixes "bitbake-diffsigs -t" for changes to the stamp directory layout,
and this time uses the actual value of STAMP to get the location of
sigdata files in the stamp directory rather than trying to do it
manually, which should be a little more robust.

(From OE-Core rev: 82412ebabb0f89c694327ae38f7e864ee8511e7f)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-05 15:26:41 +00:00
Muhammad Shakeel fafc87112e qa.py: Modify the env for the child process only
Modified environment is only required for new subprocess to execute
objdump command and not for the current process. We should only
modify the copy of env to pass it on to the child.

(From OE-Core rev: cb3b046450b47739daf441a0b964823aff2472e6)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Muhammad Shakeel <muhammad_shakeel@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-04 18:02:00 +00:00
Richard Purdie 78983e939a lib/oe/classextend: Ensure we don't extend expressions more than once
We could end up with MLPREFIX being prepended to variables like
PACKAGE_DYNAMIC. This patch avoids the problem and unbreaks builds.

[YOCTO #3389]

(From OE-Core rev: 5e4714a454f9f742bf8af70dad2aa66ccb87e3fd)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-06 09:34:47 +01:00
Mihai Lindner b4e48cc66c distro_identifier: replace slash with hyphen
Use "-" instead of "/" in "n/a" strings ("Distributor ID" and/or
"Release"), provided by `lsb_release`.
This leads to directories and subdirectories created in ./sstate-cache/
e.g. Distro-n/a/ where "Distro-n" is dir and "a" is subdir.

(From OE-Core rev: c2a9f0c330f0da82792f87e3860b06c25b986983)

Signed-off-by: Mihai Lindner <mihaix.lindner@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-27 09:44:59 +01:00
Mark Hatle 7e2ff7c012 multilib - crosssdk: Stop building multilib for crosssdk packages
Crosssdk packages are not actually multilib packages, so treat them
the same as other nativesdk packages in the multilib, base, and
classextend components.

(From OE-Core rev: 15834451525453e0f7ceac25d4f98117f1825f37)

Signed-off-by: Mark Hatle <mark.hatle@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:55 +01:00
Mark Hatle ea22010560 multilib: Add support for cross-canadian multilib packages
Add support for the generation of cross-canadian packages.

Each cross-canadian package has:
 PN = "pkg-cross-canadian-${TRANSLATED_TARGET_ARCH}"

in order for that to be evaluated properly with multilibs enabled, it was
necessary to detect both the presence of the cross-canadian packages and
then update the vars using the OVERRIDE for the multilib.  Additional checks
were made to ensure that any dependency that sais "cross-canadian" did not
get prefixed with the MLPREFIX.

Also, make sure that even when building multilib cross-canadian packages,
we only use the single SDK PACKAGE_ARCH, we don't want or need variants.

(From OE-Core rev: 132a182e2f6c330aa645de42c1aeb386e43bddd3)

Signed-off-by: Mark Hatle <mark.hatle@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:54 +01:00
Morten Minde Neergaard c45a7d127e terminal: Add support for running custom terminals.
Example config:
OE_TERMINAL = "custom"
OE_TERMINAL_CUSTOMCMD = "mysuperterm"

(From OE-Core rev: c76da87511d2668479745c2f18b8a9b8116c7489)

Signed-off-by: Morten Minde Neergaard <mneergaa@cisco.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-24 12:50:46 +01:00
Richard Purdie c4c37bcf1d multilib/clsextend: Improve handling of regexps in PACKAGES_DYNAMIC
Now that PACKAGES_DYNAMIC is more standardised, starting with ^ anchors,
the variable manipulations performed by clsextend for multilib don't work.

This patch at least improves it to hack around the problem and enable
mulitlib builds to work again. If this code doesn't do the right thing, the
recipe is free to override the variable with the correct multilib case.

(From OE-Core rev: 593faec6e0155bdd7a43ee84c24de8ee20287681)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-22 14:59:29 +01:00
Richard Purdie 9da9e5d8ae lib/oe/packagedata: Use the PKGMLTRIPLETS variable
(From OE-Core rev: 26e16a5e5ee1059fb8e55ab915ae9cb8e2b54dcd)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-22 09:47:46 +01:00
Phil Blundell f0a56f6d15 lib/oe/qa: Trap exceptions when running objdump
This avoids propagating a failure if we encounter an ELF file
that objdump can't parse for any reason.  Some versions and/or
configurations of objdump will refuse to read files for "the
wrong" architecture.

(From OE-Core rev: 11f5998e539f7b884ae1387252f8995b2dc7437f)

Signed-off-by: Phil Blundell <pb@pbcl.net>
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
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 09aaad16be distrodata: Update distrocheck functions
Fix the distro check functions for the change of nativesdk
being a suffix to a prefix. Also added crosssdk as another
case for converting to PN for matching in the distro_tracking

(From OE-Core rev: ae9dbd0e1e26ba2b35cbd08ec731aee62adedc23)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-03 17:37:33 +01:00
Paul Eggleton 3b664d0cfc buildhistory_analysis: update to use explode_dep_versions2()
Handle where multiple version specifications are present for the same
dependency.

(From OE-Core rev: 1600c916ae410c57a783a5aa35abe07a3f673311)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-03 17:18:29 +01:00
Richard Purdie 42e8c80567 packagedata/multilib: Fix search patch for multilib builds
The current multilib search path code for packagedata is flawed since it
doesn't correctly handle changes in the TARGET_VENDOR/TARGET_OS that
multilib may make. This patch enhances the code to correctly build the
search paths so multilib packagedata is found correctly.

(From OE-Core rev: f50c5d36b2da9b36d56d95a7d89404509a1a3e9b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-26 15:02:25 +01:00
Jason Wessel 86cf6daff9 terminal: Send LogExecTTY event to spawn screen
Bitbake has the ability to request to run a command
and if it is not possible fall back to emitting a
log message.  This can be used to start a screen
client automatically on the controling tty if
the UI has an interactive tty.

(From OE-Core rev: 39193bdce698b6339c3d7643eb3c1fcd2246fd56)

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-24 15:35:30 +01:00
Jason Wessel 6e0713a3e7 terminal: pass data store all the way through to terminal class
Passing the data store will be needed for firing a custom event
for the screen class.

(From OE-Core rev: 5ccff8d44626bfd3d1af2a7f81f0567997277809)

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-24 15:35:30 +01:00
Paul Eggleton 27f842eba5 lib/oe/sstatesig.py: add signature data query function
Add a function that can be used from BitBake code which will find
signature data (sigdata/siginfo) files based on specified criteria, and
hook it into BitBake as bb.siggen.find_siginfo.

(From OE-Core rev: 9f0453c29891e32f8038c4bbc22ada28bfbf818a)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-10 13:03: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
Richard Purdie 58a8a38aa2 nativesdk: Convert to use classextend.py
This patch converts the nativesdk class itself from operating as a suffix
to a prefix (see the proceeding patch for the related changes outside this
class).

The big benefit here is that we can reuse the generic class extension code.

(From OE-Core rev: f01f0b8aed25af889f48fe1afff96feb3d9ed120)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-02 05:52:05 -07:00
Jason Wessel 3405a8bbe4 terminal.py: use unique ids for screen sessions
When running multiple sets of builds on the same
system, it is hard to distinguish which build belongs
to which screen session and you can end up resuming
the wrong session.

The simple solution is to just append the process
id to the screen session invocation to make each
unique.

(From OE-Core rev: 1677b736bca5dc46db522da1874459d2de77209d)

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-25 14:47:01 +01:00
Andrei Gherzan 6bfb0c2d08 utils.py: Modify and rename distro_features_backfill python function
This function was written to be used with DISTRO_FEATURES. This behavior
is usefull with MACHINE_FEATURES as well.

(From OE-Core rev: 8ae08529e844c9e065c1d260535a777f85d8c6cc)

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-17 18:04:24 +01:00
Ross Burton a71dfcc338 buildhistory: reduce the numeric delta to 10%
(From OE-Core rev: f6effbf62351761430438cfcce285c982271239c)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-06 16:09:15 +01:00
Ross Burton 36c7c64519 buildhistory: correctly handle reductions of numeric fields
(From OE-Core rev: 94fffb92e6a7a8021fb1acb06b9c4218703e23b2)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-06 16:09:15 +01:00
Paul Eggleton 4bf1c0a7dc buildhistory_analysis: ignore removal of self-dependencies
The recent removal of self-dependencies for dbg/dev packages produced
a fair amount of noise, so filter it out since we know this is a
reasonable change.

(From OE-Core rev: 3ec608462e4cb1eb77b6addbae1bda84fd76e4d2)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-06 15:29:46 +01:00
Paul Eggleton 507dba64e0 buildhistory_analysis: tidy up duplicate split_version function
This function is now provided by bb.utils and since we have now bumped
the minimum bitbake version, we can switch to that one instead.

(From OE-Core rev: 67a4d15f0a8032190e92026677150162a492a053)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-06 15:29:46 +01:00
Paul Eggleton 81485a47d5 classes/buildhistory: record PKG/PKGE/PKGV/PKGR
Save PKG (the actual output package name, which is often different due
to debian renaming), and PKGE/PKGV/PKGR (which may be manipulated in
certain special cases e.g. gitpkgv.bbclass in meta-oe, the
external-sourcery-toolchain recipe, etc.) Note that these are only
written when they are different from the normal package name in the
case of PKG, or PE/PV/PR for the other variables.

Also, use PKGE/PKGV/PKGR instead of PE/PV/PR when comparing package
versions since these actually represent the version that the package
manager sees.

Implements [YOCTO #2787].

(From OE-Core rev: 65d7e9b2d4d8115ac9fd513c04f39a2df9556a5a)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-06 15:29:46 +01:00
Paul Eggleton c0149ac6c4 classes/buildhistory: save preinst/postinst/prerm/postrm
Write the value of these package script variables into the packageinfo
so that any changes to them can be tracked (in separate files since they
are multi-line).

Inspired by an earlier patch from Andreas Müller <schnitzeltony@googlemail.com>

(From OE-Core rev: 988a417c857c01c87de6ba9602968059cf8d830f)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-06 15:29:45 +01:00
Richard Purdie 4f31d21bcb lib/oe/lsb.py: Map unknown distributions to 'Unknown'
(From OE-Core rev: e12df2ca5c71ad672ebbfefbc47cabbac3333d61)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-31 08:02:11 +01:00
Richard Purdie f295e29b2e lib/oe/lsb: Add basic LSB functions
This code was written by Christopher Larson <chris_larson@mentor.com> and
allows generation of the LSB release data based upon the lsb_release
command. It also includes a helper function to generate a string
representing a given distribution.

(From OE-Core rev: 458bdfe1cc4872e901ea3c38f497bfea6cf4c8cb)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-28 09:20:52 +01:00
Paul Eggleton 66009e28ec meta/lib: remove test.py
This looks like it was added by accident in OE-Core revision
7903433898b4683a1c09cc9a6a379421bc9bbd58.

(From OE-Core rev: eb4d9b7348215a68b7933308d905e839d852a1d6)

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-07-26 14:55:21 +01:00
Richard Purdie 73cf0335c4 Remove a number of unneeded import os/bb calls
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.

(From OE-Core rev: 7d674820958be3a7051ea619effe1a6061d9cbe2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-19 12:24:50 +01:00
Jeffrey C Honig 76a16c0c11 terminal.py: Fix Xfce on ubuntu/debian; some cleanup
* Xfce class was setting and passing wrong variable for ubuntu/debian.
    * Xfce class was using -e instead of -x for passing command.  The former creates
      a shell escape nightmare
    * Clean up local and instance/class variables with same name but different usage.
    * Remove side-effect and directly return formatted command for clarity.

(From OE-Core rev: b2ee5c5e34cdc3d65ca7b5da3486360a74d6c500)

Signed-off-by: Jeffrey C Honig <jeffrey.honig@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-18 14:29:29 +01:00
Khem Raj 4240bd6824 lib/oe/sstatesig.py: Exclude git-native from sstate checksum
gcc exposed this issue where cross gcc recipes were not having
same task checksums as libgcc or gcc-runtime the target recipes
which use same shared workdir and it was triggering the unpack
fetch and patch tasks to reexecute and hence the trouble

Now that we have more than 1 package to consider lets combine
the check

Thanks RP for help and this is on the line of patch
793ce6cd9aa632e0f13789c8293770a86085d28d

(From OE-Core rev: 72cc3df204c4b838cc0358a7ac989adfdd5c1760)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-17 10:54:02 +01:00
Matthew McClintock 6a605120ca packagedata.py: Fix get_subpkgedata_fn for multilib
This happens when tryng to add libgcc-dev to as a multilib package
(e.g. IMAGE_INSTALL_append = " lib32-libgcc-dev")

| Processing task-core-boot...
| Processing fman-ucode...
| Processing dosfstools...
| Processing lib32-libgcc-dev...
| Unable to find package lib32-libgcc-dev (libgcc-dev)!
NOTE: package fsl-image-full-1.0-r1.1.3.6: task do_rootfs: Failed

RPM (or bitbake?) is looking in the tmp/pkgdata, however some of these file
paths are mungned for the multilib scenario:

$ find tmp/pkgdata/ | grep libgcc-dev$
tmp/pkgdata/ppce5500-fsl-linux/runtime/lib32-libgcc-dev
tmp/pkgdata/ppc64e5500-fsl-linux/runtime/libgcc-dev

This patch fixes where we look for these files so they can be found and
properly installed for the multilib root file system

(From OE-Core rev: 4e65ddda5d351bd9f2172e77e656903f61a52f34)

Signed-off-by: Matthew McClintock <msm@freescale.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-09 16:58:59 +01:00
Richard Purdie bf9a8ec7f2 lib/oe/sstatesig.py: Exclude subversion-native from sstate checksums
If we don't do this, target and cross recipes end up with different sstate
checksums for shared work directory tasks which is bad in the case of gcc.
It leads to multiple fetch/unpack tasks against the shared directory
which ends up with build failures/races.

(From OE-Core rev: 793ce6cd9aa632e0f13789c8293770a86085d28d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-05 12:36:45 +01:00
Paul Eggleton 1fe254f123 buildhistory_analysis: fix error when version specifier missing
Passing None to split_versions() will raise an exception, so check that
the version is specified before passing it in.

(From OE-Core rev: 90caa605bd24279e4a9204e279492754119a8a55)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-30 12:04:46 +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
Robert Yang c071fd9b85 oe/process.py: remove it since it is unused and duplicated
The meta/lib/oe/process.py is only used by oe_run and oe_popen in
meta/classes/utils.bbclass, and they will be removed, we have a better
one: bitbake/lib/bb/process.py, which can replace of it.

[YOCTO #2489]

(From OE-Core rev: d56062cbf92ef206bf06c767befacb66927a9a36)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-25 11:17:54 +01:00
Christopher Larson 0c7720027b oe.types: give the regex type more sane semantics
Currently, if a variable is unset or has an empty value, the regex type
will return a match object which always matches. Not all variable types
will necessarily have the same behavior for handling defaults. I believe
that returning a match object which matches nothing when a variable is
unset is superior to returning one which matches anything, and the user
can always explicitly request anything via '.*', if that's what they
want.

This constructs a null pattern object which will never match, and uses
it when encountering an unset or empty variable (currently, these two
things are one and the same, as maketype is handling the default. we may
well want to shift that logic into the individual types, giving them
more control over default behavior, but currently the behavior is at
least relatively consistent -- no difference between unset and empty
variables).

(From OE-Core rev: dc7e4a79d9a1884b4c5705ef3173613958204b50)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-17 21:13:08 +01:00
Eric Bénard 029f3c6dec license.py: fix behaviour of copyleft_compliance
actually if a package has a license in its LICENSE variable
which is not in the whitelist nor in the blacklist and even
if an other license in this variable is in the whitelist,
the package gets excluded and is not taken in account in the
copyleft_compliance.
This patch solves this by excluding a recipe _only_ if the
LICENSE variable includes a pattern from the blacklist and
including a recipe only if it includes a variable from the
whitelist _and_ none from the blacklist.

Example in busybox which has LICENSE="GPLv2 & BSD-4-Clause",
with the actual behaviour (where he blacklist contains only
CLOSED Proprietary) we get :
DEBUG: copyleft: busybox-1.19.4 is excluded: recipe has excluded licenses: BSD-4-Clause
which is not sane because busybox is covered by a copyleft license
which is GPLv2 and should match the default whitelist which is
GPL* LGPL*.

(From OE-Core rev: 987d06447d2eacf2e01f08e29469c00fbb0ef1db)

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-04 17:17:51 +01:00
Paul Eggleton 42c445bc04 buildhistory_analysis: avoid printing PE/PV/PR more than once
Don't print PE/PV/PR changes as related field changes of related field
changes (i.e. only print them once at the top level).

(From OE-Core rev: 33046605549501bed9ceff102614d86ba54a5891)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-21 15:33:07 +00:00