Commit Graph

3151 Commits

Author SHA1 Message Date
Alexandru DAMIAN 405c322c72 toaster.bbclass: fix crash on buildstats collection
Toaster needs buildstats to be enabled in order to
collect task statistics. The toaster.bbclass didn't
have a guard to stop task data collection if the buildstats
weren't enabled, leading to a crash.

This patch verifies that the task variables are defined before
trying to use them.

(From OE-Core rev: 7f2637ec8d1b8840c31255572b5cb058777382e7)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-21 17:22:38 +00:00
Paul Eggleton 63fb3587fc classes/insane: restore printing LIC_FILES_CHKSUM checksum if not specified
OE-Core rev ec8590aa81e201e28e500935d31cd7266114471f (by me)
unintentionally disabled printing the actual checksum value if no
checksum was specified, i.e.:

LIC_FILES_CHKSUM = "file://COPYING;md5="

Printing the actual checksum in this case is really useful when writing
a new recipe, so put this back in.

(From OE-Core rev: e58cdd385584d7449236e6b1dc1bce0cbc8f2a0a)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-21 17:22:38 +00:00
Richard Purdie 325fb2bd24 sstate: Use datastore copies due to data changes persisting
The way the "all arch" PKGSPEC is enabled, it causes corruption
of the datastore of sstate operations against other tasks.

Data store copies are cheap and allow us to use that trick, resetting
to a clean copy of the data afterwards.

(From OE-Core rev: afaf16100efa79a275a2f4b9f2caa80decfdeb81)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-21 09:00:52 +00:00
Richard Purdie 6aa4de3b7c externalsrc: Fix deltask usage
An incorrect version of the patch merged which entirely removed the covered
variable. This corrects the patch so the code works.

(From OE-Core rev: 33874f9af895757c4b0fd2f4d350ed308edac03c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-21 09:00:52 +00:00
Richard Purdie 394691762a terminal: Exclude BB_ORIGENV from the signatures
devshell was printing a traceback when exiting due to the use of dump_sigs()
being called on the task. This is turn was since this function referenced
BB_ORIGENV. We might as well globally exclude this for now since its a
data store object and cannot be pickled, not would it make sense to do so.

[YOCTO #5683]

(From OE-Core rev: 84b549afb46fce7b5cdaa977286aeb2e90d3bfdb)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-20 17:18:16 +00:00
Richard Purdie 3ada51f7aa sstate/sstatesig: Add populate_lic to list of arch invariant sstate tasks
Like fetch, unpack and patch, populate_lic doesn't vary between different
archs so we should mark it as such. This means better sstate cache reuse
with fewer duplicate files as well as less confusing sstate debugging.

sstatesig also needs to account for the fact BPN is used for sstate files
in these cases.

(From OE-Core rev: 3d59d0bed756f64d0092caa3892239c779c4a341)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-20 12:26:32 +00:00
Richard Purdie e5ee1b8c0d sstate: Convert to use ':' as a filename sperator and use SSTATE_SWSPEC globally
Currently the code has problems differentiating between "gcc-cross" and "gcc-cross-initial"
sstate files. We could add in a ton of special casing but tests show this isn't scaling
well. Using a more unique separator resolves the issue.

The choice of which separator to use is a hard one. We need something which isn't commonly
used in PN, PV, PR, *_OS and *_ARCH which rules out '-', '_' and it needs to work ok with
webservers/http which makes ';' and '%' harder.

The change also sets SSTATE_SWSPEC globally since writing out differently named siginfo
files for the fetch/unpack/patch tasks is a waste of diskspace, the hashes match for
all PN in the majority of cases and if they don't, its not a big issue as the hash is
different. This makes the results from sstate debugging more understandable.

(From OE-Core rev: 6f823a23c5f1d0ffa0a27db1c1bc1907de788505)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-20 12:26:31 +00:00
Stefan Stanacar 963b69b5f3 testimage: include traceback when loading a test fails
Makes it much easier to figure out where a syntax error is.

(From OE-Core rev: 0c30a25c3d5f7fb1087dff45e01595329620235f)

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-12-20 12:26:30 +00:00
Richard Purdie d32d08fd48 ptest: Disable for native recipes
We don't use or otherwise care about ptest for native recipes. Its therefore
pointless to take the performance hit for them and we can disable them.

(From OE-Core rev: f3d35bb4719d0b8f8e6fc5976e9dbfc0e2019c2e)

(From OE-Core rev: 16dd4cd5564a19b0a221661205430e01c35673af)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-20 12:26:26 +00:00
Richard Purdie f857b62b8a ptest: Fix dependency/ordering issue
We've seen occasional issues on the autobuilder where files appear during
do_populate_sysroot and this is due to the ptest installation happening
in parallel. This fixes the order to be deterministic.

(From OE-Core rev: 0ed1641d870f4bb5735aeeb7bd29cc196e61b7cc)

(From OE-Core rev: 96aa9bf8880088c9a710c86cc8ee106138152a98)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-20 12:26:26 +00:00
Richard Purdie 64bb800c73 externalsrc: Use deltask API
Now we have deltask API, stop poking around bitbake internal variables.

(From OE-Core rev: 98637df0c04fd14b506d9eec7da8ec6ae441221b)

(From OE-Core rev: 3aa30ca04752c6366a81db6ff99209fa0b46861c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-20 12:26:25 +00:00
Richard Purdie 14471d201b native: Use deltask to remove tasks which have no purpose
core-image-sato has 47703 inter task dependencies before this patch
and 29883 afterwards which is a significant worthwhile task graph
simplification.

(From OE-Core rev: ac4b1518ec549b5a4d7a79c60dbf96b90797e1d8)

(From OE-Core rev: 8f4f229ba8117ba411a858bf47f88a370bb70491)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-20 12:26:25 +00:00
Ross Burton 402308cfe2 systemd: pass --root in prerm if running on host
If a systemd image is built without a package manager then packages will be
removed from an image during rootfs generation, but without passing --root the
systemctl will look on the *host* system.

(From OE-Core rev: d01da862d10d9544f8da846b577cf955041d4c0c)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-18 17:08:06 +00:00
Ross Burton 7e17255fa8 buildhistory: be quiet when garbage collecting the git repo
(From OE-Core rev: b117403423f700eb4cc6967b9fb8ff3e2858e279)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-18 17:08:05 +00:00
Ross Burton 2a58f76935 useradd.bbclass: add dependency on base-files
Packages that use useradd.bbclass should have a dependency on base-files so that
the /etc/skel directory is populated.  Without this dependency base-files may or
may not be installed when the postinst runs, and the skel content may or may not
be copied.

(From OE-Core rev: 556368ba8a1f933a86b69be024bd0711d4bfe0a3)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-18 17:08:05 +00:00
Richard Purdie 480bf037ae sstate: Get rid of crazy name mapping
When originally developed, it was thought a task may have more than one associated
sstate archive. The way the code has grown that idea is now not possible or needed.
We can therefore assume one sstate archive per task and drop the crazy name
mapping code. Simpler is better in this case.

The downside is that various sstate archives will change name so this forces a cache
rebuild. Given the other sstate changes going in at this time, this isn't really
a bad thing as things would rebuild anyway.

(From OE-Core rev: 5afe86a6854b21692fd97c5fc7fab50dbc068acb)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-18 17:08:05 +00:00
Richard Purdie 7935ae2e80 sstate/gcc: Fix shared workdir handling for siginfo files
For a shared workdir, any one of the fetch/unpack/patch tasks may run yet the
PN and architecture fields in SSTATE_PKGSPEC may differ. This makes looking up
the appropriate siginfo file near impossible.

I've tried several different ways of resolving this and this is the neatest
solution I could find, its still rather ugly. I believe the usefulness of
better sstate debugging outweighs the ugliness of the code.

This patch also changes the sstate_checkhashes() code to look for siginfo
files rather than the actual sstate packages themselves. This means the
function can be used in other contexts to find info files for tasks that
may not have sstate data. It is assumed that sstate mirrors will have both
files available. This is done to allow bitbake to query whether tasks have
matching signatures in sstate directories or not.

(From OE-Core rev: 068e4289b597699cbff2dfde44ba833af4535281)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-18 17:08:04 +00:00
Richard Purdie 88f0166770 sstate: Write out siginfo files for non-sstate tasks
Currently siginfo files are only written for sstate tasks. In order to be truly
debuggable, its helpful to have the siginfo for intermediate tasks. This
adds that functionality so the extra siginfo files are written out too.

This will be used to add better sstate debugging in future changes.

(From OE-Core rev: 04d108cd16f5ad8f92a62ea537d1330fee712470)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-18 17:08:04 +00:00
Ross Burton cd5d65a83f insane: handle recursive configures when checking for unknown configure options
Some recipes have configure scripts that recursively call other configure
scripts (e.g. dropbear).  These multiple-line matches were not being handled
correctly, so iterate over every matching line instead of assuming only one line
was found.

[ YOCTO #5646 ]

(From OE-Core rev: b226ab4cf7779f4dfaa78210cb6249766ed564c1)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-16 12:13:59 +00:00
Richard Purdie e2c2b5b3af nativesdk: Set LIBCOVERRIDE to a value
nativesdk was just unsetting LIBCOVERRIDE however that causes some build failures
for xorg-libs which used a libc override. This adds in a mechanism to force
nativesdk to glibc and give the option of allowing another selection like
uclibc if anyone ever does the work to make it operational.

(From OE-Core rev: 154f5782d95b4bca8e574d3d3fde170ce3d196ae)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-16 12:13:50 +00:00
Chen Qi c38fee231b image.bbclass: fix for zap_root_password
Previously, this function replaces the root password with '*' if
'debug-tweaks' is not in IMAGE_FEATURES. It not only zaps empty root
password, but also zaps non-empty root password. That means, if the
user uses a bbappend file for base-passwd to set the root password, he
would not be able to login as root; if the user uses 'EXTRA_USERS_PARAMS'
to set the root password, he would still not be able to login as root.

What we really want from this function is to disallow empty root password
if 'debug-tweaks' is not in IMAGE_FEATURES. This function should not remove
non-empty root password because that password is usually deliberately set
by the user.

This patch renames zap_root_password to zap_empty_root_password to
better reflect the intent of this function. It also modifies the code
to make this function work correctly.

(From OE-Core rev: c1037a74f934966a0df8c85138b09d672b9f8b36)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-14 09:16:37 +00:00
Chen Qi 1034518fa7 image.bbclass: default USE_DEVFS to '1'
Default USE_DEVFS to "1" so that the `makedevs' command is not run
at rootfs time by default. There are mainly two reasons to do so.

1. This will fix a build failure with initramfs-kexecboot-klibc-image.
   "makedevs: No entry for root in search list "

2. Most of our images use a filesystem over /dev. Most of the time, it's
   just devtmpfs. So we actually are using a filesystem over /dev.

(From OE-Core rev: f54fdd6673a136ee1cee1f3263a8a7820de43ca3)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-14 09:16:37 +00:00
Koen Kooi 0101c26742 cpan_build bbclass: do not install module into /usr/share
83796edd29 is a partial solution, this fixes cpan_build.bbclass as well.

A non-working one looks like this:
	[koen@rrmbp v2013.06]$ dpkg-deb -c deploy/eglibc/ipk/armv7ahf-vfp-neon/perl-module-build-withxspp_0.14-r0.0_armv7ahf-vfp-neon.ipk
	-rw-r--r-- root/root       361 2013-11-28 16:50 ./usr/lib/perl/auto/Module/Build/WithXSpp/.packlist
	-r--r--r-- root/root     22557 2013-11-28 16:50 ./usr/share/perl/Module/Build/WithXSpp.pm

It now looks like this:
	[koen@rrmbp v2013.06]$ dpkg-deb -c deploy/eglibc/ipk/armv7ahf-vfp-neon/perl-module-build-withxspp_0.14-r*.ipk
	-rw-r--r-- root/root       378 2013-11-29 14:44 ./usr/lib/perl/auto/Module/Build/WithXSpp/.packlist
	-r--r--r-- root/root     22557 2013-11-28 17:22 ./usr/lib/perl/vendor_perl/5.14.3/Module/Build/WithXSpp.pm

(From OE-Core rev: 1bfcbdbe15bf5a0fce4cb3acb63ae86d98d56277)

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-14 09:11:16 +00:00
Koen Kooi 1cc8a011c4 distutils bbclass: delete site.py*
Multiple recipes package this generated file and will clash during installation with:

| Collected errors:
|  * check_data_file_clashes: Package python-nose wants to install file /build/v2013.06/build/tmp-angstrom_v2013_06-eglibc/work/beaglebone-angstrom-linux-gnueabi/cloud9-gnome-image/1.0-r0/rootfs/usr/lib/python2.7/site-packages/site.pyc
|       But that file is already provided by package  * python-setuptools
|  * check_data_file_clashes: Package python-nose wants to install file /build/v2013.06/build/tmp-angstrom_v2013_06-eglibc/work/beaglebone-angstrom-linux-gnueabi/cloud9-gnome-image/1.0-r0/rootfs/usr/lib/python2.7/site-packages/site.py
|       But that file is already provided by package  * python-setuptools

(From OE-Core rev: e53192d98ff8cdc4abe85b42e792da2759b22f84)

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-14 09:11:15 +00:00
Jackie Huang 40b73e4660 grub-efi: change to generate EFI image in target package
To generate the target EFI image in a native package, it requires
the host gcc have the ability to do -m32/-m64 compiling, but gcc
doesn't have that support on the 32bit version of some distributions
(e.g. rehl, suse), it would fail when build a 64bit target on these
32bit hosts.

In fact, all we need from grub-efi-native is the grub-mkimage binary,
so change the solution to:
 * grub-efi-native only install grub-mkimage
 * grub-efi compiles target modules, generates EFI image
   with grub-mkimage and deploy, but install nothing.

(From OE-Core rev: 53d3f1273983dfce2a907b39768978afe99aab1a)

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-14 09:11:11 +00:00
Paul Eggleton b1b0c31515 classes/module_strip: remove
This class has been empty since 2010, so we shouldn't need it anymore. A
check of common layers suggests there shouldn't be any references to it
outside of OE-Core.

(From OE-Core rev: 3c4557df95e3c60ef938c53f00bb1d7f765fe0ef)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-12 23:09:15 +00:00
Khem Raj b9e1f1118e buildhistory.bbclass: Specify lang in decoding strings
On systems where default locale is utf-8 we get errors like

File: 'buildhistory.bbclass', lineno: 38, function: write_pkghistory
0034: if pkginfo.rconflicts:
0035: f.write("RCONFLICTS = %s\n" % pkginfo.rconflicts)
0036: f.write("PKGSIZE = %d\n" % pkginfo.size)
0037: f.write("FILES = %s\n" % pkginfo.files)
*** 0038: f.write("FILELIST = %s\n" % pkginfo.filelist)
0039:
0040: for filevar in pkginfo.filevars:
0041: filevarpath = os.path.join(pkgpath, "latest.%s" % filevar)
0042: val = pkginfo.filevars[filevar]
Exception: UnicodeEncodeError: 'ascii' codec can't encode character
u'\xed' in position 337: ordinal not in range(128)

This patch specifies decode to use utf-8 so ascii and utf-8 based
locales both work

(From OE-Core rev: 259b8718a31b886f8a158aeb5de164840c9a28b2)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-10 17:42:44 +00:00
Roy Li 209eba7067 multilib: Ensure we map the SYSTEMD_PACKAGES variable
If we don't do this, systemd.bbclase will complain to unable to find multilib
packages since PACKAGES is expand with mlprefix, but SYSTEMD_PACKAGES is not,
like in ntp.inc:

    $grep PACKAGES meta-oe/meta-networking/recipes-support/ntp/ntp.inc
    PACKAGES += "ntpdate sntp ${PN}-tickadj ${PN}-utils"
    SYSTEMD_PACKAGES = "${PN} ntpdate sntp"
    $

    $bitbake ntp
    ERROR: ntpdate does not appear in package list, please add it
    ERROR: sntp does not appear in package list, please add it
    $

(From OE-Core rev: 84f1d3252c369dff06a517baa4fd7fe274782e40)

Signed-off-by: Roy Li <rongqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-10 17:42:43 +00:00
Alexandru DAMIAN 340c35e9d1 toaster.bbclass: read package and image information
In the process of removing the local system accesses
from toaster UI (which must be able to run remotely),
the code to read package information  is moved
from Bitbake Toaster UI to the server-side
toaster.bbclass

     [YOCTO #5604]

(From OE-Core rev: 380d48da4b476f43554e38e464e7e25c930f88b6)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-10 11:16:11 +00:00
Alexandru DAMIAN 5145b5a6c1 toaster.bbclass: read build stats
In the process of removing the local system
accesses from toaster UI (which must be able to
run remotely), the code to read build stats
is moved from Bitbake Toaster UI
to the server-side toaster.bbclass

The code will accumulate a list of stat files
to be read at build completion. When the
build completes, the whole data list is read and
sent through in a single event.

    [YOCTO #5604]

(From OE-Core rev: 0c455c0708335eecd1e659680b6cddb4782e80fa)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-10 11:16:10 +00:00
Alexandru DAMIAN 8ee7b08068 toaster.bbclass: read layer information
In the process of removing the local system
accesses from toaster UI (which must be able to
run remotely), the code to read layer information
is moved from Bitbake Toaster UI
to the server-side toaster.bbclass

    [YOCTO #5604]

(From OE-Core rev: 158679d244ff5b44354fb474c88122918b93a5b6)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-10 11:16:10 +00:00
Hongxu Jia 853f5db48f nativesdk.bbclass: support nativesdk to override with the PACKAGES_DYNAMIC statement
While compiling nativesdk-mtools, there was failure:
...
Nothing PROVIDES 'nativesdk-glibc-gconv-ibm850'. Close matches:
...
This patch supports nativesdk to override with the PACKAGES_DYNAMIC statement

[YOCTO #5623]
(From OE-Core rev: 315367ea9526186d5836c64867ce0cd40d9d8412)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-09 21:36:33 +00:00
Roy Li 40b173c104 buildhistory.bbclass/image.bbclass: remove obsolete codes
After 1b8e4abd2d9c0 [bitbake.conf/package: Collapse PKGDATA_DIR into
a single machine specific directory], oe-pkgdata-util does not use
target_suffix parameter, so do not need to loop the vendor

(From OE-Core rev: 03c5f39b4d7dd8c81e0a130b7d5884e5af039a24)

Signed-off-by: Roy Li <rongqing.li@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-09 18:01:45 +00:00
Hongxu Jia 2ef65cc86d license.bbclass: fix copying license directories failed
For each recipe, it populated license files to ${LICENSE_DIRECTORY}/${PN},
such as kernel's license dir was ${LICENSE_DIRECTORY}/kernel-3.10.17-yocto-standard;

In do_rootfs task, it copied license directories from ${LICENSE_DIRECTORY}/
${pkg}, and ${pkg} was listed in ${INSTALLED_PKGS};

We got ${INSTALLED_PKGS} by rpm query, such as the kernel were 'kernel-*',
but the kernel's PN was linux-yocto, so searching ${LICENSE_DIRECTORY}/
kernel-* failed.

Copied license directories from ${LICENSE_DIRECTORY}/${PN} fixed this issue.

[YOCTO #5572]

(From OE-Core rev: 8968f9a3461912c8de217135f3691c86e2a58e86)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-09 18:01:44 +00:00
yanjun.zhu 22beb58bd8 boot-directdisk: add the support of vmdk
add the support of vmdk.

(From OE-Core rev: 086ce22b88f5ef5f75a83119a32c8b3fdcfa296d)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-09 18:01:43 +00:00
Paul Eggleton 5c69ae26cd classes/buildhistory: fix reading of package-specific values from pkgdata
When writing out variable values to pkgdata, if the value has been set
in the datastore with an override for the package, we use the package
name override in the pkgdata key as well; however the recently added
code to read pkgdata in buildhistory.bbclass was just using the override
where we normally expect to have it. However, if a recipe overrides one
of the values that is normally set for the recipe on a per-package basis
(e.g. the external-sourcery-toolchain recipe sets PKGV this way) then
this led to KeyErrors. Re-write the pkgdata loading code to always strip
off the package name override if it is present.

(From OE-Core rev: e40e8e574b3688400a668d3ad76b6cef1920e3e0)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-05 14:25:30 +00:00
Martin Jansa c295fe6453 cpan-base: Add vardepvalue to get_perl_version function
* without this bitbake -S perf shows following error:
  ERROR: Bitbake's cached basehash does not match the one we just generated
    (/OE/oe-core/meta/recipes-kernel/perf/perf.bb.do_package)!
  if you run it twice, once without perl in sysroot and once with perl
  already built

(From OE-Core rev: f31f6a70ec24e8c9515d69c5092e15effc5e7d4d)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-05 14:25:27 +00:00
Martin Jansa f750d65e15 icecc.bbclass: Fix whitespace, improve comment
* Add leading space in big documentation block at the top
* Drop trailing spaces in code
* Update documentation to mention 'bb.utils.which' instead of 'which'

(From OE-Core rev: e220c8e308caac6ef1da038697927425a807d2f2)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-05 14:25:27 +00:00
Richard Purdie cae2315266 bitbake.conf/native.bbclass: Use FC instead of F77 for fortran
gcc tooling appears to be standardising around the FC variable naming.
This patch changes the F77 namespace to FC instead and use the default
gfortran compiler. If anyone needs the F77 variables or tools, those
can still be made on a case by case basis.

Also updates local.conf.sample.extended accordingly.

(From OE-Core rev: ae8c17be2845eff2be8394a5d9a45e6aa321c33d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-05 14:25:23 +00:00
Richard Purdie 6ab56c54f3 classes/recipes: More optimal DISTRO_FEATURES references
Using the contains function results in more optimal sstate checksums
resulting in better cache reuse as we as more consistent code.

(From OE-Core rev: 9c93526756e7cbbff027c88eb972f877bcb1f057)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-05 14:24:43 +00:00
Ross Burton b4b1c90bcf ptest: ensure do_install_ptest_base task runs in fakeroot context
As this task is installing files into $D it needs to run inside pseudo so that
special permissions and owners are preserved.

(From OE-Core rev: 64f0a0bc408d8e32d5e795aeb9fffee0539f5e22)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 17:45:53 +00:00
yzhu1 65535bff09 populate_sdk: verify executable or dynamically linked library
When toolchain directory is changed to execute mode, some non-executable
files or empty files are sorted. This will result in some errors. Thus when
sorting executable files or dynamically linked library, additional conditions
are to exclude non-executable files or empty files.

(From OE-Core rev: c9d56308bfa9ee7f4a9b22eae86390626ddc1c35)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 17:45:53 +00:00
Nicolas Dechesne 6cdecac4ef image-mklibs: ensure sysroot is correctly set when calling gcc
[YOCTO #2519]

When getting gcc from sstate, it is possible to get a gcc with a bogus
sysroot configuration, as discussed in [1] or in [YOCTO #2519].

mklibs script will eventually call gcc, so we need to make sure that it
provides gcc with the right sysroot location.

[1] http://lists.openembedded.org/pipermail/openembedded-core/2013-September/084159.html

(From OE-Core rev: 3a66dd762e493ad2cda57110be67c3b06628050a)

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-12-03 17:45:52 +00:00
Stefan Stanacar b4d9b4208b testimage: use the new targetcontrol.py module for running tests
This patch makes the necessary changes for using the targetcontrol.py module
so that one can run the same tests on a qemu instance or a remote machine
based on the value of TEST_TARGET variable: "qemu" or "simpleremote".
The default value is "qemu" which starts a qemu instance and it's the
with what we currently have.

With "simpleremote", the remote machine must be up with network and ssh
and you need to set TEST_TARGET_IP with the IP address of the remote machine
(it can still be a qemu instance that was manually started).

Basically testimage.bbclass now does something along the lines of:
 - load tests -> deploy (prepare) / start target -> run tests.
There were a couple of changes necessary for tests and
also some cleanups/renames that were needed to adjust this change. (use
ip everywhere when refering to target and server_ip when refering to host/build machine)
Also two unnecessary and unsed methods were dropped from sshcontrol.

[ YOCTO #5554 ]

(From OE-Core rev: a7820350fa3271d78ed7476e02f4aef593be1125)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 17:45:51 +00:00
Paul Eggleton 1fa51bf949 classes/buildhistory: do git garbage collection after committing
We don't normally perform any operations (such as "git pull") that
trigger "git gc --auto", thus garbage collection never happens which
means performance of accessing the repository degrades noticeably over
time. Add an explicit "git gc --auto" to clean things up when needed.

Thanks to Elijah Newren and Ross Burton for suggesting this.

(From OE-Core rev: 4a45a999e0ad2e99581428a5a6d34f483c00544f)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 17:45:50 +00:00
Paul Eggleton d51b3f3758 classes/buildhistory: reduce parsing time
Disable several python functions if not parsing within the worker
context. This avoids executing expensive operations while parsing
recipes (which is unnecessary).

(Thanks to Richard Purdie for pointing out the issue and suggesting the
workaround.)

(From OE-Core rev: 540a2a30be21c3eca4323efbe91e7dcfc31a4c97)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 17:45:50 +00:00
Paul Eggleton cdfef971d3 classes/buildhistory: improve collection of package info
Use a function added to SSTATEPOSTINSTFUNCS and read the necessary
information out of pkgdata, instead of using a function executed
during do_package that reads the data directly. This has two benefits:

* The package info collection will now work when the package content is
  restored from shared state

* Adding/removing the inherit of buildhistory will no longer change the
  do_package signatures and force re-execution of that function for
  every recipe.

Fixes [YOCTO #5358]

(From OE-Core rev: cd7f7efcd5f297d876823b8f579ecefb9542b089)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 17:45:50 +00:00
Paul Eggleton 0cb38ee34a classes/buildhistory: add additional variables to image information
Add PACKAGE_EXCLUDE and NO_RECOMMENDATIONS to the info we track for
images, since these can change what ends up in the image.

(From OE-Core rev: a10189366f180b87f5be20b66834b7e7a9bb8c12)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 17:45:50 +00:00
Paul Eggleton 1c37266c2a classes/buildhistory: drop cruft from old SRCREV tracking implementation
This should have been removed when the implementation was rewritten in
OE-Core commit 2179db89436d719635f858c87d1e098696bead2a. The collected
values weren't being used anywhere since then.

(From OE-Core rev: cbc23a87c1897b7fda40f452dd36acb0bca3d197)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 17:45:49 +00:00
Paul Eggleton c36c1989c1 classes/package: write PE and PKGE out to pkgdata
These are important parts of the version for every package, so we should
include them in PKGDATA just as we include PV/PR/PKGV/PKGR.

(From OE-Core rev: 5ceed97ba02a698f1c260c3f56cdf2cc156e6d8b)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 17:45:49 +00:00