Commit Graph

2999 Commits

Author SHA1 Message Date
Paul Eggleton 80b2634304 classes/insane: remove la2 check which no longer exists from ERROR_QA
This check was actually removed a very long time ago in
6656381714, before we even changed the QA
checks to use names instead of numbers - the name was probably added
ERROR_QA mistakenly because it hadn't also been removed from the comment
listing the QA checks or the function that determined which ones were
errors.

(From OE-Core rev: ff65497cd9a96d5ab49b16ba1f7e30a216ff4a42)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-28 16:33:08 +01:00
Kai Kang 44b3c8dfa4 qt4*.bbclass: disable build qt on mips64 with 64 bits userspace
Qt/qt-embedded build fails on mips64 with 64 bits userspace. Set
COMPATIBLE_HOST in qt4e.bbclass and qt4x11.bbclass to disable build
qt/qt-embedded and packages which inherit these two classes on mips64
with 64 bits userspace.

(From OE-Core rev: 17890ebd637da0b3bf78804002d8b4f0ace078d2)

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-28 10:41:46 +01:00
Richard Purdie d3ce916c7c packagedata: Show error when trying to change PE/PV/PR from runtime/pkgdata
PN/PE/PV/PR should never change between do_package and the following do_package_write_*
tasks. If any do change you would see build failure due to the wrong WORKDIR being
used for example.

This patch ensures that if something is going wrong we see the error earlier and
with some better warning about what the real problem is.

[YOCTO #4102 partial]

This is a rewritten version of a patch from Martin Jansa <martin.jansa@gmail.com>

(From OE-Core rev: f5252fea11e13dbcec1c277cf1bf0d7e61b60690)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-28 10:01:28 +01:00
Richard Purdie 1cc028840d package: Ensure we iterate all the pool objects
There is the possibility that if we don't iterate through the multiprocessing
pool objects we might not catch return codes and this could lead to hung/zombie
processes either temproarily or on a wider scale. Adding this certainly doesn't
hurt anything and is better practise so we might as well do it.

Its not 100% clear if this fixes some issues or not.

(From OE-Core rev: 89c8493d4d85044cd72af2756569d15e87cd5947)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-28 10:01:27 +01:00
Mark Hatle 9b007f61b2 sanity.bbclass: Check for the known broken version of make
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.

(From OE-Core rev: dede532a980b0fabf0beae4519b89ec74a1c2474)

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>
2013-06-28 09:14:07 +01:00
Roy.Li b09bc24c94 autotools.bbclass: force copy Makefile.in.in to ${S}/po/
If a Makefile.in.in has existed under ${S}/po/ and is read-only, cp will fail.

(From OE-Core rev: 6e1b17f19411ed897c53ae0ef41a2d2972a9c113)

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-06-28 09:14:07 +01:00
Mikhail Durnev c62b1a3338 useradd.bbclass: Add members to a group
useradd.bbclass supports adding new users and new groups. But it does not
support adding existing users to existing groups.

There is a need of adding users to some groups (e.g. audio). The class was
extended to call groupmems utility with arguments passed via GROUPMEMS_PARAM.

(From OE-Core rev: 6b3bd34bf8c5e511bccfbb64bdd1236e1e7576e3)

Signed-off-by: Mikhail Durnev <mikhail_durnev@mentor.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-28 09:14:07 +01:00
Enrico Scholz 0450c31ca4 image_types.bbclass: set 'filetype' ext4 feature
Generating filesystems with this flag allows more efficient directory
traversals because getdents() returns the filetype in 'd_type' which
allows to avoid an extra lstat() call.

Creating ext4 filesystems with 'mkfs.ext4' sets this flag by default
too.

(From OE-Core rev: 75e077025397f3bde84e60a9da2c0564ade09b39)

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-28 09:14:06 +01:00
Richard Purdie 042203531b sanity.bbclass: Fix COREBASE sanity tests
We need to expand the COREBASE variable, no idea how these tests were
previously working at all...

(From OE-Core rev: 099063f353a7a18720c92d87400726a49eed432f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-27 12:48:56 +01:00
Richard Purdie 4707a74db3 sanity.bbclass: Add check for @ character in build directory name
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]

(From OE-Core rev: 008cb3c501c8313a0a1a0ebce2b0aa61239b548d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-27 10:04:50 +01:00
Laurentiu Palcu 8e9501ffa8 populate_sdk_base, adt_installer: abort install if path contains spaces
Spaces are not handled properly in some parts of oe-core and it's safer
to abort toolchain installation if path contains spaces. Even though
we fix space handling in the toolchain installation script, there are
various other parts in the toolchain (perl scripts, sysroot path passed to
toolchain binaries, shebang lines) that would need special handling. So,
for now, just bail out if path contains spaces.

The checking for spaces in the path is done after expanding relative
paths to absolute and tilde conversion.

[YOCTO #4488]

(From OE-Core rev: 8c35ba2d3048ce69f74f72cb2676e4bc162cfb63)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-25 17:59:17 +01:00
Richard Purdie 87da290804 sanity.bbclass: Various improvements
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.

(From OE-Core rev: 4e6de6d5f0454024eec2ec775a938c5dab70610c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-24 15:41:33 +01:00
Richard Purdie a355f13f73 sanity.bbclass: Drop horrible obsolete minversion hack
We once needed to do this, things seem to work fine without this now,
thankfully.

(From OE-Core rev: ac090ace11d654dafd642fd93c94091a164476fa)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-24 15:41:33 +01:00
Richard Purdie 17b1507c02 base.bbclass: Ensure finalised data is displayed in build banner
The build banner displayed at the start of builds can be misleading since
the data store has not been finalised. As easy way to illustrate this is
to use something like:

DEFAULTTUNE = "i586"
DEFAULTTUNE_<machineoverride> = "core2"

and the banner will display the i586 tune yet the core2 tune will be
used. We can avoid this if we finalise a copy of the data before
displaying it.

[YOCTO #4225]

(From OE-Core rev: bdce39f22a0e8c8e1cf237322657220e4201077d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-21 09:19:27 +01:00
Richard Purdie de1841d9c2 utility-tasks/distrodata: Add recideptask flag for fetchall/checkuriall
See the bitbake commit adding the recideptask flag for details of the
problem but in summary, we weren't seeing the [depends] of tasks like
do_rootfs being taking into account for fetchall. This was leading
to not all sources being fetched and this is the OE-Core part of the
fix for this problem.

BB_DEFAULT_TASK is the default task used since this is the one that
most commands would end up targeting and is how users expect the command
to behave.

[YOCTO #4597]

(From OE-Core rev: abf468963a087244887384122fd5202909e7f118)

(From OE-Core rev: e385cc4ac06ac1e8d257563a700d19895105eade)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-20 13:10:46 +01:00
Paul Eggleton 827400fd09 classes/buildhistory: fix error when no packages are installed
"xargs -n1 basename" will execute basename even if there are no lines
piped into it, causing a "basename: missing operand" error if no
packages are installed, which will happen for the target portion of
buildtools-tarball.

(xargs' -r option could have been used here, but it is a GNU extension
and I thought it best to avoid that for the sake of future
interoperability).

(From OE-Core rev: 03d86123e9e804e62de38effd307f070d7863080)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-20 13:10:46 +01:00
Paul Eggleton 8e8de62a2d classes/package_tar: fix file ownership within tarballs
The fakeroot flag wasn't correctly set leading to files within the
output tarballs having uid/gid values from the build host instead of the
desired target permissions.

(From OE-Core rev: a31c7ec56568e5dafc2f45ba5675367ddceb0e3e)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-19 18:03:35 +01:00
Richard Purdie 2631eff585 utils.bbclass: Tweak create_wrapper
Currently the full path is specified to exec however this may incorporate a
build path which in the nativesdk case, is not transformed to a target system
path. This leads to failures due to incorrect paths.

This patch ensures the full build path is not encoded into the wrapper script.

(From OE-Core rev: 4569d7403638e4c1f637e3a6adb8dea620dc8543)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-18 17:33:14 +01:00
Paul Eggleton f6f5eed533 classes/externalsrc: enable global inherit and simplify usage
This class can now be inherited globally using INHERIT += rather than
needing to inherit it in the recipe itself. Additionally, instead of
setting S (and optionally B), set EXTERNALSRC (and optionally
EXTERNALSRC_BUILD) to point to the external source and build locations
respectively.

(From OE-Core rev: b1da10579a28f9a5260a0678f6f15ce4b5a2706c)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-18 17:33:14 +01:00
Kevin Strasser e1baa0de28 archiver.bbclass: check if package contains a copyleft license
The copyleft filter is only excluding packages that contain a
closed source license. This is because oe.license.is_included()
returns a boolean value that indicates if the license is excluded,
and a string that contains the matched included licenses. If the
string is empty it indicates that no licenses were matched.

Reject packages that do not contain a copyleft license.

[YOCTO 4630]

(From OE-Core rev: 3d0f9ee3d2fcce331d35467d5965ff44b825427f)

Signed-off-by: Kevin Strasser <kevin.strasser@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-17 16:45:35 +01:00
Laurentiu Palcu 194b395f85 distrodata.bbclass: fix syntax errors
Thes were added by the recent event handler changes.

(From OE-Core rev: 166313ca2edd05f7d3472ba23ba6f44ae12a7d12)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-17 12:35:51 +01:00
Richard Purdie 53841ce521 classes/conf: Add eventmasks for event handlers
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.

(From OE-Core rev: bff73743280f9eafebe4591f7368ead91a4eb74d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-14 12:55:47 +01:00
Richard Purdie 98abb113a0 scripts/buildenv-internal/sanity: Update to python 2.7.3 as a minimum
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.

(From OE-Core rev: 8b90f1becd40a7f857d2fbe30eaffe218a976419)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-14 12:53:52 +01:00
Richard Purdie 2cc601cd26 sanity: Drop pseudo test, now unneeded
(From OE-Core rev: 075278db6f7a4783c952c72eebddf51a12f76075)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-14 12:53:52 +01:00
Richard Purdie cfbd13ff22 scripts/bitbake sanity.bbclass: Migrate tests for git and tar versions
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.

(From OE-Core rev: 7b370e23594da5dcb53cd5507ec289c3ef2d9fb5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-14 12:53:51 +01:00
Jonathan Liu 04af378874 classes/qmake_base: allow parallel make
Remove MAKEFLAGS= from EXTRA_OEMAKE to allow parallel make.

(From OE-Core rev: 1aeecaeee9bb1eee779973fce7f15cc7fad269a0)

Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-13 17:38:11 +01:00
Felipe F. Tonello 9bb1ba4695 qt: update qmake2 class to export qconfig.pri mkspec
This is necessary when Qt applications want to know variables such as
QT_MAJOR_VERSION, QT_VERSION, QT_MINOR_VERSION, GCC version, etc.

(From OE-Core rev: dcaa40e65d986587fa7c44f4285bbd0883478cc3)

Signed-off-by: Felipe F. Tonello <eu@felipetonello.com>
Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-13 17:38:11 +01:00
Randy MacLeod ad276d7d89 sanity.bbclass: non-zero status means that we need -march.
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.

(From OE-Core rev: 217fd857df78c66eae853f935e9cdafcbeb3bc31)

Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-11 21:46:07 +01:00
Christopher Larson 126844d0e1 copyleft_compliance: set 'dirs' flag on task
Without this, due to bitbake defaulting to ${B}, it's possible to get ${S}
inadvertantly created before do_unpack, breaking the unpack of git sources,
which expect the destination to not exist.

(From OE-Core rev: 694a15382fe9f3749ffdc0168a6dc2da8a29ae2d)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-11 16:16:02 +01:00
Christopher Larson 00c8834293 sstate.bbclass: fetch archive+siginfo in a single pstaging_fetch
This avoids unnecessary duplication of setup. The only visible change in
behavior will be the case if siginfo exists and the archive does not, in which
case it'll redownload both, but this doesn't seem unresasonable to me,
particularly since the archive is downloaded first, making this case
particularly unlikely.

(From OE-Core rev: aa4991c307d4bbdd06c3cbf8448240b74c5e01c4)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-11 16:16:02 +01:00
Christopher Larson fbf64380f4 sstate.bbclass: kill MIRRORS and FILESPATH to speed up fetching
The default FILESPATH isn't really of use, as we don't expect to find sstate
archives buried in layer recipe directories, and the default MIRRORS is
intended for use for fetching SRC_URI, not sstate.

(From OE-Core rev: 46402b2f5b69004751f6663d435bedae0ad9dab1)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-11 15:56:01 +01:00
Christopher Larson 29f8701402 copyleft_compliance: handle localpaths ending with '/'
(From OE-Core rev: 1f30d2eb2ef45550c71969c735275db1448b6ac6)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-11 15:56:00 +01:00
Christopher Larson 8331d0ad41 license.bbclass: include all licenses in the manifest
When we don't have a generic license file for the license in question, we can
warn, but we should still include it in the manifest, otherwise the manifest
doesn't reflect reality. Failing to include a license listed in the recipe in
the manifest can't be allowed.

(From OE-Core rev: e87232828b761d56f1ce6a27e4009d350d68209c)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-11 15:56:00 +01:00
Christopher Larson d4a7820eee insane.bbclass: quiet package errors not in *_QA
Currently, if a package QA type from package.bbclass is not listed in
ERROR_QA, it gets shown, regardless of whether it's in WARN_QA. This differs
from the behavior of the rest of the QA handling (which doesn't call
package_qa_handle_error at all if it's in neither _QA variable), and is
nonintuitive. Change this to use bb.note() if it's listed neither in ERROR_QA
nor WARN_QA, so it ends up in the task logs, but doesn't clutter up the user's
output.

(From OE-Core rev: 8f5675e6d3eb8473f367de72d2d3d8a702011a47)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-11 15:55:59 +01:00
Laurentiu Palcu 75070d7032 package_rpm.bbclass: handle pre/post remove scriptlets
Currently the scriptlet_wrapper is designed to handle only pre/post
install scriptlets. This patch will slightly change the wrapper script
to handle also pre/post remove scriptlets when we want to remove
packages from the final image.

(From OE-Core rev: aea47c77d69407b2e62f151cabba35293d179f0c)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-11 15:38:05 +01:00
Laurentiu Palcu e4a136a6bd rootfs_rpm.bbclass: switch to using run-postinsts
Since run-postinsts was made generic, use it for RPM too.

(From OE-Core rev: 1ba44302f522a42535c9ad7d2fcccc06ba4c20b3)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-11 15:38:05 +01:00
Laurentiu Palcu 1ce182e79e image.bbclass: remove unneeded files from the image
This patch creates a new function, rootfs_remove_unneeded(), that will
be called after rootfs_*_do_rootfs is called and which will handle
delayed postinstalls in a generic fashion, for all backends in the same
way.

(From OE-Core rev: d3d810faf8e93ce2d3faaa70da6deeb25b1cec26)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-11 15:38:04 +01:00
Laurentiu Palcu b11f818307 rootfs_*.bbclass: add some helper functions
This patch adds the following helper functions:
 * delayed_postinsts - outputs the list of delayed postinstalls;
 * save_postinsts - this will save the delayed postinstalls for ipk/deb
   in /etc/(ipk|deb)_postinsts;
 * rootfs_remove_packages - removes packages from an image;

Additionaly, this patch will remove a piece of code in
rootfs_ipk_do_rootfs which will be moved to image.bbclass and used for
all backends;

[YOCTO #4484]

(From OE-Core rev: 928df79cd3964f775c4c6e4283ef84b8882f9328)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-11 15:38:04 +01:00
Jonathan Liu 027358f940 classes/qmake_base: update .pro hack
This adds support for lconvert and xmlpatterns tools and tweaks the
sed expressions to handle more complex assignments in .pro files like:
LRELEASE = $$targetPath($$[QT_INSTALL_BINS]/lrelease)

(From OE-Core rev: 542fefa61f0ac1dcdacac2630fd44950ac11cdd9)

Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-11 15:38:03 +01:00
Jonathan Liu 1319e17fa3 classes/qmake2: export OE_QMAKE_LCONVERT and OE_QMAKE_XMLPATTERNS
These will be used by qmake_base.bbclass.

(From OE-Core rev: 405d1325ebbd31676d88a3e157f55d40d04cc3f4)

Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-11 15:38:03 +01:00
Paul Eggleton f5c6663b37 classes/buildhistory: split SDK data by IMAGE_NAME
Data from SDKs produced from different images or different
meta-toolchain style recipes should go into separate directories,
since SDK_NAME doesn't include anything to differentiate these by
default (only pieces for the distro name and architectures).

Note you should delete or move existing data under the buildhistory/sdk/
directory manually after this change.

Fixes [YOCTO #4622].

(From OE-Core rev: 74658b66530184b0287152397341fbe411e90c71)

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-06-11 15:38:02 +01:00
Marko Lindqvist 9682f1609c gnomebase.bbclass: add support for archive name different from BPN
Use new variable GNOMEBN, defaulting to value of BPN, instead of
BPN directly when determining URL for source archive.

(From OE-Core rev: fe297a70c7d6b36a6595534589c71d32209d6a53)

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-11 15:38:00 +01:00
Marko Lindqvist 706ce35957 gnomebase.bbclass: implement gnome_verdir() using trim_version()
(From OE-Core rev: 2341c0b801b62d0249567806a70d9a38f4dfe17f)

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-11 15:38:00 +01:00
Richard Purdie 7bf5c38e0f base/useradd/sstate: Ensure do_package setscene has correct fakeroot dependencies
The do_package_setscene task needs to depend on fakeroot in order to correctly
install its files.

We can whitelist the dependency in the sstate handling code for some
performance improvements since we only need this if we're installing the
package from sstate.

Also use an append operator in base.bbclass for clarity.

(From OE-Core rev: 0810ea2a72bdea67a3d8002c4e12fb20f45cf1d5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-07 17:52:08 +01:00
Richard Purdie 950b505ca1 package_*.bbclass: Drop fakeroot from setscene calls
Back in 2010, I added these in commit: http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=36f1ae42fe13dae174b7fb5eb85dc49d7d7b516b
however the package_write tasks sstate only consists of package files and no
fakeroot privileges are needed to write these out, only originally create them.

We can therefore drop these for some small performance gains and a less
convoluted depenency chain.

(From OE-Core rev: 3c760ce4dc15d85be07aafbfea896e7276e0c2c4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-07 16:48:31 +01:00
Yi Zhao dfd0985065 kernel.bbclass: Fix link for modules-${MACHINE}.tgz
The modules-${MACHINE}.tgz should link to ${MODULE_TARBALL_BASE_NAME}.
But now it links to an invalid file ${MODULE_TARBALL_BASE_NAME}.bin.
Remove the extra .bin suffix.

[YOCTO #4595]

(From OE-Core rev: ef9fad8fff1c413bc0eab15625f051d4e2d0a201)

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-07 16:48:28 +01:00
Andrea Adami 1b22849f81 image_types.bbclass: add ubifs to IMAGE_TYPES
* the IMAGE_TYPES variable is used exclusively by hob
* IMAGE_CMD_ubifs is already present in the class
* ubifs images can be flashed on existing ubi volumes with 'ubiupdatevol'

(From OE-Core rev: 0dc5a90b2d95ad21025769b0300390a4ff0052ac)

Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-07 16:48:28 +01:00
Robert Yang 5a0f74ac04 multilib.bbclass: fix the PACKAGEFUNCS_append
The PACKAGEFUNCS_append = "do_package_qa_multilib" lacks a "space",
which would cause unexpected errors.

[YOCTO #3190]
[YOCTO #4396]

(From OE-Core rev: acd5fc716bc3095d568bd1474b79f3a0fd616eea)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-07 16:48:27 +01:00
Robert Yang 829d6bf005 insane/package: refactor packaging sanity tests
Refactor packaging sanity tests from package.bbclass to insane.bbclass
so that the message can respect WARN_QA (print the warning message and
go on the task) and ERROR_QA (print the error message and fail the
task).

- For the bb.warn(), give it a message name and add it to WARN_QA, then
  use package_qa_handle_error() to handle it.

- For the bb.error(), give it a message name and add it to ERROR_QA,
  then use package_qa_handle_error() to handle it.

- All the bb.warn() and bb.error() have been replaced in
  package.bbclass.

- A few bb.warn() and bb.error() in insane.bbclass have been kept since
  they can not be replaced or doesn't have to, for example the
  bb.error() in package_qa_check_license(), it will print the error
  message and then invoke bb.fatal() to fail the task, I think that we
  don't have to replace it with package_qa_handle_error().

- Put all the WARN_QA and ERROR_QA in one line, so that they can be
  redefined by the user easily.

[YOCTO #3190]
[YOCTO #4396]

(From OE-Core rev: 2f117ee615b703db07d3274ac592e2bd653743dd)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-07 16:48:27 +01:00
Robert Yang 43713b9e17 insane/package: let package.bbclass inherit insane.bbclass
RP's comment:
"What we're trying to do is move everything to use a standard mechanism
for reporting issues of this type (do_package). With insane.bbclass, you
can elect whether a given type of error is a warning or error and fails
the task."

* The package.bbclass had used package_qa_handle_error() which is from
  insane.bbclass, and we will use it for handling other warnings and
  errors, so let package.bbclass inherit insane.bbclass, this change will
  make the insane as a requirement (always included).

* Change the "PACKAGEFUNCS ?=" to "+=", otherwise there would be an
  error like:
  Exception: variable SUMMARY references itself!

  This is because we let package.bbclass inherit insane.bbclass, and
  PACKAGEFUNCS has been set in insane.bbclass, so the "PACKAGEFUNCS ?="
  will set nothing, then the "emit_pkgdata" doesn't run which will
  cause this error.

* Add a QA_SANE variable in insane.bbclass, once the error type
  is ERROR_QA, it will fail the task and stop the build.

[YOCTO #3190]
[YOCTO #4396]

(From OE-Core rev: 852dead71387c66ec0cba7c71e3814a74e409560)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-07 16:48:26 +01:00
Richard Purdie 1808552a86 autotools.bbclass: Factor out aclocal copying function
Some recipes may need to manually call the aclocal copying
functionality so factor this out into a function.

(From OE-Core rev: a5a08543c8cec43d993b2bba0ad6a9357c0a5e04)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-04 11:50:24 +01:00
Jesse Zhang c81ecf96ed sanity.bbclass: make sure python is a full install
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]

(From OE-Core rev: bb027a332f2f2927a6bcbc4c035b42a012d0579e)

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>
2013-06-04 11:43:35 +01:00
Jackie Huang 50fae526de sstate.bbclass: fixup extra hardcoded paths
sstate has a logic to fixup hardcoded paths in scripts,
but it misses in some specific cases, so add
EXTRA_STAGING_FIXMES to the fixup hardcoded paths
mechanism, so that we can specify what hardcoded paths
need to be fixed in a recipe, e.g.
EXTRA_STAGING_FIXMES = "STAGING_BINDIR_TOOLCHAIN"

(From OE-Core rev: 2e840db56c45b4c63fded55f4ed763b7099284b9)

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-06-04 11:43:35 +01:00
Jonathan Liu 9ba5cedf9a classes/buildhistory: record removals in buildhistory directory
"git add ." does not record files that were removed in the buildhistory
directory. Specify the -A flag to also record removals.

This was discovered by the following warning added in Git 1.8.3:
warning: You ran 'git add' with neither '-A (--all)' or '--ignore-removal',
whose behaviour will change in Git 2.0 with respect to paths you removed.

(From OE-Core rev: a45a247e2cfa58892a0c9eb050d603a38cd839db)

Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-04 11:43:35 +01:00
Ross Burton 3aaa4f78c6 utils.bbclass: ensure $0 is correct in wrapper scripts
Some packages (eg mesa) will invoke a tool with --version and do string matches
on the output (i.e. mesa does $LEX --version |grep "^flex ").  This doesn't work
with the combination of wrapper scripts and binaries that use $0 as they output
"flex.real".

Luckily bash's exec lets you set $0.  As we want to use this we can't use env,
but using export appears to work just as well.

(From OE-Core rev: e8d2a2a3646f964ec61ece62e14788cd7184dd01)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-30 21:10:23 +01:00
Ross Burton 2ab5dfceef pixbufcache: add more documentation
Add some more documentation to the PIXBUFCACHE_SYSROOT_DEPS variable to clarify
the usage.

(From OE-Core rev: b2f2d6a2b166b3c79cc5a0d386ee1dda2d4fa010)

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
Joe Slater 84de4f5b40 cmake.bbclass: modify construction of compiler flags
Use CFLAGS instead of CPPFLAGS for C_FLAGS variants.

When debug optimization is enabled in the local.conf, the debug (-O0) vs
production (-O2) does not change in the builds.  As the CPPFLAGS do not
contain the optimization settings.

Also the CXX_FLAGS are based on CXXFLAGS, so it makes sense to similarly
set the C_FLAGS based on CFLAGS.

(From OE-Core rev: 558662927be550aeb8dd163f65e16b1750bbd127)

Signed-off-by: Joe Slater <jslater@windriver.com>
Signed-off-by: Jeff Polk <jeff.polk@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-29 22:18:49 +01:00
Xin Ouyang c0b6f9bc33 qmake_base.bbclass: Add linux-gnun32-oe-g++ to QMAKESPEC
For some mips targets, TARGET_OS is set to linux-gnun32, while
linux-gnun32-oe-g++ is not listed in the default QMAKESPEC list of
qmake in oe-core/wrlinux. This would cause build failures for qt
apps, so add a matching rule to fix this.

(From OE-Core rev: 70b75d506e6c4b46694b00d674df9d4a94140bd6)

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-29 22:14:18 +01:00
Mark Hatle f543969c14 siteinfo.bbclass: Add mips64 common siteinfo
There is no mips64-common file, replace the definition with mips-common.

(From OE-Core rev: b6107abd50da651596c43119001cfc80fdf87554)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-29 22:14:17 +01:00
Ming Liu b08958bc22 rm_work.bbclass: ignore failure for removing pseudo folder
When building over NFS2/3 server, removal of pseudo folders will fail in
some cases for there are files in it still used by pseudo daemon, thus
cause ".nfsXXXXX" files generated which can't be removed by clients. This
will lead rm_work task fo fail.

These failures could be safely ignored because ".nfsXXXXX" files would be
automatically cleared by NFS server when no clients keep opening them.

[YOCTO #4531]
[ CQID: WIND00412051 ]

(From OE-Core rev: 9742e866f545bc0d04aca697b541ed88f4e1764a)

Signed-off-by: Ming Liu <ming.liu@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-24 14:14:48 +01:00
Phil Blundell 2129c5d9ef cross: Clear do_populate_sysroot[stamp-extra-info] so that stamps are not MACHINE specific
Otherwise we will try to run the setscene task once per MACHINE which will lead to
file conflicts in the sysroot for packages like gcc-cross.  The stamps
are already namespaced by TARGET_ARCH which should be sufficient.

(From OE-Core rev: 66d09565783186ab14fa77ecdfe2131a44a265ab)

Signed-off-by: Phil Blundell <philb-mXXj517/zsQ@public.gmane.org>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-24 14:14:46 +01:00
Martin Jansa e2aa060920 kernel: Remove unnecessary cd and rm, fix MODULE_TARBALL_SYMLINK_NAME creation
* DEPLOYDIR is used as target for every other file deployed by do_deploy,
  this was just unnecessary switching CWD to create relative symlink and I
  have no idea why rm -f was used together with ln -sf.

(From OE-Core rev: 8375782a295c6294ea4ab889c309bebf873f3489)

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>
2013-05-24 14:14:45 +01:00
Tomas Frydrych 32b4a4abd9 clutter.bbclass: removed unused function
Clutter and cogl no longer use --with-fpu configure option, so we no longer
require the get_fpu_settings() function.

(From OE-Core rev: ea59330c48cdb7d7106deea3f19c043ba60c23e4)

Signed-off-by: Tomas Frydrych <tomas@sleepfive.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-24 14:14:44 +01:00
Mike Crowe 600f4e38ad kernel.bbclass: Add dependency on binutils
Compiling the Linux kernel requires binutils; kernel.bbclass uses
INHIBIT_DEFAULT_DEPS so it had better depend on binutils explicitly.

(The lack of this dependency isn't always a problem because binutils
is required to build gcc-cross but if gcc-cross is reconstructed from
the sstate cache then gcc-cross's dependency on binutils-cross is
ignored due to being in the safe dependency list in
setscene_depvalid.)

(From OE-Core rev: 37beb7bdab78de5253a894f35afafa34c13a00f5)

Signed-off-by: Mike Crowe <mac@mcrowe.com>
Acked-by: Phil Blundell <philb@gnu.org>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-24 14:14:40 +01:00
Ross Burton 204b92c663 pixbufcache: update the loader cache when installing natively
Register a sstate postinst function so that when installing a native package,
the gdk-pixbuf loader cache is updated.

(From OE-Core rev: 7cbde5d8f2b88ec4e79cb0d564ee0f3c9baa7c2d)

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-24 14:14:38 +01:00
Richard Purdie 56a2b28724 sanity.bbclass: Drop dubious print
(From OE-Core rev: be4cd4614a2a702130d18e9d082fd83a15faa013)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-24 10:34:51 +01:00
Richard Purdie e8197722de buildhistory: Sync with bitbake changes
Adjust to the recent changes in the git fetcher. This code should work
with current and previous versions of bitbake and can be cleaned up when
we move to new bitbake versions.

(From OE-Core rev: 835b64d4e9ed7b627b56a75d529f1a403c5db1a8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-23 11:51:53 +01:00
Chen Qi d837fb346d image.bbclass: add postinst_enable_logging
Add a function postinst_enable_logging, so that when 'debug-tweaks'
is in IMAGE_FEATURES, we create ${sysconfdir}/default/postinst config
file, which is sourced by run-postinst scripts to determine whether
to log or not, and where to log.

[YOCTO #4262]

(From OE-Core rev: 99175cabc3936733dd92fac5ebc6f865b864fe92)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-23 10:28:04 +01:00
Richard Purdie 70e5a74bce task.bbclass: Drop deprecated class
Any users have had time to adapt to this change by now, drop the old class.

(From OE-Core rev: 9b64b68c93c71c503ef26fa440b974b82438dc88)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-22 17:16:55 +01:00
Richard Purdie e0ffc1f378 update-alternatives: Drop deprecated code, update to show error message
This code has been deprecated for a while and confuses the class, lets drop it
and just give the user hard error messages instead of the current warnings/fixups.

(From OE-Core rev: 72579e1fe49e8bc66c9f5850a2c679ce8941c85d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-22 17:16:55 +01:00
Tomas Frydrych 525771c46a clutter.bbclass: helper class for clutter and friends
(From OE-Core rev: 19b7e58b71d31071361f19fd82666d40653569c4)

Signed-off-by: Tomas Frydrych <tomas@sleepfive.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-21 09:30:15 +01:00
Robert Yang 0948a237dd image_types.bbclass: remove the old images
Remove the old image before the new one generated to save disk
space when RM_OLD_IMAGE is set to 1, this is an easy way to keep
the DEPLOY_DIR_IMAGE clean.

[YOCTO #4391]

(From OE-Core rev: b3e2e405c53d63bc71872d41f455507be833e7eb)

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-21 00:18:42 +01:00
Zongchun Yu 360bfe943a toolchain-scripts.bbclass:Add CROSS_COMPILE variable to environment-setup file
when compiling the linux kernel manually. users need to set CROSS_COMPILE separately.
adding the CROSS_COMPILE variable will be nice for using.

(From OE-Core rev: b66ec45e5dd9418a6568c04ef30854531a4b66f3)

Signed-off-by: Zongchun Yu <b40527@freescale.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-16 00:09:49 +03:00
Robert Yang 51c3e9df28 bbclass: bb.fatal() clean up
The bb.fatal() is defined as:

def fatal(*args):
    logger.critical(''.join(args))
    sys.exit(1)

So anything after bb.fatal() in the same code block doesn't have any
effect, e.g.:

    bb.fatal("%s_%s: %s" % (var, pkg, e))
    raise e

The "raise e" should be removed.

I searched all the files which use bb.fatal(), only the following 3
classes have this issues:

  insane.bbclass
  package.bbclass
  package_rpm.bbclass

[YOCTO #4461]

(From OE-Core rev: 4c47525c5a171b1282615c9fbc7d84addef85f92)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-16 00:09:47 +03:00
Jonathan Liu f5b103ff47 boot-directdisk: Scope HDDDIR and HDDIMG variables to avoid conflicts
These variables should not be shared with other image classes.
The bootimg class also has an HDDDIR variable that could be overwritten
if executing concurrently in the same image recipe.

(From OE-Core rev: 94c83fa26af104d28aa4e6951bcb109bb0c82265)

Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-16 00:09:46 +03:00
Jonathan Liu badd718253 syslinux: Update to 4.06
Patches are now part of upstream or no longer needed.
Added new util-linux dependency for isohybrid.
Paths updated to reflect directory structure changes.
Add CFLAGS and LDFLAGS overrides.

[YOCTO #4438]

(From OE-Core rev: 17e7ac0c5e75245d17a90e5cc49ade3d18a168ba)

Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-16 00:09:46 +03:00
Khem Raj 0c8173d7dc image.bbclass: Add package-management image feature to validitems
Some images dont use core-image bbclass and add this feature directly

Fixes parsing errors like

/builds1/angstrom/cache/prserv.sqlite3, IP: 127.0.0.1, PORT: 34734, PID:
24551 Parsing recipes...ERROR: Unable to parse
/builds1/angstrom/sources/meta-kde/recipes-images/angstrom-kde-desktop-imag
e.bb: Exited with "1" ERROR: 'package-management' in IMAGE_FEATURES is
not a
valid image feature. Valid features: dbg-pkgs debug-tweaks dev-pkgs
doc-pkgs ptest-pkgs read-only-rootfs splash staticdev-pkgs ERROR:
'package-management' in IMAGE_FEATURES is not a valid image feature.
Valid
features: dbg-pkgs debug-tweaks dev-pkgs doc-pkgs ptest-pkgs
read-only-rootfs splash staticdev-pkgs ERROR: Command execution failed:
Exited with 1

(From OE-Core rev: f9f1397d688cc4eb8d736066b1280bee40a8916a)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-14 15:02:36 +03:00
Richard Purdie efb8a460d2 package.bbclass: Fix sources contents
http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=c376f1f49cea182a2887945840ab97a20970a373
fixed a valid issue where the sources file was accumulating information
and subsequent task runs of do_packacge were not cleaning it. The
fix is wrong however since we're removing the file within a loop.
This fix removes the file outside the loop ensuring it is not truncated
and contains the correct information.

(From OE-Core rev: a015881f2207aded601459ba3eebbefb0002b3c5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-14 08:52:47 +03:00
Peter Seebach a9f5bf0ed3 sanity.bbclass: Attach the missing value to a format string.
The tuning changes to sanity.bbclass were almost right, but one of
the messages had a %s with no % operator.

(From OE-Core rev: cf5e40598ae9a83f22cabedc7b72000beb62703c)

Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-13 21:54:40 +03:00
Robert Yang fe17af27ae image-vmdk.bbclass: disable the NOISO = "1"
The vmdk needed hddimg which was generated by do_bootimg in the past,
but do_bootimg generated both iso and hddimg, so we set NOISO = "1",
it now uses do_bootdirectdisk, doesn't use do_bootimg anymore, so we
don't need NOISO = "1", and need remove it, otherwise:

IMAGE_FSTYPES += "live vmdk"

Would not generate the iso.

I'd like to remove it rather than comment it, but we had comment the
do_bootimg before.

(From OE-Core rev: c5c1517726aa103a3cdb60abda95e28997cac7c4)

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-12 09:37:32 +01:00
Paul Eggleton 1810369f77 classes/core-image: drop apps-console-core IMAGE_FEATURES support
Remove the legacy support for the apps-console-core IMAGE_FEATURES item;
we've kept this for a while but it's time for it to go.

(From OE-Core rev: bcd5ed8dd0e80cb76415cd2be9686d4e8023421d)

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-05-12 09:37:31 +01:00
Paul Eggleton d63c8a1597 classes/image: show an error on invalid IMAGE_FEATURES
If the user specifies an invalid feature in IMAGE_FEATURES, show an
error during parsing. Valid IMAGE_FEATURES are drawn from
PACKAGE_GROUP_ definitions, COMPLEMENTARY_GLOBS and a new 'validitems'
varflag on IMAGE_FEATURES (so that additional non-package group features
can be added elsewhere.)

Implements [YOCTO #3308].

(From OE-Core rev: 8d25442ab795ff0f8e072da2022108eff128e2b2)

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-05-12 09:37:31 +01:00
Jonathan Liu 00aa0b315b image-vmdk: Fix error recreating symbolic link
If the vmdk image symbolic link already exists from a previous build,
overwrite it instead of returning an error.

(From OE-Core rev: bcfb5a783dc94fe38539a19f4f7de249ce2391c1)

Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-12 09:37:31 +01:00
Stefan Stanacar cef2446eb3 imagetest-qemu.bbclass, qemuimage-testlib: add support for more FSTYPES
qemuimage-testlib hardcodes ext3 as fs type. This adds support for more
images types which are supported by runqemu: ext[234]/jffs2/btrfs.

I've skipped (for now) vmdk (which qemu can boot) because:
 - we don't have network on images without connman because of the way
runqemu starts vmdk images (can't pass kernel args for network config)
 - qemuimage-testlib-pythonhelper relies on '192.168' being in the output of
ps to return the pid

(From OE-Core rev: 95b7cafafcaa4dda7328632475003f5778ab95bd)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-12 08:33:16 +01:00
Paul Eggleton 15aec44b2d classes/insane: add check for PN in OVERRIDES
If a recipe is named such that its PN value matches something already in
OVERRIDES (such as when PN happens to be the same as MACHINE or DISTRO),
it can have unexpected consequences. Assignments such as
FILES_${PN} = "xyz" effectively turn into FILES = "xyz".

Implements [YOCTO #4288].

(From OE-Core rev: c331f0a5cac765174a1b5de5c12aec7e965d4158)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-10 11:37:16 +01:00
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
Robert Yang 843e422879 boot-directdisk/bootimg/image-vmdk: remove more nostamps for image generation
We have removed the nostamps for do_rootfs and do_build, so it seems
reasonable to remove the stamps for do_bootimg, do_bootdirectdisk and
do_vmdkimg.

The current problem is that the do_vmdkimg always re-run, but the
do_rootfs may not, so the code like below in the do_rootfs function
doesn't re-run and cause problems (the symlink exists when the
do_vmdkimg creates the symlink again):

    if d.getVar('IMAGE_LINK_NAME', True):
        cmds += "\trm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.*"

(From OE-Core rev: 45c7dab5d51065c7b24ab5292f8e9d3104eb0626)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-10 10:25:29 +01:00
Tom Zanussi 3bae24306a kernel.bbclass: make FILES package-specific
Fix QA warnings seen when using 'traditional' kernel recipes e.g.:

WARNING: QA Issue: .../recipes-kernel/linux/linux_3.0.18.bb: Variable
FILES is set as not being package specific, please fix this.

(From OE-Core rev: 799c16ed317aed7638e264ee2f92e4b722f1b011)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-10 10:15:51 +01:00
Richard Purdie f1a0635172 imagetest-qemu: Fix indentation
(From OE-Core rev: 23ba10c61ff26bffb1a84972eb4e0bfb03561f89)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 22:28:04 +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 d2ef952851 buildstats: Drop spurious open() call
This file is already opened a few lines previously, so drop the duplicated
call.

(From OE-Core rev: 4808629faa1222b31f92a3e410e06adb8e081293)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 22:28:03 +01:00
Richard Purdie 4a9daa971c useradd: Use modern join syntax
string.join() is deprecated syntax and doesn't work under python3
so use the modern sytax instead.

(From OE-Core rev: 402d652edf79bcfe1eaf1a3b55ad1177d1e3ee85)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 22:28:03 +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 8aa498d895 base.bbclass: Drop unused/obsolete import
(From OE-Core rev: e501a98e87b8854040ac4081326871d7d6397917)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 14:06:51 +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 e1b5647d2c insane: Open file in binary mode
We open the file we're writing to in binary mode so open the input stream with the
same mode so things match. This avoids errors with python3.

(From OE-Core rev: 4f47b3a4726dd47e8a6db228fcaf25d1890e3e52)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 14:06:51 +01:00
Richard Purdie 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 caa8b29c77 metadata_scm: Replace deprecated operator
The <> operator is deprecated, use != instead which is equivalent.

(From OE-Core rev: dde7af5f6c769eae721b1ee18462b841c8ea3277)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 14:06:51 +01:00
Richard Purdie 9ebcb98121 sanity.bbclass: Use open(), not file()
file() syntax is removed in python 3, use open() instead.

(From OE-Core rev: b2d10f15db23246e3957b69d77433f87674928bb)

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 db8217f6b8 classes: Use modern exception raising syntax
Modern expection rasing syntax is function call format, convert to this
to keep python 3 happy and model correct coding style in the core.

(From OE-Core rev: f4b382754603d3f1caa13824bcc8d06b568bbc59)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 14:06:50 +01:00
Richard Purdie e0bd393be8 buildstats: Update to ensure files are closed
python3 doesn't like files being left open. This updates the code style
to ensure file are closed.

(From OE-Core rev: ec74285bd2108f12f33fc8ac0dc1d124ab48be21)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 14:06:50 +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
Robert Yang 19f71dd389 bootimg.bbclass: add comment for NOHDD
Add comment for NOHDD which is used for skipping building the HDDIMG if
set to 1

(From OE-Core rev: 9843ad9d783f68b97fedfe5b435528538bb26c1c)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 08:51:13 +01:00
Laurentiu Palcu 3438927b30 archive-*-source.bbclass: handle dependency in anonymous function
Using "before do_rootfs" would have this task added to do_rootfs
dependencies regardless of the filtering options. Instead, add this
dependency in the anonymous python function.

(From OE-Core rev: 2400a74923e51e17ecfa94c2d63908b0b2aac76a)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-07 13:58:26 +01:00
Martin Jansa 8fb24e1d27 buildhistory: change default BUILDHISTORY_DIR to TOPDIR
* like PERSISTENT_DIR I find BUILDHISTORY_DIR more persistent
  then tmp-eglibc directory
* WARN: people with existing checkouts in TMPDIR/buildhistory
  need to move it to new location first (in order to save history)

(From OE-Core rev: d3ad9a4c573fec08b5606a4c3e86f93cb95e8718)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-03 16:27:13 +01:00
Laurentiu Palcu a8eca39001 archive-*-source.bbclass: have do_dumpdata_create_diff_gz task run before do_rootfs
do_rootfs[cleandirs] contains ${S} and, if do_rootfs task starts before
the do_dumpdata_create_diff_gz is finished, an error will occur in the
process because the directory will be removed while still needed by the
create_diff_gz() function.

This patch will force the do_dumpdata_create_diff_gz task to run before
do_rootfs when the final image is created.

[YOCTO #4310]

(From OE-Core rev: cd90be31571178d6822dba5a94a2795209a3576c)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-03 16:19:20 +01:00
Tomas Frydrych bd35213554 image_types: fix default location of kernel when generating elf images
Generation of elf images fails because kernel images are no longer staged under
${STAGING_DIR_HOST}/kernel, but rather ${STAGING_DIR_HOST}/usr/src/kernel. This
patch fixes the path to point to the correct location.

(From OE-Core rev: 6e57a3231fb29f869d476b8511d6f4393f82651b)

Signed-off-by: Tomas Frydrych <tomas@sleepfive.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-03 16:19:20 +01:00
Phil Blundell db92131201 image.bbclass: Don't mark do_rootfs and do_build as nostamp
When image.bbclass was first conceived (as rootfs_ipk.bbclass), oemake
was unable to figure out when the inputs to do_rootfs had changed in
such a way that it would need to be rerun.  Absent any reliable
information of this kind, it was necessary to adopt the conservative
assumption that images always needed rebuilding and, to this end,
do_rootfs and do_build in image recipes were marked as nostamp.  (The
nostamp annotation for do_build was added in oe-classic commit
80d622e0c1dbc284858e01d3eb670303a6d8cdf9 from January 2005; the exact
point at which do_rootfs was made nostamp is obscure, but it predates
oe-classic revision 63fad339e01d4b16105146c32a61f24460397126.)

This situation persisted for the following eight years but, during that
period, oemake evolved into today's sstate-enabled bitbake, oe itself
gained the OEBasicHash algorithm which can reliably detect changes to
the input data for do_rootfs or any other task, and OEBasicHash was made
the default for oe-core in 4199efed48005a62267fa3374c33b13627d85f44
(June 2012).

Given these various changes in the wider landscape, there is no longer
any obvious benefit to having these two tasks marked as nostamp, and
indeed having them so marked causes needless rebuilds which can be
annoying.  Anybody who does genuinely wish to rerun these tasks when
nothing in the input has changed can run "bitbake -f", just like with
any other task.  So, let's remove the nostamp annotations and just let
bitbake figure out when to rerun them.

(From OE-Core rev: 8505008c115efb54d18e5f25441c7a938a32ffaf)

Signed-off-by: Phil Blundell <philb@gnu.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-03 16:19:20 +01:00
Paul Eggleton 58412ca75b classes/image: allow complementary package globs to be extended
Make it easy for the wildcard specifications for complementary package
features to be extended outside of image.bbclass. For example, to add a
new "foo-pkgs" item that could be added to IMAGE_FEATURES that would
cause *-foo packages to be installed for all packages currently in the
image, you can now use this line at the global level:

COMPLEMENTARY_GLOB[foo-pkgs] = "*-foo"

Implements [YOCTO #4228].

(From OE-Core rev: 4e39c1b9dbba1d2b07ffc2c6a1a252fc8f7680ee)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-03 16:19:20 +01:00
Jessica Zhang 8d3285f99b Make toolchain output name using SDK_VERSION instead of DISTRO_VERSION to be consistent [yocto #2342]
(From OE-Core rev: 733f1d2a1bcf1c115613e21f7d09f1b4bee216ce)

Signed-off-by: Jessica Zhang <jessica.zhang@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-02 17:41:55 +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
Laurentiu Palcu 4a3d4b8d7a Pass the mlprefix to postinst_intercept script
This is needed in order to have separate multilib intercept hooks.

(From OE-Core rev: 44eae13c164ca6e15a6013eafeab3eb44f24c8e0)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-29 14:45:10 +01:00
Laurentiu Palcu cf76b424f5 Revert "qemu.bbclass: Use the correct qemu binary in multilib cases"
This reverts commit 9f5a6f89d9.

The reason for reverting this is:
 * qemuwrapper has now a fallback method;
 * when using multilib, calling qemu_target_binary from recipes would
   always point to the qemu binary corresponding to the machine
   architecture. Hence, postinstalls needing to use qemu would call the
   wrong qemu user emulation binary;

(From OE-Core rev: 15408466515cec7cbb4c394aa203c87b6165f884)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-29 14:45:10 +01:00
Marcin Juszkiewicz 3e79775a82 cpan.bbclass: use '|' as sed separator for entry with paths
With normal toolchain it works. But fails badly when external Linaro
toolchain is used. And this is why:

-e "s/^\(CCFLAGS =.*\)/\1  -isystem/home/hrw/devel/canonical/aarch64/openembedded/build/linaro-tcwg/gcc-linaro-aarch64-linux-gnu-4.7-2013.04-20130415_linux//aarch64-linux-gnu/include  -O2 -pipe -g -feliminate-unused-debug-types/" \

(From OE-Core rev: f6244a9d3da7c301f19efc114c2aaf39e5eec299)

Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-29 14:45:06 +01:00
Phil Blundell 2895bcf95a sstate: Set umask to 002 before packaging runs
Otherwise we might end up creating directories under sstate-cache with whatever
random umask has been selected for the task that we're trying to package.  This
would be a bad thing since it might result in losing group write access for
newly created dirs, and/or losing group read access for the sstate files
themselves.

(From OE-Core rev: d8c4f442c41bf3ac5e064630657cd3fa1b5c43b1)

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>
2013-04-29 14:45:06 +01:00
Phil Blundell 5652086c75 kernel-arch: Always use ld.bfd to link the kernel
The kernel's penchant for custom linker scripts means that it doesn't
generally get on very well with gold.  Make sure we are using the BFD
linker here no matter what the distro default is set to.

(From OE-Core rev: 5c8277610ae84740e0724b27f10dba3895d40c05)

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>
2013-04-28 12:12:21 +01:00
Christopher Larson 824962fcf2 package.bbclass: ensure license excluded files aren't packaged
An excluded package left its files behind, which meant they could end up in
another package instead, meaning we could ship GPLv3 binaries even with GPLv3
in INCOMPATIBLE_LICENSE. Skip the files belonging to the excluded packages to
prevent this from occurring.

(From OE-Core rev: c045bfe6b991006ac80f0e2d06a8917ae58d9262)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-22 14:45:04 +01:00
Christopher Larson fd4f354853 package.bbclass: add LICENSE_EXCLUSION to vardeps
Ensure that changes to INCOMPATIBLE_LICENSE re-run do_package for affected
recipes.

(From OE-Core rev: b9b187f8a0f513e676cd3d18f71d1055445f29fa)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-22 14:45:03 +01:00
Laurentiu Palcu d9f153f489 image.bbclass: change the logic when intercepts fail
Due to some issues with postinstalls that register hooks, we changed the
logic a bit. Now, all postinstalls that register hooks will return
successfully and only after, if hooks fail, mark the package as unpacked.

(From OE-Core rev: 82dae98d0eb771c05e57635f0f8763b118d8177e)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-22 14:45:02 +01:00
Laurentiu Palcu 5e702edaa4 pixbufcache.bbclass: do not exit 1 after installing intercept hook
This will allow to register, in a single postinstall, multiple hooks.

(From OE-Core rev: b396138ee081c8f5dddbaab0e374787ba2e31029)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-22 14:45:02 +01:00
Laurentiu Palcu 6304ba31d5 gtk-icon-cache.bbclass: do not exit 1 after installing intercept hook
This will allow to register, in a single postinstall, multiple hooks.

(From OE-Core rev: 2cd244d6c93ec6d39e2649de64575c365bd4238d)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-22 14:45:02 +01:00
Laurentiu Palcu 9e729f1f18 fontcache.bbclass: do not exit with 1 after installing intercept hook
This will allow to register, in a single postinstall, multiple hooks.

(From OE-Core rev: 9553874cf02ba443aff1bbead56bacfcda9bb6ca)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-22 14:45:02 +01:00
Richard Purdie 277cae2b2c package_ipk: Ensure the status file exists
The postinstall for the opkg run-postinst hook checks for the existence of this
file. We therefore ensure it always exists during image generation.

(From OE-Core rev: 540cf355599e555615ed9684c3b480463588eb78)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-18 21:12:19 +01:00
Richard Purdie 8e74a9795c package.bbclass: Add useradd variables to PACKAGEVARS
THe USERADD_PARAMS and similar group variables are package specific variables
which should get added to the vardeps of the packaging process. This
change also ensures they get remapped correctly by the multilib code.

(From OE-Core rev: 805add18e7b917aaef61c82c0b5f2e9682af1d0d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-18 21:12:19 +01:00
Richard Purdie 57fdbe9bcc multilib: Ensure we map the USERADD_PACKAGES variable
If we don't do this, multilib packages don't have any code
added to the postinstalls to handle user additions.

(From OE-Core rev: b10d17d1b03fd0564103a6998f218d0968d1032b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-18 21:12:19 +01:00
Richard Purdie 1261eccd8f packagegroup: Add init-manager sanity check
Currently, you can set VIRTUAL-RUNTIME_init_manager to an init system that
isn't in DISTRO_FEATURES. This leads to head scratching over unbootable images.

This adds a sanity check which ensures more valid systems are built.

(From OE-Core rev: c72ec4b52827f75351790eab483d258b2e87611a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-18 00:37:57 +01:00
Richard Purdie 79a205be0d package.bbclass: Fix populate_packages for glob expansion issues
If we put a valid glob like "*/foo/*" into FILES, populate_packages
breaks with a "file exists" message. This is because the glob expansion
does not have "./" prefix however there may already be an entry in
the seen list which does have such a prefix. The easiest/simplest fix
right now is to add the prefix if it doesn't exist which only happens
for certain globs.

(From OE-Core rev: 138c5f3af892e33f576fc7dd268e122b179f82a1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-18 00:37:57 +01:00
Richard Purdie b45615a6ad update-alternatives: Ensure DEPENDS is correct in multilib case
Ensure that the DEPENDS we're adding is correct in the multilib case by
including MLPREFIX, fixing unnecessary dependencies in those images.

(From OE-Core rev: 1fa8909e24866ffada75daf63225c8daa000b9be)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-15 15:57:29 +01:00
Richard Purdie b5845de167 kernel.bbclass: Ensure we have correct version information in deploy data
Currently the names used for the kernel in deploy will contain "AUTOINC"
instead of the final incremental numbering. This fixes the problem by
ensuring data is obtained from the PR service and using the PKG* variables
instead of PE/PV/PR directly.

[YOCTO #4293]

(From OE-Core rev: 1392f959cb8cd50b5a4492899e54f3ed68ef56d7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-15 15:57:29 +01:00
Richard Purdie 093dec12e6 package/image.bbclass: Fix multilib rprovides
allarch multilib recipes are meant to provide a list of different multilib variants.
Unfortunately since the pkgdata also has mappings for these, they get mapped back to
the original package name which means the effect is undone at package creation time
when the remapping code is called.

This patch adds in a conditional to break that chain meaning the packages get
the correct RPROVIDES and image builds work correctly with opkg.

[YOCTO #3453]

(From OE-Core rev: 1a1927f8a04fe0a2b3b853ebdd33ccb807f00b59)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-13 23:49:28 +01:00
Paul Eggleton db61a66dba classes/sanity: fix handling of bblayers.conf updating
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.

(From OE-Core rev: 46b00fdfc9d1e3dc180de087bae2682a1baa2954)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-13 23:49:28 +01:00
Khem Raj 48f827e7d7 kernel.bbclass: Optionally create lib dir during deploy
when we have multilib and a 64bit machine and initramfs then image/lib
directory will not be created and it will end up with errors like

| DEBUG: Executing python function sstate_task_prefunc
| DEBUG: Python function sstate_task_prefunc finished
| DEBUG: Executing shell function do_deploy
| tar: lib: Cannot stat: No such file or directory
| tar: Exiting with failure status due to previous errors

So in order to overcome this shortcoming lets mkdir -p the
lib directory so the modules can be happily installed.

(From OE-Core rev: 3f501204f375cc40a14597a25cb09faaba9ff802)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-12 17:00:44 +01:00
Martin Jansa 230441f0c8 icecc: Allow to use this bbclass together with external toolchains
* original implementation by Antti Harju

(From OE-Core rev: abb5bd9f2d3583808b61a0832378e4db45022be6)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-11 15:44:23 +01:00
Hongxu Jia c567366d3b package_rpm.bbclass: fix build multilib image failed when PR Server enabled
1, In bitbake.conf
   PKGR ?= "${PR}${EXTENDPRAUTO}"
   EXTENDPKGV ?= "${EXTENDPKGEVER}${PKGV}-${PKGR}"
   RDEPENDS_${PN}-dev = "${PN} (= ${EXTENDPKGV})"

2, When PR Server is enabled, EXTENDPRAUTO is not none which means PKGR and PR
don't have the same value.

3, When multilib is enabled, RDEPENDS_${PN}-dev is not expanded correctly
which uses PR rather than PKGR in the versioned dependency string.

4, Make sure PKGR rather than PR in version string when do_package_rpm.

[YOCTO #4050]

(From OE-Core rev: cf53c606fc1bc81abb68b6851ae68916f92e1d84)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-11 14:02:27 +01:00
Björn Stenberg 44120a053c ptest bug fixes
Move ${PN}-ptest to start of PACKAGES to ensure all ptest files are
packaged in the -ptest package.

Add QA exclusions to insane.bbclass to ensure -ptest packages can contain
any files they need.

Disable ptest for native packages.

Don't emit errors on missing _ptest functions.

(From OE-Core rev: 01bea4ef932e46eb2fcc8b4be7ff5e2b5b2a0978)

Signed-off-by: Björn Stenberg <bjst@enea.com>
Signed-off-by: Anders Roxell <anders.roxell@enea.com>
Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-11 12:20:35 +01:00
Michel Thebeau cd2f003b51 kernel.bbclass: do_strip: allow recipes to strip the kernel
Allow recipes to specify sections to be stripped from the kernel output
using KERNEL_IMAGE_STRIP_EXTRA_SECTIONS.  For example:

KERNEL_IMAGE_STRIP_EXTRA_SECTIONS = ".comment .unwanted"

The kernel output is stripped in place.

Since the toolchain does not give indication when the specified sections
are absent, we read the sections first and make this report by issuing a
warning to the developer.

The toolchain by default strips the image with the -s option (even
when -s is not specified):
-s --strip-all       Remove all symbol and relocation information

For example, these sections are always removed:
.debug_aranges
.debug_info
.debug_abbrev
.debug_line
.debug_frame
.debug_str
.debug_loc
.debug_ranges
.symtab
.strtab

In addition to these, the sections listed in
KERNEL_IMAGE_STRIP_EXTRA_SECTIONS will also be removed.

Only stripping of vmlinux (elf) is supported at this time.  A warning
will be given if the image type is not vmlinux.

Stripping the image could also be done in the kernel, but that would
only work for linux-yocto based kernels, so it's not the route we
decided to go.

[YOCTO 3515]

(From OE-Core rev: 5f6d33b05b4e7883f2728ca812cb5386d1e36989)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Michel Thebeau <michel.thebeau@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-11 09:03:21 +01:00
Laurentiu Palcu 2435d807d1 postinst-intercepts, qemu.bbclass: fix segfaults in postinstalls
Postinstalls that use qemu are throwing a segmentation fault when
building for qemux86-64 on a 64bit host (it might also happen for
qemux86 if building on a 32bit host but I didn't test). It looks like
qemu looks for ld.so.cache which is not found because it is generated
after rootfs_(rpm|ipk|deb)_do_rootfs is called and then it tries to load
libraries from the default paths (which are the host's). In order to
avoid this, pass the LD_LIBRARY_PATH explicitly to the target's dynamic
loader.

(From OE-Core rev: 48e8b613b3f5c7b1d917bf3147606d44072ce49e)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-10 12:56:52 +01:00
Ross Burton 8cab6d76f8 update-rc.d: correctly look up the initscript params with overrides
The creation of a clone of d with extra OVERRIDES was removed in
72c1fd72d3b479c728e249eaa763116d352e945b but some of the lookups are essential
so that variables such as ${INITSCRIPT_PARAMS} get overriden and resolved
correctly on a per-package basis.

[ YOCTO #3960 ]

(From OE-Core rev: b016bc9aaabc90fe4dc98af8c5e73dfcb4526ef4)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-10 12:56:52 +01:00
Paul Eggleton f32d58076e classes/license: remove outdated comment
Package listing was implemented in the deb backend some time ago.

(From OE-Core rev: e2915b6e1d2088d3a791bf629dabc58f38940961)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-10 09:23:18 +01:00
Ross Burton f6ae87e838 systemd.bbclass: restart service in postinst, not start
When upgrading packages it's possible that the service is already running
because opkg doesn't actually execute the prerm hooks on upgrades, which is
where the service should be stopped.

Handle this case by restarting in postinst instead of starting.  If the service
isn't already running then this doesn't make a difference, but if it is running
then the service will be restarted.

[ YOCTO #4213 ]

(From OE-Core rev: 319ef0df4ae7ed0372eff90e11244123eccb023c)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-09 18:09:14 +01:00
Otavio Salvador 9bb5eb86c1 base.bbclass: Fix matching of MACHINEOVERRIDES in COMPATIBLE_MACHINE
The use of SOC_FAMILY here is old code and SOC_FAMILY is now implemented by
MACHINEOVERRIDES behind the scenes. It therefore makes more sense to use
the replacement value in this code. Just like SOC_FAMILY, this is a ":"
delimited variable so we should iterate over the components, not use
the value directly.

Finally, MACHINEOVERRIDES contains MACHINE so we don't need to check that
directly.

This makes the functionality match what most users would expect it to do
and is also compatible with the way things previously worked.

(From OE-Core rev: 8ceef74dd4f662b4c7e3c170ce486e966ebebeff)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-09 13:19:43 +01:00
Paul Eggleton fb37dd6822 classes/buildhistory: fix interaction with rm_work
Change do_write_srcrevs to a postfunc of do_fetch, avoiding a dependency
being created that causes large numbers of setscene tasks being executed
on every build with both buildhistory and rm_work being enabled.

(From OE-Core rev: a751e9042dfffcc5c4701634a1f1f598012d609c)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-09 13:16:52 +01:00
Michel Thebeau e57284abca kernel.bbclass: do_sizecheck: update path to build image and do not delete
do_sizecheck has a few issues especially with vmlinux image type.

It breaks because KERNEL_OUTPUT is a path relative to ${B}.  When
do_sizecheck runs it does not find the file (because the working
directory is elsewhere) and does not fail.

Also, the image file referenced by KERNEL_OUTPUT may be a link.

Finally, when do_sizecheck deletes the oversized kernel image it leaves
the previously run do_compile task with inaccurate status.

So, do the following:
 - specify that the working directory should be ${B}
 - use ls -L to reference to the real file, and ensure that the link
   file is created
 - keep the oversized image file so the status of do_compile is valid

[YOCTO #3514]

(From OE-Core rev: f0b19ddce3c92c5d06976cf73d4c4c480e053dff)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Michel Thebeau <michel.thebeau@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-08 22:26:24 +01:00
Laurentiu Palcu 51f8dffecc image.bbclass: fix postinstall intercepts fallback
The wrong type of paranthesis was used so 'continue' did nothing (was in
another context) and the packages were marked as installed.

(From OE-Core rev: 0bdde53e885aae3506c7b070b6e21f64a7cd4115)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-08 16:56:46 +01:00
Nathan Rossi 647caeb0fb insane.bbclass: Updated MicroBlaze machine definitions
* Removed existing definition with machine 47787, this
  definition is outdated, a sanity error should occur if an ELF uses this
  value.
* Added new definition with machine 189. This value replaces the existing
  value since August 2009. See binutils thread for more information.
  (http://sourceware.org/ml/binutils/2009-08/msg00127.html)

(From OE-Core rev: 0c60d3b04eb77629abc3bbc2a6d8a2b8f0a44309)

Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-08 16:56:45 +01:00
Laurentiu Palcu 1872ee316b postinst-intercepts, qemu.bbclass: fix issue on 32 bit hosts
The intercept scripts fail to run on 32 bit hosts. Apparently, the
current approach worked on 64 bit hosts due to the larger virtual address
space (probably). On 32 bit hosts, however, calling the target binary like:

qemu-arm ld-linux.so --library-path /lib:/usr/lib arm_binary

fails with:

arm_binary: error while loading shared libraries: arm_binary: failed to
map segment from shared object: Operation not permitted

When run like this, qemu-arm fails to map the arm_binary executable in
memory because it's hitting the lower limit of
/proc/sys/vm/mmap_min_addr. That's because it loads the
ld-linux.so binary successfully, taking into account mmap_min_addr, runs
it, and then ld-linux.so will map the arm_binary at a fixed address but this
will fail because it is below mmap_min_addr. The qemu's guest base probing,
apparently, doesn't work fine when a program runs inside other.

One way around this would be to set mmap_min_addr to 0 (on recent
distributions is set to 65536 to avoid "kernel NULL pointer dereference"
defects) but this approach is not safe.

The other way is to call the binary directly but providing qemu with a
prefix (-L option) in order to find the elf interpreter correctly. This
way, both the target binary and dynamic loader are mapped into memory
under qemu's control and, only after, the dynamic loader is started.

[YOCTO #4179]

(From OE-Core rev: 78f91e08c8a7b0f0c831a087f7c89e2c76047e7a)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-05 17:36:34 +01:00
Andrei Dinu 4dbdcf9462 Add file information to package information window
Removed the package files parsing routine from the
packageinfo.bbclass file and added it to the
package.bbclass file.

(From OE-Core rev: 225e7826b0d082f43db82201e826b98b3a95cd57)

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-04 14:10:56 +01:00
Martin Jansa d040acb904 buildhistory: record tag names and show warning when the same tag corresponds to different revision
* persistent cache records tag-srcrev mappings, but is not shared between builders
* when tag is moved in remote repo, all builders should rebuild the component to
  use the same source, show warning when revision is different than what was used
  in last build

(From OE-Core rev: 0bc22ed6bd67031749e8f2cb5415dabf933eef56)

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>
2013-04-04 14:04:41 +01:00
Paul Eggleton c7f52855f9 classes/sstate: avoid traceback when no files have been staged
If no files have been staged we want to continue without error instead
of showing a traceback.

Fixes [YOCTO #4056].

(From OE-Core rev: ca36be708e54c0c86535bc8512295c76c48f6cf5)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-03 17:01:13 +01:00
Bogdan Marinescu 8866aeefb7 package_deb.bbclass: fix 'armel' override
The 'armel' override for DKPG_ARCH was causing the meta-toolchain
build to fail. The assignment was moved to an anonymous fragment
of Python code, so it doesn't affect the assignments in
cross-canadian.bbclass anymore, thus fixing the issue.

[YOCTO #4080]

(From OE-Core rev: 6f86fe5d66e401377bccd9f635270033b99a9f4b)

Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-03 17:01:13 +01:00
Kevin Strasser 3e4655d951 archiver: fix srpm archiving build errors
srpm archiving doesn't need to be handled as a different case
when deciding what archive tasks to add.

When srpm is selected as the archiving type, the scripts and logs
archive staging directory ${WORKDIR}/script-logs is cleaned, and
its contents moved out to ${WORKDIR}.

Now that we are including ${WORKDIR}/script-logs in sstate-inputdirs,
the directory must be preserved.

[YOCTO #4032]

(From OE-Core rev: 0c80286a3383b436a0a63a0b00eb357dd9dea4fb)

Signed-off-by: Kevin Strasser <kevin.strasser@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-03 17:01:13 +01:00
Mark Hatle 805eede157 base.bbclass: Update the preferred_ml_updates
When processing the blacklists, we should avoid cross-canadian packages, as they
will not have any multilib prefixes to expand.

Similarly look for "virtual/nativesdk-" in addition to the existing "nativesdk-".
These items should also be ignored.

Finally, in order to avoid undeterministic variable key expansion, such as:

MYVAR = "foo"

PREFERRED_PROVIDER_${MYVAR} = "bar"
PREFERRED_PROVIDER_foo = "foobar"

during the multilib processing of PREFERRED_VERSION and PREFERRED_PROVIDER,
the code was changed to rename the variable key, to the final key.  This along
with the existing code avoids the problems.

(From OE-Core rev: 1416613e94af46c6e74532bca0f026d1540becbb)

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>
2013-04-03 17:01:12 +01:00
Martin Jansa c0910f26ea update-rc.d, systemd: redirect also stderr from type
* different shells different behavior?
  bash prints 'type: update-rc.d: not found' on stderr
  busybox's sh on stdout

(From OE-Core rev: 45e22312c48b23480bd6dff98702b0691a48f7d1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-02 18:16:24 +01:00
Andreas Müller 69aaafe5ef remove gtk-update-icon-cache-native virtuals
gtk-update-icon-cache-native is the only provider now

(From OE-Core rev: 7e437aa3e0ec862aac69a4434be0b2b652d26972)

Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-02 18:11:06 +01:00
Andreas Müller 13837e5a31 sstate.bbclass: remove reference to gtk+-native
(From OE-Core rev: 13bc0117a0a18165e83e2bcdd880e704a0df5e3f)

Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-02 18:11:06 +01:00
Jeff Polk b50626c6f0 sstate: add -f to mv when moving sstate files into place
Under some conditions (ACLs enabled, NFS) mv can interactively prompt
before overwriting files.  Avoid hanging builds in that case by using
-f which should be harmless in other cases.

(From OE-Core rev: b1a085db9d8ad2a3117af6f50e510bc9c2f9407b)

Signed-off-by: Jeff Polk <jeff.polk@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-02 18:08:23 +01:00
Bruce Ashfield 5638954a18 kernel-yocto: use KBRANCH as default build branch
commit 61001aa [kernel-yocto: respect SRC_URI modified branch selection]
changed branch processing such that a branch specified in the SRC_URI
would set the branch forced as the build branch.

This change broke compatibility with the yocto-bsp, linux-yocto-custom
based recipes. These recipes specify the branch to be built via KBRANCH,
but allow the fetcher to use master for keeping the repository up to
date. This means that no explicit branch is set in the SRC_URI and the
routines return the default branch of 'master', which is not what is
set in KBRANCH.

To support this case, we simply pass a default branch into the routine
returning the branch to build, and ensure that the default is KBRANCH
so if no branch is passed in the SRC_URI, KBRANCH is always built.

[YOCTO #4145]

(From OE-Core rev: 0c389f41d7ea0697a5468c73cce295a2fa64e9e0)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-02 18:08:23 +01:00
Andrei Dinu 1e82bc1be1 packageinfo.bbclass : extended functionality
Extended the functionality of packageinfo.bbclass
so that the sistem retrieves information about the
files brought in by each package. This is done
(without activating buildhistory) by parsing
the packages-split directory for each package.

(From OE-Core rev: 108bae276fe7e462378073207a3bdca7326f8e57)

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-29 10:40:56 +00:00
Marc Ferland 8eb1fd4aa0 image_types.bbclass: Replace squashfs-lzma with squashfs-xz
Booting an image generated with squashfs-lzma results in a kernel
error: "Filesystem uses "lzma" compression. This is not supported".

Currently (well at least in Linux 3.8) the officially supported
decompressors are:
* LZO
* XZ
* ZLIB

This change makes sure we use a supported compression algorithm for
squashed root filesystems.

(From OE-Core rev: d915e2e084257830c43f7f21af3aec24b7e1a211)

Signed-off-by: Marc Ferland <ferlandm@sonatest.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-29 10:40:55 +00:00
Paul Eggleton 9a3fbf92c4 classes/buildhistory: improve SRCREV recording
Collect SRCREV information in a separate task and write it out in a
format which is more consistent with the rest of the buildhistory
output. Using a task means that SRCREV values will also be recorded for
native recipes and not just target ones, and the new formatting also
correctly handles multiple entries in SRC_URI.

Also adds scripts/buildhistory-collect-srcrevs which will report on all
of the recorded SRCREV values in a format suitable for use in global
configuration (e.g. local.conf or a distro inc file) to override AUTOREV
values to a fixed set of revisions. Example output:

 # emenlow-poky-linux
 SRCREV_machine_pn-linux-yocto = "b5c37fe6e24eec194bb29d22fdd55d73bcc709bf"
 SRCREV_emgd_pn-linux-yocto = "caea08c988e0f41103bbe18eafca20348f95da02"
 SRCREV_meta_pn-linux-yocto = "c2ed0f16fdec628242a682897d5d86df4547cf24"
 # core2-poky-linux
 SRCREV_pn-kmod = "62081c0f68905b22f375156d4532fd37fa5c8d33"
 SRCREV_pn-blktrace = "d6918c8832793b4205ed3bfede78c2f915c23385"
 SRCREV_pn-opkg = "649"

Some notes on using this script:
* By default only values where the SRCREV was not hardcoded (usually
  i.e. AUTOREV was used) are reported - use the -a option to see all
  SRCREV values.
* The output statements may not have any effect in the face of overrides
  applied elsewhere; use the -f option to add the forcevariable override
  to each output line to work around this.
* The script does not do any special handling for multiple machines;
  however it does place a comment before each set of values specifying
  which triplet they belong to as shown above.

Relates to [YOCTO #3041].

(From OE-Core rev: 2179db89436d719635f858c87d1e098696bead2a)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-29 10:40:54 +00:00
Zhenhua Luo 4b50385e2c rpm: split out run-postinsts
1. Split out run-postinsts script into separated package, sometimes only the
   postinsts script is required to run all postinsts scripts in /etc/rpm-postinsts/
   instead of the whole rpm package.
2. Set ROOTFS_PKGMANAGE_BOOTSTRAP to rpm-postinsts

(From OE-Core rev: 056490ddbfdbb6cc6fa0d8ff8716d64819d6b16c)

Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-29 10:40:54 +00:00
Richard Purdie 4dc31a327b base.bbclass: When we use fakeroot, also use it for devshell
Its generally useful for devshell to end up in the fakeroot environment. If
a user needs to exit it, PSEUDO_UNLOAD=1 <command> works, its usually
harder to enter the envionment.

[YOCTO #3374]

(From OE-Core rev: e6ffc747a8ca5142c9bc6fbd2b06b5808bb38b02)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-28 13:27:17 +00:00
Paul Eggleton 5a1d4bebf0 classes/buildhistory: ensure SDK package lists include complementary pkgs
We need to get in after complementary package installation, so use
_append instead of +=.

(From OE-Core rev: 8be32b8f30f63691f6b7a9592361b0975c6f8d7a)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-27 11:18:31 +00:00
Ross Burton d82e303921 update-rc.d/systemd: change communication variable name
Rename SYSTEMD_BBCLASS_ENABLED to INHIBIT_UPDATERCD_BBCLASS to reflect the
action, for clarity.

(From OE-Core rev: cf43320c343437659aee94acd005bf7712f273cd)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-26 22:43:03 +00:00
Ross Burton 7bb060ebd0 systemd: check for systemctl first, and don't force systemd to be installed.
With both sysvinit and systemd features enabled these postinsts may actually run
on a target without systemd, so check that systemctl is present before using it.

(From OE-Core rev: ac00e56cb9daacef17a6fdebe7b8ca1667b7e1c4)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-26 22:43:03 +00:00
Ross Burton 49ae578774 update-rcd: drop depends to recommends, check for update-rcd in scripts
(From OE-Core rev: 2c403979c03898c679c5a1e1092aec784dbeb77c)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-26 22:43:03 +00:00
Ross Burton 55ba8ea863 update-rcd.bbclass: handle both sysvinit and systemd features being present
Run the helper if the sysvinit feature is present, or if the systemd feature is
present but the systemd class hasn't been inherited.  We want to run in the
latter case as systemd has sysvinit compatibility, but we don't want to always
run so that pure systemd images don't have redundant sysvinit files.

(From OE-Core rev: a3856ab19f1d4ae312f559521785ad4384700729)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-26 22:43:03 +00:00
Paul Eggleton bdca492741 classes/rm_work: rename RM_WORK_WHITELIST to RM_WORK_EXCLUDE
This really functions as a blacklist, not a whitelist, since we are
listing recipes to exclude. To avoid any possibility of confusion, since
this was a recent addition, rename the variable.

(From OE-Core rev: 4d56de8018d550b3d181d451900cbfb698d64141)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-26 21:19:51 +00:00
Paul Eggleton 720492dd14 qemuimagetest: collect and print runqemu output
If runqemu (or qemu itself) fails we need to know why, so tee out to a
log file and print it when we can't find the qemu process or determine
its IP address.

(From OE-Core rev: 827106a57ca88760a19f9309d859b500c5c4fe97)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-26 17:50:09 +00:00
Richard Purdie 3a78a23e76 package.bbclass: Correctly handle /usr/src/debug file ownership
After the recent cached path operation improvements, we need to tell
the cache about directory changes. /usr/src/debug was was cached as
not created and this was leading to bugs in file ownership. This
change updates the cache and avoids this issue.

(From OE-Core rev: 553a8010e81448629a94ab04fd989e6e49066f2b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-26 17:50:08 +00:00
Richard Purdie c376f1f49c package.bbclass: Ensure debug source file is generated correctly
The command for generating debug sources appends to the file, therefore we need
to ensure it does not exist before we run the command else we end up doing
more work that we should have to.

(From OE-Core rev: 48dfd61901ce07491ef913cf04dbd9de9a52759f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-25 17:42:58 +00:00
Richard Purdie 7a8f3f7a01 package.bbclass: Handle subprocess errors correctly
If an error occurs in subprocess.call() we currently don't catch it. In particular
we have issues where debugedit is segfaulting unnoticed. This fixes up
various code paths to catch the errors.

[YOCTO #4089]

(From OE-Core rev: 262a69ffd33e9d001a7a15fc73671a015e3b5dd1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-25 17:42:58 +00:00
Richard Purdie 554e3d2540 package/populate_sdk: Move functions from package_* to populate_sdk_*
This fixes build failures introduced with "classes/buildhistory: implement history
collection for SDK" by moving the functions to files where only the specific image
type which is enabled is inherited. The failures occured when multiple PACKAGE_CLASSES
were enabled.

(From OE-Core rev: 9a414a57ad69a426a8d8a2970c42ca7427240615)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-23 17:40:27 +00:00
Paul Eggleton e95ccb7d57 packagegroup-core-tools-debug: split out Eclipse packages
Split out the packages added for Eclipse remote debugging to a separate
package group so that we can avoid pulling them in if not using Eclipse.

Fixes [YOCTO #3251].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-23 11:48:52 +00:00
Paul Eggleton 4626289e67 classes/buildhistory: trim trailing spaces in file listings
These are mildly annoying when viewing git diffs of the buildhistory
repository, so let's just get rid of them.

(From OE-Core rev: c257f292bf75061647e380889487c7e2625592de)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-23 11:41:13 +00:00
Paul Eggleton 59e4815387 classes/buildhistory: implement history collection for SDKs
SDKs are constructed in a similar manner to images, and the contents can
be influenced by a number of different factors, thus tracking the
contents of produced SDKs when buildhistory is enabled can help detect
the same kinds of issues as with images.

This required adding POPULATE_SDK_POST_HOST_COMMAND and
SDK_POSTPROCESS_COMMAND variables so that data collection functions can
be injected at the appropriate points in the SDK construction process,
as well as moving the list_installed_packages and
rootfs_list_installed_depends functions from the rootfs_{rpm,ipk,deb} to
the package_{rpm,ipk,deb} classes so they can also be called during
do_populate_sdk as well as do_rootfs.

Implements [YOCTO #3964].

(From OE-Core rev: c3736064483d4840e38cb1b8c13d2dd3a26b36aa)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-23 11:41:13 +00:00
Zhenhua Luo 5b5e03838d fix march sanity check issue
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

(From OE-Core rev: 4a4228fe250c8b23a5deeb25825d61c6e84a47a2)

Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-22 17:01:30 +00:00
Christopher Larson b10f2a74e4 package_{ipk, deb, rpm}: drop the TARGET_OS conditional
The tclibc file for uclibc already empties IMAGE_LINGUAS, so there's no point
to this conditional as far as I can tell, and it can cause issues for certain
values of TARGET_OS.

(From OE-Core rev: 0fdda5840452c7715ed775d5d18d9f850396f483)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-22 16:54:38 +00:00
Christopher Larson 331c1f1fe5 package_deb: don't install glibc-localedata-i18n separately
This was removed from package_rpm and package_ipk years ago, and shouldn't be
needed, installing the packages from package_linguas should be sufficient.

(From OE-Core rev: e9485c7077e5a9508371bbbbebdaaf1e9685da61)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-22 16:54:38 +00:00
Emilia Ciobanu fdd76ead85 distrodata.bbclass: added some more git processing
* Truncated all git MD5 sums to 7 digits
	* Added regex checking for git packages as well

(From OE-Core rev: bc830ab3f6e9704c830e934c6f39c85ef11f867d)

Signed-off-by: Emilia Ciobanu <emilia.maria.silvia.ciobanu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-22 16:54:37 +00:00
Jason Wessel 87cfde2559 syslinux.bbclass: Add a default serial console option and real boot menu support
The previous syslinux menu code did not support using both a serial
and vga console, but this has worked for years in syslinux so there is
no reason not to take advantage of it.  The previous menu looked like:

-------------------------------------------------------
Linux Boot Menu
The following targets are available on this image:

             boot: None
             install: None
-------------------------------------------------------

This commit makes it look something more like a traditional grub menu
on both the serial console and vga console as well as providing the
option to continue on using either the serial or vga console with the
correct kernel arguments.

You can see the screen shots attached to the bugzilla.

https://bugzilla.yoctoproject.org/show_bug.cgi?id=3944

[ YOCTO #3944 ]

(From OE-Core rev: 7032d559c04bae09e6b7c39ddeb1bf35acc0584c)

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-18 21:42:24 +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
Andreas Oberritter a3409b909d image_types.bbclass: only create links if the target exists
When creating images containing many partitions, rootfs.$type
may not be available.

(From OE-Core rev: cf8e9d8942fdddaac21fca46137120da959c814c)

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-18 21:26:39 +00:00
Richard Purdie e924d5bbe7 binconfig: Handle the case where ${B} != ${S}
This change allows ${B} != ${S} builds to work which use binconfig.

(From OE-Core rev: dc175a20d3a269c08691d92ecf13afff8c1340dd)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-18 13:18:24 +00:00
Chase Maupin 188a52171d kernel bbclass: return to original directory in do_deploy
* During the base kernel_do_deploy function the directory is
  changed to DEPLOYDIR in order to do some cleanup and symlinking.
  However, the directory is not changed back to the original
  starting directory ${S} at the end.  For append functions this
  means that the starting directory is not ${S} as expected but
  instead ${DEPLOYDIR}.

  For functions like the do_deploy_append in
  recipes-kernel/linux/linux-dtb.inc there is an assumption that
  you are still in the source directory and not the DEPLOYDIR.
  Without this change the .dtb files are not copied because the
  check for the existence of ${DTS_FILE} which is a relative
  path from the ${S} directory fails.  This means that the .dtb
  files are not copied into the deploy directory and subsequently
  the deploy/images directory.

  In the log.do_deploy file you will see lines like:

    Warning: arch/arm/boot/dts/xxxxx.dts is not available!

(From OE-Core rev: fd5d80ab1a405cb4ef94f2cde25f8c251da490f0)

Signed-off-by: Chase Maupin <Chase.Maupin@ti.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-18 13:18:23 +00:00
Chen Qi 83409910dd rm_work.bbclass: inhibit rm_work per recipe
Use RM_WORK_WHITELIST to inhibit rm_work per recipe. In this way,
one can use rm_work for the most of the recipes but still keep the
work area for the recipe(s) one is working on.

As an example, the following settings in local.conf will inhibit
rm_work for icu-native, icu and busybox.
    INHERIT += "rm_work"
    RM_WORK_WHITELIST += "icu-native icu busybox"

If we comment out the RM_WORK_WHITELIST line and do a rebuild, the
working area of these recipes will be cleaned up.

[YOCTO #3675]

(From OE-Core rev: 6c930c3c06f2e698540626c87bd7f7f571df35ef)

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-03-18 13:18:21 +00:00
Kevin Strasser 52026492c6 archiver: fix archive filtering behavior
With the addition of sstate, ensure that archiving tasks are only
added to the build if they produce output in the directory specified
by the 'sstate-inputdirs' flag.

Move calls to 'tar_filter' and 'not_tarball' out to
archive-*-source.bbclass in order to filter out packages before their
archiving tasks are added to the build.

Additionally, negate the return value of copyleft_should_include in
tar_filter, so that packages that do not pass are in turn filtered out.

(From OE-Core rev: 392562a21d9f2deb6fe6f8bb5378b09f4c5918d4)

Signed-off-by: Kevin Strasser <kevin.strasser@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-18 13:18:21 +00:00
Kevin Strasser 6b8ed0660f archive-*-source.bbclass: fix scripts_with_logs build error
Log and script archives are only generated when explicitly enabled by
setting the environment variable SOURCE_ARCHIVE_LOG_WITH_SCRIPTS to
'logs_with_scripts'. When left disabled, the path specified to be
handled by sstate is never created, resulting in a build error.

Only attempt to archive scripts and logs when explicitly enabled.

(From OE-Core rev: 7f1f3e6b6db9a50f5e68bc8dff95549e692153b1)

Signed-off-by: Kevin Strasser <kevin.strasser@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-18 13:18:21 +00:00
Richard Purdie 354bb63f02 image.bbclass: Drop legacy export of IMAGE_BASENAME
We used to export this in the days an external script handled the image
generation. This is no longer the case and hence we no longer need this
export.

(From OE-Core rev: 919613c0e75362ee0eace99b51cc77d34a05372f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-18 13:18:21 +00:00
Laurentiu Palcu a6e575292f populate_sdk_base: search for perl scripts after symlinks are relocated
grep will throw "No such file or directory" errors for all invalid
symlinks. To overcome this, move the search after the symlinks have been
changed to point to the new location.

(From OE-Core rev: 239a43fc4037bfe941bb60dd077ee477de177b7c)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-16 17:53:59 +00:00
Richard Purdie b5e5d25c25 package_rpm: Ensure PV manipulations are correct
The previous change to this function fixed one manipuation at
the expense of the other, depending on ow expanded the versioned
dependency string was when the AUTOINC substitution was made.

This update ensures we cover both cases and ensures the classextended
version works as as well as the normal case.

(From OE-Core rev: 0f8447a7d99d2645b932eac1c24149f0c2d3791e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-16 17:08:25 +00:00
Martin Jansa 1ceb13dda1 icecc: improve interaction with sstate
* exclude ICECC_PARALLEL_MAKE (like PARALLEL_MAKE is)
* add ICECC_DISBLED to be able to disable whole icecc functionality
  while keeping icecc enabled. This is useful when you want multiple
  builders sharing same sstate-cache, but only some of them using icecc.

* inheriting icecc changes all checksums because of do_*_prepends calls,
  but because icecc should not influence binary output of task we should
  get same checksums for tasks build with and without icecc

* ICECC_DISABLED when set (to any non-empty value will disable icecc env
  modifications but while keeping same sstate checksum

(From OE-Core rev: f46cf86d0ec3b80ce526b4dad1b1eac5995969ec)

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>
2013-03-15 01:53:05 +00:00
Martin Jansa 92281f9998 package.bbclass: add debug-without-src PACKAGE_DEBUG_SPLIT_STYLE
* same as original and default version, but does not package source files in PN-dbg

(From OE-Core rev: 3c8452c3abae74a42989c0fbd5ba303788528750)

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>
2013-03-15 01:53:03 +00:00
Richard Purdie 7803f5f98c package_rpm: Ensure package dependencies have correct version numbers
If a recipe has versioned dependencies on another package within
the same recipe, there are potentially races where the version
remapping may not happen correctly.

This issue triggered with neard in multilib builds since it
uses a "-" character in its PV which is illegal in an rpm version
field. The remapping to "+" was not occuring.

It only triggers in the multilib case since in this case, expansion
of the datastore happens at slightly different points.

The correct fix is to search for PV, not PKGV but substitute the
PV value.

(From OE-Core rev: bd03014c8fd080e04dd0a96a6b4b9211568c1cf1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-14 16:37:09 +00:00
Robert Yang cdd103823e rootfs_xxx.bbclass: fix bitbake -S hashes mismatch error
The bitbake -S <image> has errors, e.g.:

NOTE: Reparsing files to collect dependency data
ERROR: Bitbake's cached basehash does not match the one we just generated
(/buildarea/lyang1/poky/meta/recipes-core/images/core-image-minimal.bb.do_rootfs)!
ERROR: The mismatched hashes were 8e44f2296f2d6cdf2ccb0236910ef59b and
46357d5e36713646b47b0fe2233e3c8c

This is caused by the BUILDNAME which is defined in cooker.py:

if not self.configuration.data.getVar("BUILDNAME"):
    self.configuration.data.setVar("BUILDNAME", time.strftime('%Y%m%d%H%M'))

The time changes during the first parsing and reparsing, so there is the
error, we already have:

do_rootfs[vardepsexclude] += "BUILDNAME"

but what we need is
rootfs_xxx_do_rootfs[vardepsexclude] +=  "BUILDNAME"

The do_rootfs doesn't depend on BUILDNAME directly, but indirectly, the
depends tree is:

do_rootfs -> rootfs_xxx_do_rootfs -> BUILDNAME

So add BUILDNAME to rootfs_xxx_do_rootfs[vardepsexclude] would fix the
problem.

[YOCTO #3299]

(From OE-Core rev: 9d039f482c84dde264564fde93f39764113cc0d3)

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-03-12 18:33:27 +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
Constantin Musca 9d076dcba1 package_deb.bbclass: set DPKG_ARCH_arm to "armel"
- the system should be using "armel" by default, not "arm"

[YOCTO #3741]

(From OE-Core rev: 74c671a609172a3801e53fe93e2853c4f0eb93b1)

Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-10 04:36:51 +00:00
Chen Qi d823759b45 core-image.bbclass: support read-only rootfs
The hook function is appended to ROOTFS_POSTPROCESS_COMMAND
properly to support the 'read-only-rootfs' image feature.

[YOCTO #3406]

(From OE-Core rev: 05182ee354a9f773c8ab2f4cd7f1fdf552e7fcda)

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-03-07 11:20:02 +00:00