Commit Graph

3050 Commits

Author SHA1 Message Date
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
Chen Qi 142ae3bb06 image.bbclass: add a hook funtion to support readonly rootfs
read_only_rootfs_hook: this funtion is invoked only if 'read-only-rootfs'
is in IMAGE_FEATURES. It tweaks some basic files and makes populate-
volatile.sh script run at rootfs time.

For now, it has real effect only if the init system is sysvinit.

[YOCTO #3406]

(From OE-Core rev: cae51a169e37b54becc08162aaa643acd53ffe2f)

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
Martin Jansa 750d475a91 kernel-module-split: append space to RDEPENDS
* it was generating invalid RDEPENDS when KERNEL_MODULES_META_PACKAGE had
  RDEPENDS set already without trailing space

(From OE-Core rev: 5ff26f61b6860e56c255b2b6a2b0215be75b1db9)

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-07 11:14:40 +00:00
Björn Stenberg bb498369b8 ptest: Move ptest checks from recipes to ptest.bbclass
This patch cleans up ptest implementation in recipes by moving ptest
specific code parts into dedicated *_ptest functions.

(From OE-Core rev: 1e4d267a3cbd2135a5de10519814087050b766b7)

Signed-off-by: Björn Stenberg <bjst@enea.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-07 11:14:39 +00:00
Constantin Musca d4e4703226 buildhistory.bbclass: add support for SRCREV logging
- create "latest_srcrev" for each recipe with the following format:
${BB_FILENAME},${SRC_URI},${SRCREV},${FROM_AUTOREV}

[YOCTO #3041]

(From OE-Core rev: f9acd756746e61b82b58d300f3ab13f3b086787d)

Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-07 11:14:37 +00:00
Hongxu Jia 3be1c1251b sanity.bbclass:check if necessary to add march to BUILD_CFLAGS
1, There are a set of GCC built-in functions for atomic memory access. The
definition given in the Intel documentation allows only for the use of the
types int, long, long long as well as their unsigned counterparts. GCC will
allow any integral scalar or pointer type that is 1, 2, 4, 8 or 16 bytes in
length, suffix `_n' where n is the size of the data type.Such as:
__sync_fetch_and_add_n
__sync_fetch_and_sub_n
__sync_fetch_and_or_n
__sync_fetch_and_and_n
__sync_fetch_and_xor_n
__sync_fetch_and_nand_n
The above builtins are intended to be compatible with those described in the
Intel Itanium Processor-specific Application Binary Interface, section 7.4.

2, The glib-2.0-native and qemu-native invoke the above builtin function with
suffix `_4', and glib-2.0-native uses __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 to
test the existance.

3, Not all above builtin functions are supported by all target processors.Such
as i386 does not support the functions with suffix `_4', but i486 or later
support.

4, Prior to GCC 4.5, on the Intel's processor, the default arch is i386 unless
GCC is built with the --with-arch switch. Since GCC 4.5 the default arch is
implied by the target.

5, If your host GCC is older than 4.5 and it is built without the --with-arch
switch, when you use the GCC to compile target, you should specify -march to
tell GCC what the target's arch is, otherwise i386 is used as default.

Above all, when use older GCC to compile glib-2.0-native or glib-2.0-native,
and the GCC incorrectly uses i386 as default, the above builtin function
with suffix `_4' is not referenced. We should have a check in sanity.bbclass
to tell the user if necessary to add march to BUILD_CFLAGS in this situation.

http://gcc.gnu.org/onlinedocs/gcc-4.7.2/gcc/_005f_005fsync-Builtins.html#_005f_005fsync-Builtins
http://gcc.gnu.org/ml/gcc-help/2009-06/msg00037.html
http://gcc.gnu.org/gcc-4.5/changes.html
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47460
http://llvm.org/bugs/show_bug.cgi?id=11174
http://download.intel.com/design/itanium/downloads/245370.pdf

[YOCTO #3563]

(From OE-Core rev: 38042ed8586b3abe427af33debc2402caeca52cb)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-07 11:14:36 +00:00
Richard Purdie 0f62ff3b2c gtk-doc: Fix B verses S issues
Fic the class to handle recipes which set B to somewhere other than S.

(From OE-Core rev: 9d88baea4f3668612c76201c306ec6efe72c281e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-05 17:13:51 +00:00
Leonardo Sandoval 66ed85a0c9 sstate.bbclass: Enclose sstate search parameter with quotes
In case filenames have spaces, execution of the function
sstater_install will hang, so the print parameter %s must be
enclosed with quotes.

(From OE-Core rev: 545d7aa26dfefdc927e0f4e2cc37398ef2c63fa6)

Signed-off-by: Leonardo Sandoval <leonardo.sandoval@freescale.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-05 13:28:09 +00:00
Richard Purdie c446bbfa8d insane.bbclass: Add ALLOW_EMPTY to list of package specific variables
ALLOW_EMPTY should have a package specified so extend sanity checks to
cover it.

(From OE-Core rev: 02849a54d38c0b98db7ff6b52b4974ee0d88bfb4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-05 13:14:59 +00:00
Richard Purdie 51997fee89 packagegroup: Set ALLOW_EMPTY on a per package basis
ALLOW_EMPTY should be set on a per package basis, this updates the code
to do this, avoiding warnings.

(From OE-Core rev: 8981ed20234c42dc1f5cdef802ebe7214bd55238)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-05 13:14:58 +00:00
Richard Purdie 81ac275984 package.bbclass: Ensure all .so files get stripped
It was realised that .so files which were not marked as executable were not
gettings stripped. This was wasting space in images. This patch ensures
they do get processed by the code correctly.

[YOCTO #3973]

(From OE-Core rev: 725354886ae3650a7a4875d4c0bffcfab7e8cc40)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-05 13:14:58 +00:00
Richard Purdie 1122a417de package.bbclass: Fix do_package variable dependencies
When the do_package function was split into different sections, the vardeps
were not updated to match meaning some function changes weren't reflected
in the sstate checksums. Fix this.

[YOCTO #3980]

(From OE-Core rev: 2e7ddbcca3f613c3b5725dcc3d457985d41e5f16)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-05 13:14:57 +00:00
Richard Purdie 44260c2c48 populate_sdk_base/image: Fix races for variable mappings
When using the -c populate_sdk option, images are not generated quite as
they should be under certain circumstances. For example the dropbear
feature may not get replaced with openssh, leading to both being installed
with an appropriate rootfs failure.

This patch moves the remapping logic to later points in the code, ensuring
there is no conflict. The result is slightly simpler too as an added bonus.

[YOCTO #3749]

(From OE-Core rev: 90cfa16bd4a02ada84ef94f6ae6f182beb8bdc01)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-05 13:14:57 +00:00
Richard Purdie 7e2e2cf508 sstate: Add gtk-update-icon-cache-native to postinst recipes list
(From OE-Core rev: 59cd32a6661d76ee070810823614eb797d6cc153)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-05 13:14:54 +00:00
Ross Burton 39d9aca19b gtk-icon-cache: use virtual/gtk-update-icon-cache-native instead of gtk+-native
(From OE-Core rev: 135e512c09710d65155e345033e93f905de42b0d)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-05 13:14:54 +00:00
Laurentiu Palcu b1a7b15941 sstate.bbclass: consider postinstall dependencies too
When checking the dependencies in setscene_depvalid(), make sure we also
consider those dependencies needed when running the postinstalls on
host.

[YOCTO #3918]

(From OE-Core rev: 8de0616825ed1b238b3486077af6897834bcb62d)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-05 13:14:53 +00:00
Richard Purdie f35ce02c5d buildhistory: Allow the version backwards check to be disabled
When the PR service is not enabled, the versions can go backwards and there
are cases we don't want to know about this. This patch adds a variable
allowing these checks to be turned off whilst still using buildhistory.

(From OE-Core rev: 49f33a42e93711c96fbb099f3e6ee7f092d7b356)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-05 13:14:52 +00:00
Matthew McClintock db1d22ab38 kernel-arch.bbclass: don't pass extra args to KERNEL_{CC, LD, AR}
Commit a3ca06c3b4 added extra args to
KERNEL_CC, these revert that bit while maintaining machine additions
in TARGET_??_KERNEL_ARCH

Producing incorrect instructions and generating the following errors:

   CC      arch/powerpc/kernel/init_task.o
| {standard input}: Assembler messages:
| {standard input}:384: Error: junk at end of line: `1'
| {standard input}:949: Error: junk at end of line: `1'
| {standard input}:1428: Error: junk at end of line: `1'
| {standard input}:1526: Error: junk at end of line: `1'
| {standard input}:1626: Error: junk at end of line: `1'
| {standard input}:1685: Error: junk at end of line: `1'
| {standard input}:1973: Error: junk at end of line: `1'
| {standard input}:2001: Error: junk at end of line: `1'
| {standard input}:2100: Error: junk at end of line: `1'
| {standard input}:2168: Error: junk at end of line: `1'
| {standard input}:2520: Error: junk at end of line: `1'
|   CC      arch/powerpc/lib/locks.o

(From OE-Core rev: 6ed278ab93e9c3bb291dd37837c27e120954afc7)

Signed-off-by: Matthew McClintock <msm@freescale.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-05 13:14:52 +00:00
Richard Purdie b24ef37460 package_rpm.bbclass: Optimise per file dependency handling
Currently the process for injecting the per file rpm dependencies into
rpmbuild is painfully slow. Its done through the repeated execution of
a script which has to return the correct value in each case. This continual
execution means the CPU usage of rpmbuild is low.

This patch allows the option of collapsing the per file dependencies to
a per package basis and injecting them through the .spec file. This removes
the execution overhead and allows rpmbuild to run at 100% of cpu.

Ultimately it would be nice to inject the per file dependencies through
the .spec file however that is not currently possible.

Since few people use the per file dependency information, this patch
goes for the faster approach. It can be enabled if anyone needs it although
I'd mention that its being used to us as this code may well go away in
the future if nobody complains.

(From OE-Core rev: be40f6d0bb80274366af00461112af65687a4de8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-05 13:14:51 +00:00
Martin Jansa 2b8f2e770e kernel: extract functions for kernel modules to separate bbclass
* this way we can reuse the same functionality also for external modules
  including module_autoload_foo and module_conf_foo functionality
* MODULE_PACKAGES variable was removed (splited modules are now returned
  by do_split_packages
* KERNEL_MODULES_META_PACKAGE is used to append all splitted packages
  to RDEPENDS. In kernel.bbclass it's old "kernel-modules" in
  module.bbclass it defaults to ${PN} for upgrade path from
  single PN with all modules to PN depending on all new kernel-module-*

(From OE-Core rev: 51928b6b5ca0a46a9dcd754483a19af58b95fa18)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-05 13:14:50 +00:00
Martin Jansa b892099902 sanity.bbclass: always use oe.lsb.distro_identifier method
* even when /etc/redhat-release or /etc/SuSE-release exists
* don't read /etc/lsb-release manually, NATIVELSBSTRING is not
  reading it too

(From OE-Core rev: 3dba05d74821f08cd96a18351805c8812ddd626c)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-02 13:00:56 +00:00
Hongxu Jia 22b1f63223 package_deb.bbclass:fix meta-toolchain-sdk fail on do_populate_sdk
When build meta-toolchain-sdk in a newly created environment, there is
an error:
...
packagegroup-core-standalone-gmae-sdk-target set to manually installed.
You might want to run `apt-get -f install' to correct these:
The following packages have unmet dependencies:
avahi-dev: Depends: avahi (= 0.6.31-r6.1) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a
solution).
...
In this case, avahi was installed and then removed by dpkg (the reason is
unknown, only with log `Noting disappearance of avahi, which has been
completely replaced'), the uninstall was done by dpkg rather than apt,
and apt detected the package dependency was broken, so apt-get install failed.

Use `apt-get install -f' to correct the upper broken dependencies in place.
The removed avahi will be reinstalled.

[YOCTO #3720]

(From OE-Core rev: a66ed54490305380c549838f9a580528d5b49275)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-02 12:59:51 +00:00
Hongxu Jia 8e73fb597a package_deb.bbclass:fix the arch (replace "_" with "-") in deb package control
when build deb image, such as building meta-toolchain-sdk in x86_64 host,
there is warning like that:
...
'x86_64' is not a valid architecture name: character `_' not allowed
(only letters, digits and characters `-')
...

The params in deb package control file don't allow character `_', only
letters, digits and characters `-' allowed. Change the arch's "_" to "-"
in the deb package's control file at the control file creation time. Such
as `x86_64'-->`x86-64'

[YOCTO #3721]

(From OE-Core rev: 8487b352cabd8c8ae8a7d9e7e66489e4e964bd50)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-02 12:59:51 +00:00
Mark Hatle fe39685c0c package_rpm.bbclass: Fix translate_smart_to_oe arch comparison
When the OE arch is of the format "foo_bar-foobar" the previous
comparison routine did not selectively translate the '-' causing
a failed comparison.

In order to work around this issue, we -always- compare the
RPM translated version of the package architectures.

(From OE-Core rev: caf798da9502c1c4967d13a4450fe02b1e7b4850)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-02 12:59:05 +00:00
Martin Jansa f090c1523f rm_work: remove package and packages-split dirs
* as described in
  http://git.openembedded.org/openembedded-core/commit/?id=6107ee294afde395e39d084c33e8e94013c625a9

(From OE-Core rev: 4067afcda78d17058f2aa8d7f82173d181e0aae4)

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-02 12:56:53 +00:00
Wolfgang Denk 8264863ea0 Add KERNEL_EXTRA_ARGS parameter
With recent kernel versions, some ARM configurations need may fail to
build with errors like this:

	multiple load addresses: 0x80008000 0x80008000
	This is incompatible with uImages
	Specify LOADADDR on the commandline to build an uImage

We cannot pass this information in EXTRA_OEMAKE, as
"meta/classes/kernel.bbclass" explicitly ignores all EXTRA_OEMAKE
settings.  So add KERNEL_EXTRA_ARGS parameter so affected boards
can add for example

	KERNEL_EXTRA_ARGS = "LOADADDR=0x80008000"

to their configuration.  We make this general enough so other needed
command line options can be passed as well when compiling the kernel.

(From OE-Core rev: e3cdd0aafb9081cd7f1f98490087c1157a3d7403)

Signed-off-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-01 14:57:52 +00:00
Mark Hatle 86d6ec51f0 module.bbclass: Create a new depmodwrapper to assist cross-installs
Previously the build path to STAGING_KERNEL_DIR was being embedded into the
package post install scripts.  We avoid this behavior by generating a special
depmodwrapper script.  This script contains that hard-coded path, ensuring
that re-use of the sstate-cache (and/or packages) will always run through the
wrapper generated by the current build with a checksum that includes
STAGING_KERNEL_DIR.

[ YOCTO #3962 ]

(From OE-Core rev: b18c61bae4d7161c087a004bba3c696006f7a2f6)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-01 14:44:40 +00:00
Martin Jansa e5f3b992d7 sanity: use lsb distro_identifier
* distro_identifier returns lsb_data['Distributor ID']-lsb_data['Release']
  which in some cases is different then lsb_release -d -s, e.g.
  Distributor ID: Ubuntu
  Description:    Ubuntu 12.04 LTS
  Release:        12.04
  Codename:       precise
  But we probably don't need to sanity list each point release in LTS
  and sstate is already using distro_identifier as prefix for native
  sstate archives
* This will need update to SANITY_TESTED_DISTROS (at least
  s/Ubuntu 12.04 LTS/Ubuntu-12.04/g etc), that's why sending as RFC
  first.

(From OE-Core rev: a32ea459ca168792161af2d521a14fe00cffb4b3)

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-01 13:03:30 +00:00
Kang Kai 8506e4f454 package_rpm.bbclass: add more description for pre/post scriptlets
When write rpm spec file, one description line

"# pkgname - script_type"

is added to pre/post scriptlets for base package but no such line
writted for subpackage.

Add similiar line to subpackage to facilitate handling the pre/post
scriptlets.

(From OE-Core rev: 34f3926f1787f9a2efa2257a2aaea6ee92adf8a3)

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-01 13:03:29 +00:00
Kang Kai b7cb380930 package_rpm.bbclass: name postinst files with package name
When create rootfs, some post install scripts need be run on device.
They are saved under directory /etc/rpm-postinst and named with numbers
such as 100, 101 etc.

Update to name the postinst script file with its package name instead of
just number. That may be more easy to debug when there is a error.

[YOCTO #3218]

(From OE-Core rev: 9b2a008c25a7a3152ae2d8c64ae8de2534471d47)

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-01 13:03:29 +00:00
Hongxu Jia aeb53bd789 populate_sdk_base.bbclass:fix toolchain relocation issues
When run "autoreconf" in toolchain, there is an error if the host's perl's
version is not the same as the one in the SDK, the error says that the
executable perl mismatches the perl lib's version.

This is because most of the autotools' scripts use the "#!/usr/bin/perl -w"
which is host perl, but the gnu-configize uses "#! /usr/bin/env perl" which
invokes the perl wrapper in the SDK, and the wrapper will set the PERL5LIB to
the SDK which causes the mismatch. We can make all the perl scripts to use the
host perl or the SDK perl to fix this problem.

[YOCTO #3338]

(From OE-Core rev: 365aa1412a3d31128cb3df02959acdc7df5f2ebc)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-01 13:03:29 +00:00
Mark Hatle 54aae18917 kernel.bbclass: Add missing modules.order and modules.builtins
When running depmod, from kmod, warnings about missing modules.order
and modules.builtins occur.  Looking back it is not clear why these
files were being ignored, other then nobody knew what to do with them.

Add the files into the kernel-base package, if they exist, ensuring
they will always get installed if at least one module is installed.

[ YOCTO #3963 ]

(From OE-Core rev: bff4bda1fe86ddd218a192a14605924205a5300b)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-01 13:03:28 +00:00
Bruce Ashfield d9149a0ce0 kernel-yocto: allow building from fetcher source dir
The linux-yocto recipes themselves always set S="${WORKDIR}/linux" and
arrange for the fetcher default of ${WORKDIR}/git to be renamed before
building.

Part of this rename involves an assumption that the directory used by
the fetcher can be removed as part of the renaming process, or in fact
that renaming is required.

If a derived recipe uses S="${WORKDIR}/git", the checkout phase fails
since the kernel source is removed as part of the processing.

To fix this the code now detects this situation and does not clean the
source directory before renaming the fetcher default (and in fact does
not rename it at all).

(From OE-Core rev: e4ab5efea1a41297f63c96de97270136535b5f0b)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-01 13:03:28 +00:00
Bruce Ashfield 61001aa702 kernel-yocto: respect SRC_URI modified branch selection
Although the setting of KBRANCH is the suggested/primary way to interact with
the yocto kern-tools and the fetcher, some users may be more comfortable
modifying the SRC_URI branch parameter directly.

If they do, the tools will not force their branch and build output will be
different then they expect, in non obvious ways.

It's easy enough to detect this scenario, but checking the SRC_URI in the
same way that the git fetcher checks for the branch (and SRCREV). If we take
the value from the SRC_URI and use it directly in the patch/validate/update
routines, we'll stay consistent with KBRANCH if it is used, and also
automatically adapt to a manually changed branch parameter on the SRC_URI.

For all other users, there are no visible or behavioural changes as a result
of this change

(From OE-Core rev: cfce8643ed166b51d7178be173677ea6f527d453)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-01 13:03:27 +00:00
Kyle Farnsworth 22a5264311 insane.bbclass: Merge linux-gnu entries in machine dictionary and add sh4 machine.
(From OE-Core rev: 6e569c1aa66b2496b18d33803a18b99508152064)

Signed-off-by: Kyle Farnsworth <kyle@farnsworthtech.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-01 13:03:27 +00:00
Kang Kai c2fefcdc18 rootfs_rpm: move run-postinsts scripts to rpm recipe
Move run-postinsts scripts from rootfs_rpm.bbclass to rpm recipe. That
is the same way for dpkg and opkg to deal the post install scripts.

(From OE-Core rev: 04607b0cd496837f10ef78cf43597ec1d2e13f2e)

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-01 13:03:26 +00:00
Martin Jansa 0ca565d70c systemd.bbclass: fix bb.error
NOTE: recipe avahi-ui-0.6.31-r7.0: task do_package: Started
ERROR: %s does not appear in package list, please add it avahi-ui-daemon
ERROR: %s does not appear in package list, please add it avahi-ui-dnsconfd

(From OE-Core rev: 36a2bae816b1abf776d0f1a2b6b2c3d9a861a4ca)

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-01 13:03:26 +00:00
Kang Kai 9d6fb02fc4 rootfs_deb: remove run-postinsts from ROOTFS_PKGMANAGE
Remove package run-postinsts from ROOTFS_PKGMANAGE. run-postinsts has
already added in ROOTFS_PKGMANAGE_BOOTSTRAP and then added to rootfs
conditionally by checking image feature "package-management".

(From OE-Core rev: 41aad841e93daaf5d174b14b2fec60b786ead4b3)

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-01 13:03:26 +00:00
Emilia Ciobanu 7ae2251794 distrodata: added some corner cases for svn and git repos
distrodata.bbclass: git tags can include only one digit, therefore
the regex that matches the latest version should also include this
case. For some svn repos, using the http protocol than using the
svn protocol to get infomation about revisions works better.

(From OE-Core rev: bbf09cc0abbc81419349f2af1bc1196a868b2269)

Signed-off-by: Emilia Ciobanu <emilia.maria.silvia.ciobanu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-28 23:15:46 +00:00
Jessica Zhang 4926276d51 Add kernel arch variable in SDK environment variable list for supporting build external kernel module using SDK
(From OE-Core rev: 7fc7e98801bd72b9662528f94b315749e6075666)

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-02-28 23:15:46 +00:00
Muhammad Shakeel 98d82a5dcb archive-*-source.bbclass: Handle all package classes
* Add archiver tasks correctly for any 'IMAGE_PKGTYPE'.

[YOCTO #3449]

(From OE-Core rev: 0783686c4dc837674a2bcf3ca1f3f4858e256195)

Signed-off-by: Muhammad Shakeel <muhammad_shakeel@mentor.com>
Signed-off-by: Noor Ahsan <noor_ahsan@mentor.com>
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-02-28 23:15:45 +00:00
Muhammad Shakeel 2b1afa10bc archiver class: Use tasks with sstate instead of pre/post funcs
* Add tasks to move sources, script/logs and diff/env files in
  deploy directory.
* Enable SSTATE for 'do_archive_scripts_logs' task
* Enable SSTATE for 'do_dumpdata_create_diff_gz' task
* SSTATE is not used for sources/patches archiver task because source
  archive package can result into a very large file. It will be an
  unnecessary overhead to keep sources in DL_DIR and cached-binaries.
* If 'SOURCE_ARCHIVE_PACKAGE_TYPE' is 'srpm' then use pre/post functions
  because in this case we do not want to use tasks to move sources/logs
  in DEPLOY_DIR. 'do_package_write_rpm' is responsible for handling
  archiver packages.

[YOCTO #3449]

(From OE-Core rev: 959e2ae23ccbc6955a28996d4538e457cd8cfa5e)

Signed-off-by: Muhammad Shakeel <muhammad_shakeel@mentor.com>
Signed-off-by: Noor Ahsan <noor_ahsan@mentor.com>
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-02-28 23:15:45 +00:00
Peter Seebach 593ee3698e siteinfo/insane: More n32 fixups
For perfectly sound reasons, n32 MIPS is a mips64 subset denoted by an
ABI change, thus, "mips64-vendor-linux-gnun32" rather than
"mips-vendor-linux-gnu". A previous change had fixed up insane.bbclass
to recognize these, which mostly worked, but left SITEINFO_BITS set to
64.

Since bit-32 is processed first, and there are specific checks for
linux-gnun32, modify the mips64-linux-gnun32 lines to specify "bit-32",
so things that check SITEINFO_BITS get the right answer. Also, drop
the mips{,el}-linux-gnun32 lines, because that's not a valid combination;
n32 only makes sense for mips64.

Also, the insane.bbclass change spelled "mips64el" as "mipsel64", which
no one noticed because no one's using little-endian n32, apparently.

(From OE-Core rev: 0c243a550f5a0e539823fe168bcc7b2bbb9f19e1)

Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-25 05:58:19 -08:00
Mark Hatle c6209c96d9 rootfs_rpm.bbclass: Handle multilib configures with different OS values
[ CQID: WIND00404082 ]

It is possible for the TARGET_OS to change dependending on the multilib used
for a given package build.  mips64 has two potential TARGET_OS values: linux
and linux-gnun32.  The RPM and Smart setup needs to distinguish between the
two otherwise packages of the "non-default" TARGET_OS may be ignored as
incompatible.

(From OE-Core rev: aa760ff7dee4029c30c9de9fc0b640149e4a4c77)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-22 06:39:07 -08:00
Mark Hatle b2e4a965f3 rootfs_rpm.bbclass: Reorder feed priority based on multilib image setting
[ YOCTO #3915 ]
[ CQID: WIND00404309 ]

When doing a multilib image build, such as bitbake lib32-core-image-sato, the
system needs to reorder the priority level of the feeds.  If it does not
reorder the priorities, then 64-bit items can be selected by the automatic
dependency resolution in Smart.

(From OE-Core rev: dfbb1aa184955923b85b81aabf944de8f1a1e4b5)

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-02-22 06:09:23 -08:00
Ross Burton f017eb38bb package_deb: check CONFFILES exist before adding them to metadata
dpkg-deb verifies that conffiles exist, so verify that the specified files
actually exist before writing them to conffiles.

This mirrors the behaviour of FILES and package_rpm's CONFFILES handling.

(From OE-Core rev: 767a3d1c45f97add720174a7034df750bfb09a8e)

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-02-22 06:09:22 -08:00
Björn Stenberg c1aef57e20 ptest: Add missed .debug path
(From OE-Core rev: f8bf3c65327c6e04c19a7dda623c7433f5d97417)

Signed-off-by: Björn Stenberg <bjst@enea.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-22 06:09:22 -08:00
Song.Li 4878b3ced8 pakcage.bbclass:use a better way to cut -dev/-dbg suffix
In pakcage.bbclass,function replace('-dev', '') is
used to cut '-dev' suffix. but it will cause the
name "lib32-device-dev" to "lib32ice",
so change it to [:-4].

(From OE-Core rev: 91a3a48798029ca88a46a528200f4c5252f245e9)

Signed-off-by: Song.Li <Song.Li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-22 06:09:19 -08:00
Ross Burton 6bf55c6e67 rootfs_ipkg: fix BAD_RECOMMENDATIONS handling
If multiple versions of the same package are in the package feed then the
generate status file would only contains a "deinstall" status for the last one,
which meant that BAD_RECOMMENDATIONS wouldn't actually work.

Use awk instead of grep and stop reading when we reach a newline, so we only
ever output a single stanza.

(From OE-Core rev: a5362de60c0051f16b88a40bd9cb41915bee0b0f)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-19 14:37:51 -08:00
Laurentiu Palcu db0a02492c toolchain-scripts.bbclass: add PYTHONHOME variable to environment-setup
When relocating the SDK, applications using python will search for
python modules in the default location and will fail to start.
The below errors are thrown by gdb, for example:

Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
ImportError: No module named site

In order to overcome this, add the PYTHONHOME variable to the
environment-setup script for both standalone toolchain and
adt-installer. No need to do that for meta-ide-support environment
script since this toolchain does not get relocated.

[YOCTO #3839]

(From OE-Core rev: e7a21cd69a326ab7e2d0e410db28f24956f61208)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-19 14:37:51 -08:00
Richard Purdie 1dc9e9c3c5 devshell.bbclass: Allow running devshell and fakeroot together
Currently its hard to run a devshell complete with fakeroot context. This
patch allows the fakeroot flag on the task to do this, as with any other
task. Since we may need to start X terminal applications, we need to
only start the fakeroot session on the final command, hence the hoops
this code jumps through.

As always with fakeroot, you can break out and run a command without
the fake permissions with syntax like "PSEUDO_UNLOAD=1 <command>"

[YOCTO #3374]

(From OE-Core rev: 0a2662a48eaf0487db043c348e2834bb9cdd0466)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-19 08:47:36 -08:00
Laurentiu Palcu c723d1a38f populate_sdk_base.bbclass: fix SDKTARGETSYSROOT value
Currently, SDKTARGETSYSROOT points to PACKAGE_ARCH which, sometimes, can
be set to MACHINE_ARCH. When this happens, the default target sysroot
passed to the cross-canadian toolchain, which points to TUNE_PKGARCH,
will be different from the directory where the target sysroot has been
deployed.

In order to fix this, use REAL_MULTIMACH_TARGET_SYS variable instead of
MULTIMACH_TARGET_SYS.

[YOCTO #3784]

(From OE-Core rev: 41437aaac0cfc6f931d3b2974d380f20ec01f6e8)

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-02-19 08:47:35 -08:00
Martin Jansa d10a2f9199 sanity: check_path_length: replace tab with 8 spaces
(From OE-Core rev: de3f2367c46a213d07d834c7e874d2a4a0697026)

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-02-19 08:47:35 -08:00
Richard Purdie e13755a542 package_tar: Fix so it actually works
This tells us how long the code hasn't been used for :/

(From OE-Core rev: cd503c7f7fec6d177209832f73cec9c5d490be6b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-17 22:32:04 +00:00
Richard Purdie 8fb417a67c package_tar: Remove completely pointless code
Remove/simply overcomplicated code. No functionality change.

(From OE-Core rev: e3b21455e4ecc5b4961cf52e035a2d6d541faf69)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-17 22:32:04 +00:00
Richard Purdie 7e629a36c9 package_tar: bb.mkdirhier -> bb.utils.mkdirhier
Fix deprecated function reference.

(From OE-Core rev: 9e7a6492010aa2de65310d6fa13290068e7cadb1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-17 22:32:04 +00:00
Richard Purdie 398a6dcc84 package_tar: Fix whitespace
(From OE-Core rev: fead6005b56f53535967476cc752691316e02183)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-17 22:32:03 +00:00
Richard Purdie ba110d3b69 package_rpm/dev/ipk/tar: Drop unused functions
The package_xxx_install functions date from a different era and are not used by
anything. In the rpm case, they're simply unimplemented, in the tar case they're
using broken whitespace and deprecated functions. We might as well clean
out the old broken unused code.

(From OE-Core rev: 3684036213c9b1c27389260b7a1e3441c6bd659d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-17 22:32:03 +00:00
Richard Purdie 74938e387c package_rpm/deb/ipk: Error if we don't find packages when creating the package index
If for whatever reason the package directory is empty of packages, it
makes sense to error early rather than later in what become much
more obtuse errors. This adds in a sanity check to each of the packaging
backends. It also removes the duplicate createrepo call since the
core index creation function now uses this directly after the switch
to smart.

(From OE-Core rev: 721ef058b37604e100021ec7a90ad2f745d83916)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-17 22:32:03 +00:00
Richard Purdie 069a332d1c classes: Drop none package specific packaging variable accesses
(From OE-Core rev: 24cbe88429ba021d7c461e0271b67106d11d5eb2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-17 22:32:03 +00:00
Khem Raj 3b909b369a systemd.bbclass: Dont use libdir and base_libdir for units
systemd always uses /lib and /usr/lib to store unit files
so using libdir and base_libdir is incorrect. It will work
where libdir is usr/lib and base_libdir is /lib but wont work
when say its /lib64

Add a check to make sure that SYSTEMD_PACKAGES are part of PACKAGES
too, otherwise error out

(From OE-Core rev: 22e16f44b58ae6bbf719b9074d39aac065a402f1)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-15 12:18:30 +00:00
Cristiana Voicu 2cbefb8387 sanity.bbclass: when bblayers.conf is updated, it invokes a reparse
When bblayers.conf is updated(when sanity check is running), it should
tell to bitbake to reparse configuration files. I will send a patch to
bitbake-devel, with the actions needed in bitbake and hob.

[YOCTO #3213]
(From OE-Core rev: 5db1ff93f7204b43b7242fc7ef415216eb632ed8)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-15 12:17:35 +00:00
Ross Burton 70b731c6f0 package_ipk: check CONFFILES exist before adding them to metadata
opkg-build verifies that conffiles exist, so verify that the specified files
actually exist before writing them to conffiles.

This mirrors the behaviour of FILES and package_rpm's CONFFILES handling.

(From OE-Core rev: fb87edc881009cf4d582cd95c248884551fe07fe)

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-02-15 12:17:35 +00:00
Emilia Ciobanu 444b6e1cd8 Solved package namespace errors in PRS
For some packages PRS reported incorrect upstream version
as it was either the raw string or it mismatched some
alternative groups.

(From OE-Core rev: 6f3ace8ba75eed891aa4844a6830bedca3d8b70e)

Signed-off-by: Emilia Ciobanu <emilia.maria.silvia.ciobanu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-14 23:14:47 +00:00
Ross Burton 5dab6274b1 insane: remove unused variable
(From OE-Core rev: 1165a0b161ffc32258b0726e6ef3082d97dfb32a)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-14 23:08:35 +00:00
Richard Purdie b15730caf0 mulitilib_header: Avoid sstate checksum issues for -native recipes
The use of arch specific variables like MIPSPKGSFX_ABI was creeping
into the -native sstate checksums of package like ncurses-native.

This is pointless and undesireable. We could add specific variable
exclusions but we might as well just brute force the code to be disabled
in the -native case since we don't use multilibs in the native case.

[YOCTO #3827]

(From OE-Core rev: cc7352ed990b1bdd26203a4d3b21286280ac26c5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-14 12:36:08 +00:00
Richard Purdie e3f5d7dee0 multilib: Fix an OVERRIDES expansion order issue
There were problems where a SRC_URI with:

SRC_URI_append_powerpc = " xxx"
SRC_URI_append_powerpc64 = " xxx2"

would end up with *both* xxx and xxx2 being added when using a multilib
which is clearly incorrect and undesirable.

The issue is that OVERRIDES has virtclass-multilib-xxxx added to it,
this eventually changed DEFAULTTUNE which then changes
TRANSLATED_TARGET_ARCH which is in OVERRIDES meaning we then need to
re-evaluate the overides and the TRANSLATED_TARGET_ARCH gets applied
twice since once you apply an override, it doesn't get undone.

Expanding DEFAULTTUNE to the correct value in advance avoids the issue
and means only the correct overrides get applied.

[YOCTO #3874]

(From OE-Core rev: 920c9024f5a47ad14670067f910450983bae2aa7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-14 10:06:30 +00:00
Laurentiu Palcu 6cec82faf6 gtk-immodules-cache: add weak asignment for GTKIMMODULES_PACKAGES
This is needed if the GTKIMMODULES_PACKAGES is changed later, in
do_populate_packages for example. This way, we don't have to add another
dumb asignment in the recipe inheriting this.

[YOCTO #3853]

(From OE-Core rev: e9e80eac6ab4982cb42fa2c5403630926351efed)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-13 16:52:30 +00:00
Laurentiu Palcu 2b2416098e Add pixbufcache class
All packages exporting pixbuf loaders should inherit this class in order
to generate the correct postinst/postrm scriptlets.

[YOCTO #3852]

(From OE-Core rev: 61afa98f96f5c62473cb2db383b48d3d23c5d7ac)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-13 16:52:29 +00:00
Laurentiu Palcu b4c89bdae3 fontcache.bbclass: use the postinst_intercept script
"Link" the package to the postinstall hook by running the
postinst_intercept script.

(From OE-Core rev: a14faa3b9c55574a096d517431393e4ac3c86823)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-13 16:52:29 +00:00
Laurentiu Palcu ceabaf6265 gtk-icon-cache.bbclass: use postinst_intercept script
Since the hook has been made a standalone script, use postinst_intercept
script in order to "link" the package to the hook.

(From OE-Core rev: d7ddae84165b5b84dc6ac640fd492ade891ddd4e)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-13 16:52:29 +00:00
Laurentiu Palcu 5bb362a0ba rootfs_(ipk|deb|rpm).bbclass: check package installation status after ROOTFS_POSTPROCESS_COMMAND
Since the intercept fall-back procedure will change the package
installation status, do the checking after ROOTFS_POSTPROCESS_COMMAND
ends.

(From OE-Core rev: 414c3918baccc2166bba536c956eebaeb49aace3)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-13 16:52:29 +00:00
Laurentiu Palcu 6cca7efa6f image.bbclass: add fall-back functionality when running intercepts
If an intercept script fails, it would be helpful to fall-back to
running the postinstall on target's first boot. In order to achieve
that, the postinstalls that install a host intercept hook will have to
return 1, so that the postinstall is marked as unpacked only. If the
intercept hook fails, then we're ok, the postinstalls will be run on
target anyway. If it succeeds, then mark the packages as installed.

This logic was chosen mainly because of rpm backend which saves the
failed postinstalls in /etc/rpm-postinsts. Hence, in order to mark the
packages as installed, all we have to do is delete the scriptlets from
there.

(From OE-Core rev: ed8ac4ee43132ae974794038821f7ca5465ae556)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-13 16:52:28 +00:00
Jason Wessel 7d023f3b5f populate_sdk_base.bbclass: Improve debugging capabilities for SDK installer
After having to debug the SDK installer a few times in
addition to the relocation code the following patch was created
to improve the capabilities around debugging the SDK installer.

1) Add a verbose mode -D which set a set -x to see what
   the SDK installer is doing.

2) Add a mode -S to save the relocation scripts for the purpose
   of debugging them in conjunction with -D

3) Add a mode -R to not execute the relocation scripts for the
   purpose of debugging the relocations.

(From OE-Core rev: 0e6dd19b9736d2a8ae7c0f0ab124337d579b8f06)

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-12 13:11:21 +00:00
Darren Hart c7c9f6c1fc base.bbclass: Remove generate_git_config()
git no longer supports the use of GIT_CONFIG which defeats the purpose of
GIT_CORE_CONFIG and the generate_git_config() function. Remove it.

(From OE-Core rev: c485322fa2b89eb90efd88969d0c73575f128af7)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-11 22:54:03 +00:00
Constantin Musca e9aa4c22d6 multilib.bbclass: save multilib variables before executing the gcc-cross-canadian statements
(From OE-Core rev: 45528026c190c7c3b121e9fb65747d050b2bb21a)

Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-11 22:49:26 +00:00
Ross Burton 2c87657be9 systemd.bbclass: use PACKAGESPLITFUNCS instead of populate_packages_prepend
This is cleaner and leads to more accurate profiles.

(From OE-Core rev: eed7294ba9aedf47af5c64ff11777015e59f48ef)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-11 22:48:50 +00:00
Enrico Scholz d518019d6c package.bbclass: support dangling path components
Commit ec2aab09769f4b6817d74d2175afa2b7c7598750 introduced a regression
on packages which contain symlinks with unresolvable path components
(e.g. lsof-dbg).  While assigning a variable, an exception was raised
and the exception handler accessed this variable.

Patch deals both with the dangling path components by assuming them as
valid directories and by avoiding the broken assignment.

(From OE-Core rev: 579369b0fb27fad6d628746a50b9b798078500f6)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-11 22:45:25 +00:00
Enrico Scholz f2e16c6552 package.bbclass: use oe.path.realpath()
oe.path.realpath() provides are common and more correct implementation
for resolving symlinks within sysroot. Use it.

Old implementation suffered from lot of problems; e.g.

* redundant code

* calls 'os.stat()' which references files on host; this can give wrong
  results about existing/non-existing and can cause EPERM (instead of
  the catched ENONENT) exceptions

* does not deal with special cases like '..' leaving the sysroot.

(From OE-Core rev: ec2aab09769f4b6817d74d2175afa2b7c7598750)

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-11 14:46:11 +00:00
Enrico Scholz a09c5d6673 update-alternatives.bblcass: use oe.path.realpath()
oe.path.realpath() provides are common and more correct implementation
for resolving symlinks within sysroot. Use it.

(From OE-Core rev: 2fa5cc0d08e855e24a4497601d7cc73b9f2aa550)

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-11 14:46:11 +00:00
Ross Burton 3936cef145 update-rc.d: don't do anything if systemd.bbclass is inherited
We need the update-rc.d class to work when systemd is being used so that
packages that only have SysV init scripts still work.  However if a recipe
supports both we don't want to install SysV and systemd files under systemd.

To solve this, before doing real work in update-rc.d check if the systemd class
has been inherited and don't do anything if it has.

(From OE-Core rev: 0273a22fec3c9360df2510b759c5bf9af610551f)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-11 14:46:10 +00:00
Ross Burton 66af82eab3 systemd.bbclass: helper class for recipes with systemd units
This class adds postinst/prerm scripts to start/stop/enable/disable the services
as relevant, and some magic to ensure the service files are installed.

Based on (but not the same as) the systemd.bbclass in meta-systemd, so thanks to
the following for their work there:

Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Khem Raj <raj.khem@gmail.com>
Martin Jansa <Martin.Jansa@gmail.com>
Andreas Müller <schnitzeltony@googlemail.com>
Koen Kooi <koen@dominion.thruhere.net>

(From OE-Core rev: f4bf51612f8be1d3dd340fc456f3fa08fcfa34ef)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-11 14:46:10 +00:00
Paul Eggleton f7273d122b buildhistory: record more R* variables
Add RPROVIDES, RREPLACES, RCONFLICTS and RSUGGESTS to the list of
tracked variables. Of these, RPROVIDES is always output, whereas the
others are only output if they have a value (since it is more common
that they don't).

Implements [YOCTO #3391].

(From OE-Core rev: 564d76bed7b96d381d6438df81c0d5b4f5a7b2b0)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-11 14:46:10 +00:00
Jackie Huang fa6c12da8c populate_sdk_base.bbclass: add execution permission for self-extracting archive
[ CQID: WIND00392947 ]

It is not good user experience that the self-extracting archive (.sh file)
has no execution permission by default.

(From OE-Core rev: 3d6537f6ab1ce98075461b9a5d49885c2454417f)

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-08 14:50:36 +00:00
Saul Wold d69d193a96 Revert: update-rc.d: disable update-rc.d.bbclass when systemd enabled
This was just wrong - when systemd is being used there'll still be packages that
use SysV-style init scripts, which systemd supports fine.

This reverts commit b94227f729.

(From OE-Core rev: 3f50b61c77406f87d36437cca53573f86f314641)

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-02-08 14:50:36 +00:00
Bernhard Reutner-Fischer 81117fd2fa base.bbclass: remove redundant setting of MAKE
oe_runmake() tried to set MAKE a second time, remove it since this is
(nowadays?) redundant WRT the normal export MAKE= in the generated
scripts.

(From OE-Core rev: b9c83b22b555349314191ba60346b01a9252a812)

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-08 14:50:35 +00:00
Bernhard Reutner-Fischer 736383a6be base.bbclass: Commentary typo fix
(From OE-Core rev: 3f0c1f6f001bbe958a0589da7db52f96a2d9d369)

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-08 14:50:35 +00:00
Laurentiu Palcu 8c263420ed qemu.bbclass: fix segfaults when running through pseudo
qemu user binaries sometimes segfault when running them through pseudo.
So, set PSEUDO_UNLOAD to 1 before running any qemu binary.

[YOCTO #3788]

(From OE-Core rev: 688e9485980de0f29aa00e24ce53a3efd3a3a7cc)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-07 16:50:47 +00:00
Richard Purdie 9f5a6f89d9 qemu.bbclass: Use the correct qemu binary in multilib cases
For example with a lib32 multilib, we need to still use the 64 bit
qemu binary in case we do encounter a 64 bit binary.

(From OE-Core rev: e8ec13a26217bf473504ae4aab22b134dd9dffff)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-07 15:25:07 +00:00
Richard Purdie c920f1a7cc image.bbclass: Add MLPREFIX to DEPENDS
Add MLPREFIX to DEPENDS to ensure the correct qemuwrapper is dependended upon. Its searched
for in PATH so we need to do this to ensure the correct version is present.

(From OE-Core rev: 41163fc5e6662251ec264fd5194a649342d11de1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-07 15:25:06 +00:00
Richard Purdie 5db5904614 sanity.bbclass: Check for DISPLAY for qemutests in BB_ORIGENV now
(From OE-Core rev: e43f8f917e4069d74b467dfd6aa29ff762e83a5e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-07 09:17:44 +00:00
Richard Purdie afd24faa00 imagetest-qemu: Adapt to bitbake environment changes
Load environment variables like DISPLAY from BB_ORIGENV after recent
bitbake changes.

(From OE-Core rev: 8ad8b34b5ac36d805bb10c120f3388e7dce83b98)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06 23:41:20 +00:00
Richard Purdie fef84540e3 terminal.bbclass: Use BB_ORIGENV to restore user environmental variables
(From OE-Core rev: 131643695d7ba9d0c32bf8e192e7e3942f50f318)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06 23:41:20 +00:00
Khem Raj 43bc21462b package.bbclass: Replace undefined 'src' with valid variable
After rewrite of split_and_strip_files src var is no longer
available here where it is used so we should replace it with
a valid value

(From OE-Core rev: b07e79ea049d341a5a0a7e4bb72151f49336c5bc)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06 23:37:10 +00:00
Richard Purdie 7980773d90 package.bbclass: Ensure package_get_auto_pr is run at the correct point
This needs to run before PKGR and other variables using PRAUTO are used,
including the expansion optimisations.

(From OE-Core rev: eb09ebc9680eb50e23778dcc1c2697d13cf073ae)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06 16:52:20 +00:00
Martin Jansa 56bc2bb95a insane.bbclass: Add missing R* variables to pkgvarcheck
* check also RSUGGESTS, RCONFLICTS, RPROVIDES, RREPLACES

(From OE-Core rev: 63d9926dde562fd2447fc26482745c3b6f232c12)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06 14:44:49 +00:00
Martin Jansa 451f2d083d package.bbclass: return list of packages created in do_split_packages
* sometimes it's useful to do something with packages created
  by do_split_packages later in do_package_prepend, e.g. in:
  http://lists.linuxtogo.org/pipermail/openembedded-devel/2013-February/043824.html
  I have .bbclass which adds some postinst, postrm and RDEPENDS,
  but ttf-mplus is using do_split_packages to create those packages

(From OE-Core rev: 5aa52c6882d2929b2e530c4fa297c6d3e97d4f9f)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06 13:16:51 +00:00
Richard Purdie 5b7c822609 package.bbclass: Pre-expand some variables to save time
(From OE-Core rev: fc5bff0145d8f5db1c09be61f5de209ac4016ed1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06 13:13:01 +00:00
Richard Purdie 78955b837c package.bbclass: Better document the different phases of operation
Add headers to document the different phases of do_package and
make the steps clearer.

(From OE-Core rev: b6438c94035a014902ec89af63ff3787cd8c67f6)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06 13:13:01 +00:00
Richard Purdie 4cae28e309 package.bbclass: Add PACKAGESPLITFUNCS variable
Prepending to populate_packages is rather ugly and means its hard to trace
errors and also profiling informaiton is summed together in one function.

This patch starts to split out the prepends to become separate functions
to avoid these issues. This is generally a neater way to write functions
than prepending to where there can sometimes be variable scope issues
and we've been bitten by whitespace issues in the past.

(From OE-Core rev: 4f9963d1d82ee896fe9491d6a8b32be42cd06f14)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06 13:13:00 +00:00
Richard Purdie 1c906e7643 package.bbclass: Simplify empty directory removal
Rather than an exec() per directory, we might as well exec one command and
be done with it.

(From OE-Core rev: 82ae9cfb09ee5c0aa6402c972d71e2b64d1ce8bc)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06 13:13:00 +00:00
Richard Purdie 48f8eece27 package.bbclass: Various minor performance tweaks
* Call getVar outside the loop
* Drop unneeded PATH export (bitbake does this already)
* Drop unused variable
* Simplify if statement nesting
* Simplify variable expandion to a getVar call (expand would just call getVar)

(From OE-Core rev: 52b506145bcddc133ca93a8c9f7343de69d10907)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06 13:13:00 +00:00
Richard Purdie ee5e443dba package.bbclass: Make use of cleandirs and dirs function flags
We can use the cleandirs and dirs flags for the fuctions to handle
directory cleaning and creation at the bitbake level rather than
using these calls within the functions

(From OE-Core rev: 4b31d6f6f0a2a6b9e504ffae0d3b2099cbd7dddc)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06 13:13:00 +00:00
Richard Purdie 88badcf7eb kernel.bbclass: Improve populate_packages_prepend
Small performance tweaks for populate_packages_prepend:

* Compile the regexps once at the start
* Don't keep importing a module which is already imported
* No need to check PKG is set, we'd have failed long before now if it wasn't
* Don't export PATH, bitbake takes care of this at the task level

(From OE-Core rev: e9d43d7b4d2cfb22b21f3814c2401a699c78b025)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06 13:13:00 +00:00
Richard Purdie 85b4891a1c package.bbclass: Rewrite split_and_strip_files
The split_and_strip_files funciton was hard to follow and its usage of prefixes
to strings was unusual. This rewrites it to use a list of hardlinks, symlinks and
elffiles where each list is iterated over at the correct point.

This means we can avoid creating dandling symlinks for example so we can simply
delete the cleanup code for this.

The isfile() check is also removed which gives a significant improvement in speed.
Its uneeded since os.walk will have already checked things in files are files.

(From OE-Core rev: 0cd295d8cdc8cc39d6b6c7d26ea8a2a10a979d7c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06 13:13:00 +00:00
Richard Purdie f2ee5b48d9 package.bbclass: Fix up bb.mkdirhier/bb.copyfile usage
These are in bb.utils so lets the correct function and avoid the overhead
of the fixup/warning for the deprecated usage.

(From OE-Core rev: d17329db4842c50af1a3d7f5f20e692c89913fba)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06 13:13:00 +00:00
Richard Purdie f0bda89e9b update-rc.d: Drop OVERRIDES code
The data store copy and overrides is overkill given the small number
of accesses that are being made. This simplifies the code.

(From OE-Core rev: 72c1fd72d3b479c728e249eaa763116d352e945b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06 13:13:00 +00:00
Richard Purdie f8ea6a8eed staging.bbclass: Drop unused/legacy function
(From OE-Core rev: 9120c88085236e1be9854376e43a7b14f937ba03)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06 13:13:00 +00:00
Richard Purdie 1e593e92d2 staging/insane.bbclass: Move legacy do_stage check iinto insane.bbclass
We might as well put all the sanity checks in one place.

(From OE-Core rev: 05be11c7508984cc4aa757becb7a8f47c5b7e919)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06 13:12:59 +00:00
Richard Purdie 9244e4471d insane.bbclass: Add documentation headers for logical code blocks
(From OE-Core rev: ac24487a05834cc9c02a95bbd281927d98c5886e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06 13:12:59 +00:00
Richard Purdie 61c51a1a49 insane.bbclass: Add pkgvarcheck to check for suboptimal usages of variables
Check through the variables:
'RDEPENDS', 'RRECOMMENDS', 'FILES', 'pkg_preinst', 'pkg_postinst', 'pkg_prerm', 'pkg_postrm'
and if there is a variable set which isn't package specific, inform the user
of this.

Using these variables without a package suffix is bad practise and complicates
dependencies of packages unnecessarily as well as complicates the code. Lets
convert the remaining issues and then we can take the small performance gain.

(From OE-Core rev: 316228948e65f376f6c5be13ccd0c964ea630edf)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06 13:12:59 +00:00
Richard Purdie bf25dd25c2 package.bbclass: use the multiprocess pool from bitbake
(From OE-Core rev: 7e880a95840db82f4035959b03630ba2a96c0311)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06 13:12:59 +00:00
Richard Purdie b34fd60d8f package: Process package stripping in parallel
(From OE-Core rev: 981fed49ee80560fb067b3f47aeada1fdee792ca)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06 13:12:59 +00:00
Richard Purdie e45db24bbe package: Don't export PATH
PATH is already exported, we don't need to do this each time we run
something, its just noise and overhead.

(From OE-Core rev: 060f617cea4ea0a5af28d31ea19c0387e9773fce)

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

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06 13:12:59 +00:00
Richard Purdie 6c6f6b7ffd sstate.bbclass: Ensure build directory is cleaned to start with
This directory is cleaned upon completion however if a previous build
crashes, it can lead to corrpution, hence ensure its clean at the start
too.

(From OE-Core rev: 8ef0e59d5a7da3671d1ad9a54fe068ed78f928d5)

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

(From OE-Core rev: 8e373e69acac853213a62afb8bbdf0adc0c5045a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06 13:12:59 +00:00
Laurentiu Palcu e52c8b833e package_ipk, rootfs_ipk: remove the "set -x"
Comment the "set -x" lines since these will add a lot of extra, not
always necessary, debug messages in the log.do_rootfs.

[YOCTO #2599]

(From OE-Core rev: 5d8119f3d749073e355351e0e15f2703fad738f2)

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-02-06 09:37:24 +00:00
Laurentiu Palcu 5479aa4869 image.bbclass: add a proper error message if hook script fails
(From OE-Core rev: 5e737d3c6e6546c1368e804f4c45ab25d8791ea3)

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-02-06 09:37:24 +00:00
Laurentiu Palcu f33014f607 qemu.bbclass: return qemuwrapper instead of qemu-allarch
When qemu bbclass is inherited from a recipe that is not architecture
dependent, qemu_run_binary will return "qemu-allarch". However this
binary does not exist. Instead, return "qemuwrapper" which will, in
turn, execute the right binary for the target the image was built for.

[YOCTO #2599]

(From OE-Core rev: 149a564bba7d3e1c2054ae6d908835ebd95b9084)

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-02-06 09:37:23 +00:00
Laurentiu Palcu c31bf6514b add fontcache.bbclass
All font packages should inherit this class in order to generate the
proper postinst/postrm scriptlets.

The scriptlets will actually create a host intercept hook that will be
executed at the end, at do_rootfs time, after all packages have been
installed. This is good when there are many font packages.

[YOCTO #2923]

(From OE-Core rev: 0c12f7fb3c2c42e5b633682bb1277b943ac19ea6)

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-02-06 09:37:23 +00:00
Martin Jansa 77b1409522 ipk: use OPKGLIBDIR in all places
* it's not recommended to change this value, because it breaks upgrade path on target
  (all old u-a alternatives are forgot in old OPKGLIBDIR value
* but make it consistent, so if someone really want to change that, then
  setting OPKGLIBDIR_distro in distro.conf would be enough
* without this there were at least 4 places to change:
  rootfs_ipk: opkglibdir variable (notice that I've removed /opkg from it to correspond
              with EXTRA_OECONF option used in opkg recipes
  package_ipk: ${target_rootfs}${localstatedir}/lib/opkg/ hardcoded in
               package_install_internal_ipk
  opkg-collateral: value in lists file
  opkg: EXTRA_OECONF for all 3 classes, FILES_libopkg, do_install
* validated with buildhistory that without OPKGLIBDIR explicitly set the
  output is the same and that after setting
  OPKGLIBDIR_forcevariable := "${libdir}"
  everything including empty directory from package_ipk is moved to
  libdir

(From OE-Core rev: cf0aa9c4fdae8855803e96b1922d54a2431795d3)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06 09:37:22 +00:00
Martin Jansa 36dd58a58f sip.bbclass: improve RDEPENDS to add python-sip only for PN
(From OE-Core rev: 9aeb36d452154a766c0ada6d4594dcabc226752f)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-04 23:31:02 +00:00
Richard Purdie 0ce97e5cba cpan-base.bbclass: Improve RDEPENDS to be package specific
(From OE-Core rev: 3300d5fdcc60b14e184e0c6c40ba25d8c4d5ed46)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-04 16:42:48 +00:00
Peter Seebach 4872ba3ee4 package.bbclass: Allow per-package SKIP_FILEDEPS
The existing check for SKIP_FILEDEPS can be overridden per recipe
using SKIP_FILEDEPS_pn-${PN}. However, there's no mechanism for
letting a single package within a recipe use SKIP_FILEDEPS.

This patch adds SKIP_FILEDEPS_<pkg>, by analogy to FILES_<pkg>.
Note that it only works one way; if the recipe has SKIP_FILEDEPS = 1,
the checks for individual packages will never be reached.

(From OE-Core rev: 94557b500ad38a49aec40629015ed0b24e167f76)

Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-04 13:18:28 +00:00
Bruce Ashfield aa653b9354 kernel-yocto/linux-yocto-custom: support low bandwidth options
To support configurations where active development is not being done within
the oe/bitbake build environment and restricted bandwidth situations, this
commit allows the SRC_URI to point to a kernel tgz instead of a full git
repository.

Outside of the upstream tgz instead of a kernel git repository, the
restrictions, config and patch process is the same as any linux-yocto-custom
recipe.

An example linux-yocto-custom based recipe would have a configuration like
this to build the 3.7 kernel, using an externally supplied config, from the
3.7 tgz:

  SRC_URI = "http://kernel.org/pub/linux/kernel/v3.0/linux-3.7.tar.bz2"
  PV = "3.7"
  S = "${WORKDIR}/linux-3.7"
  SRC_URI[md5sum] = "5323f3faadd051e83af605a63be5ea2e"
  SRC_URI[sha256sum] = "dc08d87a579fe2918362e6666e503a95a76296419195cb499aa9dd4dbe171a9e"

[YOCTO #2686]

(From OE-Core rev: 08b3a282ce75a9972694f0c4379179505b9ec91f)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-04 13:18:28 +00:00
Bruce Ashfield de2211133f kernel-yocto: allow multiple / shared kernel feature directories
To promote the reuse and sharing of configuration fragments this change
allows any kernel-yocto based recipe to have multiple alternate git repositories
which provide kernel feature directory trees listed on the SRC_URI.

These feature directories are in addition to any in-tree kernel meta data branches
that may be available (described via the KMETA variable in linux-yocto recipes).

Features found within these directories can be used from recipes via the
KERNEL_FEATURES variable. Features found within a feature directory are free
to include any other features that are available in any directories. In both
cases the path to a feature description (a .scc file) is relative to the
root of a given feature directory (which is how existing .scc files work)

The search order for features is determined by the order that repositories
appear on the SRC_URI.

Normal SRC_URI rules apply to any repository that is added as a kernel
feature container. A SRCREV must be supplied and it must be unpacked to
a unique directory, which is controlled via the "destsuffic" url parameter.

In addition to these standard requirements, any kernel feature repository
reference should identify itself via the "type=kmeta" url parameter. If
type=kmeta is not supplied, the repository will not be processed for
kernel features.

As an example, the following in a linux-yocto bbappend makes two additional
feature directories available to KERNEL_FEATURES and fragments.

 SRC_URI += "git://git.yoctoproject.org/yocto-kernel-cache;protocol=git;branch=master;type=kmeta;name=feat1;destsuffix=kernel-cache/"
 SRC_URI += "git://${KSRC_linux_yocto_3_4};protocol=file;branch=meta;name=feat2;type=kmeta;destsuffix=kernel-features-experimental/"

 SRCREV_feat1 = "${AUTOREV}"
 SRCREV_feat2 = "${AUTOREV}"

(From OE-Core rev: 02ad603a104b70ab74548c8018e738bfbb3c59db)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-04 13:18:28 +00:00
Bruce Ashfield 167e470099 kernel-yocto: fix .scc and .cfg matching
SRC_URIs that contained git repositories or other constructs that resulted
in an extension of "." or a substring of "scc" or "cfg" were matching the
tests for patches and configs. This was due to a python tuple being used
instead of an array. Switching to an array makes the match exact and the
behaviour we want.

(From OE-Core rev: 22aa5d040604b37ba984bae9e800e56ba6e4956d)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-04 13:18:27 +00:00
Bruce Ashfield 996c3f80ba kernel-yocto: make configuration audit details debug only
The details of the kernel configuration audit are typically a
debug action, so should be moved to bb.debug(). But in order
to maintain visibility of the results, a reference to the log
file is provided in the standard message.

(From OE-Core rev: 9ab80ad88d34622a81670cdc45cc3275fc3ebabe)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-04 13:18:27 +00:00
Ross Burton 3c1b1312a6 cmake: reset B from autotools, as this class doesnt like it
(From OE-Core rev: f8eae815186976f6111f30ae88ac33e723863982)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-04 12:41:57 +00:00
Saul Wold 7a3d352ab8 gtk-icon-cache: Fix rdepends construction
The rdepends getVar is returning NoneType and the string constuction fails
this occurs with the hicolor-icon-theme recipe.

(From OE-Core rev: a718cf3179540e049fd0d750ce11a97f84addf40)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-01 15:54:31 +00:00
Khem Raj 62285873e2 module-base.bbclass: Call make instead of oe_runmake in do_make_scripts
This makes the external module compilation a bit more robust for
cases where external module recipes may be passing extra params
to make via EXTRA_OEMAKE, and more than often one needs to pass
M=$(PWD) when building external modules and if we use EXTRA_OEMAKE
that would mean that it would appear in do_make_scripts as well
and since we are only changing the reference kernel src tree here
it will not run the make scripts in desired directory.

It is also well explained in top makefile in kernel tree around
line# 1335 in 3.4

|else # KBUILD_EXTMOD
|
|###
|# External module support.
|# When building external modules the kernel used as basis is considered
|# read-only, and no consistency checks are made and the make
|# system is not used on the basis kernel. If updates are required
|# in the basis kernel ordinary make commands (without M=...) must
|# be used.

Therefore passing  M=... will not do the updates in the basis
kernel as expected with 'make scripts' so we have to bypass EXTRA_OEMAKE

[Yocto #3787]

(From OE-Core rev: 0e0a5ee405bab478f35690e95219a1e5f2ac7aa6)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-01 15:54:31 +00:00
Saul Wold 966aa9ec62 module.bbclass: Allow for modules to be packaged seperate from ${PN}
This patch will allow recipes that provide kernel modules to package
the module or modules in specific packages. That list is contained in
MODULE_PACKAGES, this defaults to  to preserve the current behavior.
The package can also define MODULE_FILES to specify files.

[YOCTO #3803]

(From OE-Core rev: c1ff0467bf03a3342846f0d9dde74e34b740798f)

(From OE-Core rev: 977aee43868499ab87a098f3798e90d6978836b9)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-01 15:54:30 +00:00
Martin Jansa da57e6bff8 license: fix LICENSE_CREATE_PACKAGE to stay disabled by default
* as reported by Enrico on #oe
  11:06:50 < ensc|w> JaMa: might this be caused by dc78ef91a2bf01efb8028c9afbe69e506e016265
  which checks for 'd.getVar('LICENSE_CREATE_PACKAGE', True)' evaluating to 'True' for every
  string (including the default 0)

(From OE-Core rev: bc42585ad9ca3a9891459ec3234893dff420b95b)

(From OE-Core rev: 0ab56ad52937823dc66b541dd4eda09fb6a34407)

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-02-01 15:54:30 +00:00
Constantin Musca 4873366bfc autotools.bbclass: add EXTRACONFFUNCS variable
- add EXTRACONFFUNCS variable in order to make it possible
to inject tasks after autotools_preconfigure

(From OE-Core rev: eafaeee58ab7a8f0613f54b8411f41ccefdf94c3)

(From OE-Core rev: d7950a25eda96a271aa6d541e03177d47e533f3f)

Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-01 15:54:30 +00:00
Richard Purdie 26ea367852 package.bbclass: Use expanded RDEPENDS in read_shlibdeps
We may as well expand the RDEPENDS when reading and writing as this function does.
if we don't do this, we could accidentally duplicate data and it also turns out
to be much less efficient.

(From OE-Core rev: d62a3151e7b252911c172a605b3089de355663c5)

(From OE-Core rev: 8f602e84e6ae4e346acef7cf5473343039fa352a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-01 15:54:02 +00:00
Richard Purdie 244f107c1f package: Create global package file list and use throughout PACKAGEFUNCS
Currently we do a signficant amount of tree traversal in many different places
which in inefficient. We can assume that the files don't change and cache the
file list which gives an efficiency improvement which this patch does using
a global variable.

(From OE-Core rev: 2d7608842d2dab07065e60aab729a5c8fd6b7907)

(From OE-Core rev: 5c7c8347eb1bc25d194be6f4be142ba0924e2600)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-01 15:54:02 +00:00
Richard Purdie ed931d0314 package.bbclass: Improve package_fixsymlinks
Improve package_fixsymlinks so we don't handle RDEPENDS for every single package
in PACKAGES.

(From OE-Core rev: 20ff8feb95d54e4db646f8c0cb006ce187e288af)

(From OE-Core rev: ca2ee871f82dd0ba4122a8373e4efd21cec5722b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-01 15:54:02 +00:00
Richard Purdie 398d62fd74 package.bbclass: Tweak PACKAGEFUNCS
Move package_rename_hook call into PACKAGEFUNCS and also move package_get_auto_pr
to a more appropriate execution point, grouping package metadata handling
functions together.

(From OE-Core rev: a3f41cfbc8923e54198d10db292a11ef2edda4d7)

(From OE-Core rev: 96d268166ab0d4640767bf3a0886358dcb663d0f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-01 15:54:02 +00:00
Richard Purdie b369a3619e package.bbclass: Split out package_fixsymlinks function
The symlink handling code doesn't need to being part of populate_packages
and is logically separate so split it out into a separate function,
package_fixsymlinks.

(From OE-Core rev: fc964ed2b558b08327e2bc8c93ada80ca9d97337)

(From OE-Core rev: 08a194c13857b02a2febf9b1484b3cdd67a18160)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-01 15:54:02 +00:00
Richard Purdie f955e4e482 package.bbclass: Move PKG handling code to emit_pkgdata
We only use the PKG variable in emit_pkgdata so we might as well move the
fallback code there, allowing restructuring of other parts of the metadata.

(From OE-Core rev: 0136ae9a5f719f0e7ba6e00bfd366c0e61b3b3f2)

(From OE-Core rev: df38695f0fbea10289e85fdcb7c2bdf566990577)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-01 15:54:01 +00:00
Richard Purdie 8a0b4578ec package.bbclass: Avoid copying the datastore for FILES handling
There is no real point in adjusting overrides and creating a copy of the datastore,
just to access a single variable. We can do this just as easily with a slightly
more complicated getVar call. This improves performance.

(From OE-Core rev: 69f4351809359a0c7c38e8f233f3e3f7680ed2e2)

(From OE-Core rev: b5d65f5d5e5b26d3a2c673e899114c90bcaf6bc8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-01 15:54:01 +00:00
Richard Purdie b0a2f55ccc package.bbclass: Check FILES once, not once per loop iteration
There is no need to check FILES in each loop iteration, we can just check it once
at the start when we read the variable.

(From OE-Core rev: 1bcc5cba12cbb1b846b433719d1b0820f5a97105)

(From OE-Core rev: 40542f7a46bfb8431e31eca9af06adb4b343d810)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-01 15:54:01 +00:00
Richard Purdie ae8586c952 package.bbclass: Add a shortcut exit from the mkdir function
The mkdir function iterates over strings with many different operations,
even if ultimately the target already exists. This adds a check to the start
of the function so we don't waste time when the target already exists.

(From OE-Core rev: 06e188e673313f1eb9ae7d85ae64467c8d2a94b3)

(From OE-Core rev: 9509627e06ab4cf18c5bbf3f405ecf19a9f40287)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-01 15:54:01 +00:00
Richard Purdie afb1b3fac8 package.bbclass: Improve kernel module handling
Currently the kernel module handling consists of several special cases
and has its own path walking. This refactors the code to handle them in
a more standardised way which is also a bit more efficient.

(From OE-Core rev: ad51b54f0afe8c56033137b7cf9ba398877b2651)

(From OE-Core rev: cb24a72e97afb43de5e1e79ff807fd9e184df6a2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-01 15:54:01 +00:00
Richard Purdie fed8dfff1f package: Rename splitfile functions to something more descriptive
The splitfile and splitfile2 function names are confusing and the comments
are also misleading, hard to understand or plain incorrect. This tries to
improve things.

(From OE-Core rev: 46f3050a1f46f814e2d031e7e71600b2932d631c)

(From OE-Core rev: bc6f7085b42d8137957795e800e8b46d2f1eddac)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-01 15:54:01 +00:00
Bruce Ashfield 12e76e123f multilib: skip packages that provide virtual/kernel
Rather than keying on recipes that inherit kernel.bbclass, we should
be checking for providers of virtual/kernel when skipping kernel
recipes in multlib builds.

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

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

(From OE-Core rev: dc7d181ab03ceab87a24d932130109003334dbf8)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-01 15:54:00 +00:00
Mark Asselstine dbfa6f9563 kernel: avoid copying unnecessary files during do_install
kernel_do_install() populates $kerneldir with files needed to build
external modules. To accomplish this there are several copy commands
to get source from the kernel source tree and build trees after which
a 'clean' is performed. Since we are copying from the build tree we
get about 1G of .o and .cmd files copied over only to have them
removed when we clean. This adds additional IO overhead as well as
overhead caused by pseudo. By avoiding copying these files in the
first place we get multiple gains:
  * avoid initial copy
  * avoid file deletes during clean
  * reduce pseudo overhead

Additionally we are making use of cpio vs cp which tends to be
significantly faster at performing copies.

With these changes I observe a 15-30% decrease in the time to complete
the do_install() operation on the kernel.

[YOCTO #3517]

(From OE-Core rev: c753f9d59f4d0a5af4ea5deb6e2b9609e05314e2)

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-01 15:54:00 +00:00
Lukas Bulwahn 3f1280da0a insane.bbclass: removing outdated comment
This commit removes an outdated comment that recorded an issue that has been
resolved in the commits 1c75a5df68 and
d2d5456cd3. Probably, the comment was missed
when changing the behavior in those commits.

(From OE-Core rev: fb1b51e902186b6a7d05e511fe3c3f03c10e3444)

Signed-off-by: Lukas Bulwahn <lukas.bulwahn@oss.bmw-carit.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-01 15:54:00 +00:00
Richard Purdie c9ea3c27e1 package_ipk/deb/rpm: Ensure deploy staging directory is empty before rerunning task
If we don't do this, stale files can build up, particularly with the PR
server.

(From OE-Core rev: c30ae39229b35d72e2205040d76754b5120fa878)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-30 14:09:09 +00:00
Richard Purdie 643bac1e97 insane.bbclass: Fix incorrect getVar call
On a trace I was a bit puzzled why getVar was making 180 calls to len(d).
This is an expensive operation that should be very rarely called and
certainly not by getVar. In perl's do_package it was resulting in
~1.5 million function calls from those 180 cases.

Ultimately this typo was why. Lets fix it and save the CPU cyles.

(From OE-Core rev: a8ba821d0002e4395fc5c80649fe14f93a7971fe)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-30 14:09:09 +00:00
Richard Purdie b01b1a704b sstate: Move debug comment to more logical place
The same log message gets output multiple times in the log which look
confusing and is rather pointless. Move the log message to the correct
level.

(From OE-Core rev: 3917409004a830e7ad0646f05ad7421385cbd1de)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-30 14:09:09 +00:00
Saul Wold 27c8af1e3a module.bbclass: Don't add pkg_postinst/pkg_prerm to all packages in recipe
The code in module.bbclass was appending the pkg_postinst and
pkg_prerm to all packages that are part of a given recipe, meaning
that the -lic, -dev, -doc, ... packages all got the scriptlet
This change uses  only which macthes with the RDEPENDS and FILES
already used in module.bbclass.

The failure was that rootfs creation would fail due to the -lic package
being installed before the kernel and the script would fail.

[YOCTO #3803]

(From OE-Core rev: cf05c4578c99c0cb885cf2706f7f2b39b100aeb8)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-30 00:03:01 +00:00
Saul Wold 96180955d0 rootfs_rpm: Escape the backtick to ensure the ls runs on the target
This change ensures that the ls /etc/rpm-postinsts runs in the target
at first boot time, rather than at the creation time of the script on
the host.

This was causing the following error in the rootfs log:

+ install -d /srv/ssd/sgw/machines/fri2/tmp/work/fri2-poky-linux/core-image-minimal/1.0-r0/rootfs//etc/rcS.d
+ i=
+ ls /etc/rpm-postinsts/
ls: cannot access /etc/rpm-postinsts/: No such file or directory

(From OE-Core rev: e893cf0b3843701e80f5c9f47be04d1a88e5ed68)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-30 00:03:01 +00:00
Constantin Musca 3ba2ce25bd migrate_localcount.bbclass: use PRAUTOINX instead of PN & PV
- we need to use PRAUTOINX (it covers all cases)
- it addresses bumped PE issues

[YOCTO #3071]

(From OE-Core rev: ec81b985bb29a8562366f5343171e68a1f9cc4e9)

Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-28 14:49:04 +00:00
Andreas Müller b71a16e8ac package.bbclass: remove RRECOMMENDS on base packages for locale packages
As long as we support only one locale package per recipe this leads to unwanted
packages in images. This patch was motivated by samba (meta-oe): only wanting
libsmbclient one gets full samba server into the image. For my standard image
the follwing package were removed by this patch:

-acl_2.2.51-r3_armv7a-vfp-neon.ipk
-alsa-states_0.2.0-r3_armv7a-vfp-neon.ipk
-alsa-utils_1.0.25-r3_armv7a-vfp-neon.ipk
-alsa-utils-aconnect_1.0.25-r3_armv7a-vfp-neon.ipk
-alsa-utils-alsaconf_1.0.25-r3_armv7a-vfp-neon.ipk
-alsa-utils-alsactl_1.0.25-r3_armv7a-vfp-neon.ipk
-alsa-utils-alsaloop_1.0.25-r3_armv7a-vfp-neon.ipk
 alsa-utils-alsamixer_1.0.25-r3_armv7a-vfp-neon.ipk
-alsa-utils-alsaucm_1.0.25-r3_armv7a-vfp-neon.ipk
-alsa-utils-amixer_1.0.25-r3_armv7a-vfp-neon.ipk
-alsa-utils-aplay_1.0.25-r3_armv7a-vfp-neon.ipk
-alsa-utils-aseqdump_1.0.25-r3_armv7a-vfp-neon.ipk
-alsa-utils-aseqnet_1.0.25-r3_armv7a-vfp-neon.ipk
-alsa-utils-iecset_1.0.25-r3_armv7a-vfp-neon.ipk
-alsa-utils-midi_1.0.25-r3_armv7a-vfp-neon.ipk
-alsa-utils-speakertest_1.0.25-r3_armv7a-vfp-neon.ipk
-attr_2.4.46-r4_armv7a-vfp-neon.ipk
-avahi_0.6.31-r7.1_armv7a-vfp-neon.ipk
-gtk-engines_2.20.2-r3_armv7a-vfp-neon.ipk
-pulseaudio_2.1-r15_armv7a-vfp-neon.ipk
-samba_3.6.8-r6_armv7a-vfp-neon.ipk
-vte_0.28.2-r5_armv7a-vfp-neon.ipk
-xz_5.1.2alpha-r0_armv7a-vfp-neon.ipk

Strange effect: For samba buildhistory's depends.dot says:
-samba -> libc6;
-samba -> libgcc1;
-samba -> libreadline6;
-samba -> libtalloc2;
-samba -> libtdb1;
-samba -> libwbclient0;
-samba -> libz1;
-samba -> update_rc_d;
-samba_locale_de -> samba [style=dotted];
 samba_locale_de -> virtual_locale_de [style=dotted];
-samba_locale_fr -> samba [style=dotted];
-samba_locale_fr -> samba [style=dotted];

This is conflicts to buildhistory's result on samba package not mentioning
any changes for samba package.

(From OE-Core rev: 50354ebece43a6c13f9ca592e7d230765a26fdf8)

Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-28 12:29:30 +00:00
Andreas Müller 52268c7599 buildhistory.bbclass: track also complementary package information
(From OE-Core rev: ffdb003590d5c1d49d6c6a6710adf71397e4fb9b)

Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-28 12:29:30 +00:00
Hongxu Jia 44f232f6f8 gtk-immodules-cache.bbclass:fix support postrm at image creation time
Let postrm use the same logic as the postinst to run on both build machine
and target

[YOCTO #3633]

(From OE-Core rev: dc1bb7a5532411bc9cb7e8678bc540c44fd2cd63)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-28 12:29:29 +00:00
Hongxu Jia 92209ae0cb gtk-icon-cache.bbclass:fix support postrm at image creation time
When use postrm on the build machine, it installs the hook in intercept-scripts
directory and exit 0, the hook will be later invoked and it will properly call
gtk-update-icon-cache.

[YOCTO #3633]

(From OE-Core rev: 6ae0b8339134300d0c179bd47dc3062e0e1f2f0b)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-28 12:29:29 +00:00
Martin Jansa 15aa713482 license.bbclass: package license texts to PN-lic when LICENSE_CREATE_PACKAGE is enabled
[YOCTO #3743]

(From OE-Core rev: dc78ef91a2bf01efb8028c9afbe69e506e016265)

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-01-28 12:29:29 +00:00
Martin Jansa 2daab0b3a2 license.bbclass: extract functionality to find license files to separate function
* move it from do_populate_lic to find_license_files so we can reuse it
  to populate license in package itself

[YOCTO #3743]

(From OE-Core rev: 833f8c239aa475b3e0cacbd448a90079ac287468)

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-01-28 12:29:29 +00:00
Richard Purdie 34b415842d staging: Drop obsolete comments
(From OE-Core rev: 44a2374dcfd68c8e158e0c901d75dbd7327652a5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-25 12:58:35 +00:00
Richard Purdie 0d2a301bca sstate: Add optimisation for useradd injected dependencies
useradd.bbclass adds sstate dependencies on base-passwd, shadow-native and
shadow-sysroot. Due to the way these are injected, they interact badly with
the other dependency validation logic and end up pulling in dependencies we
don't actually need. This patch adds code to optimise those cases out.

(From OE-Core rev: 784ca68fcca4ffb34390d55d9343570cfdf0305f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-25 12:42:48 +00:00
Richard Purdie 3247292683 Split do_packagedata task from do_package
Currently, do_rootfs has a dependency on all the do_package output being present
due to its usage of the pkgdata directories. This means that if you run:

bitbake xxxx-image -c rootfs

you end up having to fetch and unpack all the do_package data which is usually
large and inefficient. It also means rm_work has to leave all the do_package
data lying around so rootfs works.

This patch splits the actual creation of the pkgdata directory off into a separate
task, "packagedata" which happens immediately after do_package. We can then remap
the dependencies so this task is depended upon, not do_package. Sstate can then be
programmed not to require do_package at the appropriate times.

Whilst this patch doesn't do so, it opens the possibility of rm_work wiping
out the do_package output from WORKDIR as long as it also removed the do_package
stamp (both normal and setscene variants) and allowing more space savings
with rm_work which has been regularly requested.

(From OE-Core rev: 6107ee294afde395e39d084c33e8e94013c625a9)

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

[YOCTO #3744]

(From OE-Core rev: e00f49de8b1f79c3e07b887d257bd75a46052fa0)

Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-25 12:42:43 +00:00
Philip Balister a25f99bc9b base.bblass : Add support for cmake to PACKAGECONFIG.
The cmake class uses EXTRA_OECMAKE to adjust the cmake configuration. This
patch adds support for this, if the cmake class is used by the recipe.

(From OE-Core rev: d8c0ce5a4a27c8aa1d07fc15d6e000af725a51e6)

Signed-off-by: Philip Balister <philip@balister.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-25 12:42:43 +00:00
Richard Purdie 240c55275e cpan_build: Fix cmaker Build.PL module builds
Certain cpan Build.PL based modules were failing to build due to
the host's config information being used instead of the targets.

This patch sets the appropriate variables to ensure the modules
get the correct configuration from the target config_heavy.pl script.

It also ensures the linker is CCLD, not LD since the LDFLAGS contain
-Wl,XXX options and build failures result if LD is used.

libencode-detect-perl is a module which tests this class extensively.

(From OE-Core rev: 7fac8bffcd250aec90c0b675aeb2bbe7896d0ae1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-25 12:42:42 +00:00
Paul Eggleton f0c8897dc8 classes/image-swab: remove zypper-related references
Remove references to libzypp, zypper and sat-solver which have been
removed.

(From OE-Core rev: cc9144f99844a8485b2b96182bdf40429286ae66)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-24 20:09:00 +00:00
Richard Purdie 1f8f6fe4eb packagedata: Add error message if multiple recipes try to write the same package
If multiple recipes try and write the same package it resulted in a
rather confusing traceback and unintuitive error. This patch
prints a human readable error instead.

[YOCTO #3645]

(From OE-Core rev: 6f817779af77fdb0b861297f0f43c4c6607ce6f0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-24 20:09:00 +00:00
Richard Purdie 932a4cdf4b sanity.bbclass: Ensure tmpdir exists when running the check
This avoids tracebacks from bitbake if the directory doesn't already
exist.

[YOCTO #3640]

(From OE-Core rev: 1a60e96b21d328fe936e594f3061459e8f2f1b5e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-24 20:09:00 +00:00
Richard Purdie f19bdeab37 core-image: Add hwcodecs IMAGE_FEATURE
Currently hardware codecs are being injected in rather ugly ways and end up
either in no or all images. This adds a dedicated IMAGE_FEATURE for them based
on the MACHINE_HWCODECS variable. We may need to refine this in due course
but this patch at least illustrates the concept.

(From OE-Core rev: 1cb370587fd72e3f0f69678748108cc4116767fb)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-24 20:09:00 +00:00
Richard Purdie 4db8a3daaf base: make feature backfilling happen earlier
Backfilling DISTRO_FEATURES and MACHINE_FEATURES with _append statements happens
too late to use those variables with conditional inherits, like this:

inherit ${@base_contains('DISTRO_FEATURES','sysvinit','update-rc.d_real','',d)}

Instead, do the backfilling at ConfigParse time so that it happens earlier in
the parse, which results in that inherit behaving as expected when sysvinit was
backfilled.

(From OE-Core rev: 22429cdf79ed952072707a929643c7386fa7e056)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-24 20:08:59 +00:00
Constantin Musca 8d6e55bf21 prserv: add LOCALCOUNT to AUTOINCs migration feature
- use migrate_localcount.bbclass to generate AUTOINC entries
which are exported to LOCALCOUNT_DUMPFILE
- import the generated AUTOINC entries
- one can migrate LOCALCOUNT to AUTOINC by executing:
    bitbake-prserv-tool migrate_localcount

[YOCTO #3071]

(From OE-Core rev: ffab86f13cafb10d8d6273b6af8cd9a3c84eae20)

Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-22 16:01:32 +00:00
Chen Qi bd10a6d257 rootfs_rpm.bbclass: fix the unexpected postinst error
If the /etc/rpm-postinsts/ directory was empty, the following error
would occur at system startup.

      ERROR: postinst /etc/rpm-postinsts/* failed

This patch fixes this issue.

[YOCTO #3767]

(From OE-Core rev: 202263aeca837dc7b6615a3dc34569c199163733)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-22 15:54:34 +00:00
Wolfgang Denk c3256233c6 populate_sdk_base.bbclass: Allow installation of ix86 SDK on x86_64 host
Commit c04f5435 "populate_sdk_base.bbclass: use SDK_ARCH instead
of SDKMACHINE" prevents not only the installation of 64 bit SDK
configurations on 32 bit hosts (which indeed cannot work), but also
the legitimate installation of a 32 bit SDK on a 64 bit host.

Fix this.

While there, also make sure we use the same patterns ("i[3-6]86" resp.
"x86[-_]64" to get unified strings for both INST_ARCH and SDK_ARCH.

(From OE-Core rev: 7ddd97b9b09fe7a327916ea88908a63375556ae6)

Signed-off-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-22 15:44:12 +00:00
Ross Burton 779d915c7d gtk-doc: parameterise the documentation directory
Not every package puts the gtk-doc infrastructure into ${S}, so allow this to be
overridden.

(From OE-Core rev: 40353c9ef83f986a0d49cc6eb654b3ace6ef4dc4)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-21 12:44:54 +00:00
Christopher Larson f63f387b83 package.bbclass: drop unnecessary and broken packages.remove()
(From OE-Core rev: 5480371d0473482437ce4350e6593f006101ef40)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-21 10:22:08 +00:00
Mark Hatle 59e15f6712 update-alternatives: Add a build-time dependency
We need to add a build time dependency on virtual/update-alternatives,
however we can't just do DEPENDS +=, or we end up with various problems.  To
work around this, in the anonymous python space we ensure we only do the
addition when the package does not provide virtual/update-alternatives and
it is a target package.

Also the system wide PREFERRED_PROVIDER was incorrect.  It references a
runtime package, and not the recipe it should have.  This has been corrected.

[YOCTO #3691]

(From OE-Core rev: 56a59ef12936dcc6464cf1d43dda6957a5aa8c65)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Tested-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-20 13:06:43 +00:00
Mark Hatle 3df0d2390d populate_sdk_rpm: Re-add a few system provides to the SDK
When building the target SDK portion, we can safely ignore various
package rdepends.  These dependencies are not required on a build
only environment like an SDK.

[YOCTO #3691]

(From OE-Core rev: 1edd44bed9e9829f7c2466928bc3f45be102b84b)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Tested-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-20 13:06:43 +00:00
Richard Purdie 8bb0353e08 cpan_build: Fix bashism
Fix a build failure caused by a bashism and improve quoting whilst in
the area.

(From OE-Core rev: 9eb78340c61acddb0c2012e25c76c18735febb4d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-20 12:58:59 +00:00
Richard Purdie eabd8606f9 package.bbclass: Fix shlibs cross package-arch contamination
I found that if I had two packages architectures built (say core2 and i586),
that the shlibs data from i586 was being used in the core2 build. This
lead to odd dependency issues if the i586 build was out of date and core2
was being targetted.

When loading shlibs files, the last loaded wins so we need to iterate the
lists from least to strongest weighting, not the other way around. With this
patch applied, the contamination issue is resolved.

(From OE-Core rev: acd7b1c2ee9f3ff84c45a723dba5e0bc5f6a100c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-20 12:58:58 +00:00
Jason Wessel 63ccf62420 populate_sdk_base.bbclass: Work around bugs with gnu tar < 1.24
The gnu tar versions less than 1.24 pose a problem with the SDK
extraction.  A typical SDK will have hard links.  The SDK is created
with a newer version of tar but extracted with the host version of tar
which may be much older.  The specific defect is that older version of
gnu tar do not properly handle the "--strip-components=" argument when
processing hard links and the paths do not get properly truncated and
hooked up with the corresponding real file payloads.  This leads to
errors like the following during the SDK install:

tar: sysroots/qemux86-yocto-linux/usr/bin/getconf: Cannot hard link to `./opt/yocto/SDK-qemux86/sysroots/qemux86-yocto-linux/usr/bin/POSIX_V6_ILP32_OFFBIG': No such file or directory

The simple way to work around the problem is to just not save the path
information that is going to get chopped off anyway.  This has the
added benefit that it saves a small amount of space in the tar archive
as well.

(From OE-Core rev: 0f4112016bac07f0294f2a4d0fde4659c0fed2d2)

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-20 12:58:58 +00:00
Enrico Scholz 116fb4a72f package.bbclass: replace AUTOINC directly in PKGV
b27b438221e16ac3df6ac66d761b77e3bd43db67 introduced a regression when
PKGV is modified by the recipe.  E.g. when having something like

| PV = "1.7.33+gitr${SRCPV}"
| PKGV = "1.7.33+gitr${GITPKGV}"
| RDEPENDS_${PN}-subpkg += "${PN} (= ${EXTENDPKGV})"
| inherit gitpkgv

The resulting core package has

| Version: 1.7.33+git234+cd01e8c-r11

and because the subpackage has

| Depends: vdr (= 1.7.33+git0+cd01e8c18d494150730214f033f84e5282ce7639-r11)

image build fails with

|  * satisfy_dependencies_for: Cannot satisfy the following dependencies ...
|  *    vdr (= 1.7.33+git0+cd01e8c18d494150730214f033f84e5282ce7639-r11)

Patch avoids the 'PKGV = "cleanup(${PV})"' operation and replaces
AUTOINC directly within PKGV.  This might introduce a regression too
when 'AUTOINC' is added to PKGV intentionally but impact is small and
can be fixed trivially by using another string.

(From OE-Core rev: 6e46664085fa49bc204fc944ca23ed6383e2ec51)

Signed-off-by: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Cc: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-20 12:58:57 +00:00
Khem Raj a3ca06c3b4 kernel.bbclass, module-base.bbclass: Use CC to form KERNEL_CC
kernel compiler is not special and we currently have it so
we want to pass -march and -mtune options as CFLAGS to kernel
build so that compiler picks the right subarch flags when
compiling assembly files in particular. Otherwise defaults
are chosen which may not be right in many case e.g. when
compiling kernel for collie machine we should use arch=armv4
but it uses toolchain/as defaults which is armv5te

in some case e.g. thumb1 we know that kernel can not be compiled
in thumb1 mode so we can provide that information e.g. -marm
option through KERNEL_HOST_CC_ARCH variable as we do now

(From OE-Core rev: c49f967384ccbfe131bbb33ee518014f3fc4b38f)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-20 12:58:56 +00:00
Radu Moisan b94227f729 update-rc.d: disable update-rc.d.bbclass when systemd enabled
update-rc.d is not necessary when systemd is enabled,
systemctl is the replacement

(From OE-Core rev: eaa82c842d3197e0251a887ba16028c22f9d8d94)

Signed-off-by: Radu Moisan <radu.moisan@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-20 12:58:55 +00:00
Bruce Ashfield 486e19d180 kernel-yocto: add KBUILD_OUTPUT to OE_TERMINAL_EXPORTS
Since linux-yocto based recipes have a split build and source directory,
we should export KBUILD=${B} to the devshell. This allows the kernel to
be incrementally build within the shell and not dirty the source
directory (which breaks subsequent full builds).

(From OE-Core rev: 88f88a22dfa730161168b0f228e3954178b74c6a)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-18 13:28:09 +00:00
Bruce Ashfield 11bafdee06 kernel-yocto: remove unnecessary non-bare warning
In the past working from a non-bare clone would cause problems,
due to branches not existing in the WORKDIR clone. This hasn't
been true for some time, since the routines which convert remotes
into local branches have been functioning without problems.

So we no longer need the warning and it can be removed.

(From OE-Core rev: 42d42c24a37af0ea8896087c7cc8215eb19f633d)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-18 13:28:09 +00:00
Hongxu Jia ee5333b0bd update-rc.d:fix support postrm at image creation time
updatercd_postrm failed at image creation time because "-f -r ${D}" is not
used as update-rc.d's option.

[YOCTO #3633]

(From OE-Core rev: deb8ac868a989f41c0664312a5fb855358be2296)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-18 13:28:08 +00:00
Laurentiu Palcu 71537bb721 kernel.bbclass: remove references to update-modules
Since update-modules is now obsolete, remove it from the bbclass.

[YOCTO #3598]

(From OE-Core rev: 323146c7fdf1c47241f3fd5adab2cb3c6d24b56c)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-18 13:28:08 +00:00
Laurentiu Palcu 173a618263 module.bbclass: do not use update-modules anymore
update-modules is obsolete. The bbclass was updated not to use it
anymore.

[YOCTO #3598]

(From OE-Core rev: 6fafbf71adb8b34211c2bc24226f0b1eb206a7d3)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-18 13:28:07 +00:00
Christopher Larson aac03657ee base.bbclass: improve the incompatible license logic a bit
Handle the potential case where the recipe level LICENSE contains an
incompatible license, but all of its emitted packages are in fact compatible.
Without this adjustment, it would skip such a recipe.

(From OE-Core rev: 9256361cf2e929004dcc5615b21fe3c46d9f7740)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-18 13:28:06 +00:00
Christopher Larson d597053ce2 base.bbclass: use debug messages for INCOMPATIBLE_LICENSE
Spamming potentially over a screenful of messages due to their
INCOMPATIBLE_LICENSE selection seems a bit unnecessary. If the distro was
configured that way, the user likely won't care, and if the user set it, they
likely know the implications, so make the messages debug instead.

(From OE-Core rev: 72f47df32dce91e3364e3837e2c47bdd2d632571)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-18 13:28:06 +00:00
Christopher Larson cea9f48ea8 license.bbclass: cleanly handle invalid licenses in incompatible_license
This gives us an error message (bb.fatal) rather than a traceback due to the
uncaught LicenseError.

(From OE-Core rev: 7fab4cd27a2ad896218123ca82252e2b59526726)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-18 13:28:05 +00:00
Christopher Larson 8491c2a522 license: correct re.search/fnmatch indentation
This was causing it to only obey the last of the elements in
INCOMPATIBLE_LICENSE.

(From OE-Core rev: df4a4b9792e3bd13b396b94e232c69054fdf19b5)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-18 13:28:05 +00:00
Christopher Larson feca9f7849 license.bbclass: check LICENSE_pkg, not LICENSE_pn-pkg
Recipes define the latter, as that's what goes into the binary packages, not
the former.

(From OE-Core rev: 6a59b294b99b05e8973b5f2d60678988e90e2de3)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-18 13:28:05 +00:00
Paul Eggleton 411413aa28 classes/image: improve debug-tweaks ssh server configuration
Create a single postprocessing function that enables no-password logins
for both openssh and dropbear when debug-tweaks is in IMAGE_FEATURES,
changing its behaviour slightly:
* Run it regardless of whether ssh-server-* are in IMAGE_FEATURES so
  that it still takes effect if these are installed by adding
  dropbear/openssh to IMAGE_INSTALL.
* Enable it to be run from image.bbclass rather than core-image.bbclass
  so that it works for images that are using the former.

Second half of the fix for [YOCTO #2578].

(From OE-Core rev: 0937054e6e3e02565f57e60a8bdc14b0ad62e249)

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-01-18 13:28:05 +00:00
Paul Eggleton 8ca0d592c5 classes/rootfs_*: error out if postinstalls exist with read-only rootfs
If there are postinstall scripts to be run on first boot and
IMAGE_FEATURES contains "read-only-rootfs", we know this will fail on
the target device so just error out during do_rootfs. This check was
already implemented for ipk, so add it to the deb and rpm backends. Also
make all backends use bberror rather than just echo to display the
error.

Fixes [YOCTO #3407].

(From OE-Core rev: 510e377f252dece8850487c30482f83df4a89c7e)

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-01-18 13:28:05 +00:00
Christopher Larson 89031c2651 ptest.bbclass: don't add to PACKAGES if disabled
Without this, we have excessive dependencies leaking into the build. In
particular, glib-2.0 was sucking in python modules even if ptest wasn't in
DISTRO_FEATURES.

(From OE-Core rev: 7bf5ee91aa84a6fa85d6da361b64139889faa172)

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-01-18 13:28:04 +00:00
Martin Jansa 200743b89e kernel.bbclass: don't depend on DATETIME
* http://cgit.openembedded.org/openembedded-core/commit/?id=67e77cd948c69798695d5d5f34163ef89339b35a
  moved DATETIME dependency from MODULE_TARBALL_BASE_NAME to MODULE_IMAGE_BASE_NAME
  but without copying that vardepsexclude

(From OE-Core rev: 9a93866067253746a889bfe444b6036cf85944b4)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-17 20:16:46 +00:00
Robert P. J. Day 46420331ef image_types.bbclass: Add and update comments regarding image types.
Explain the elf/cpio.gz snippet of code, and update a comment to
reflect the correct variable name.  No functional change.

(From OE-Core rev: 0ca4a3a25e4495bf6e2e3932c019bd15856faf55)

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-16 11:57:33 +00:00
Emilia Ciobanu 94cd6a15e2 distrodata: Updated checkpkg task
bitbake -c checkpkg fetches the latest version for all packages,
including the ones from sourceforge and those that have
ununsual package naming.
Also removed all pn-native/nativesdk-pn entries from the resulting
checkpkg.csv file if the system already reported the latest version
for pn.

(From OE-Core rev: dc33d69df55ad8d63024d34e35a0b987e01b0077)

Signed-off-by: Emilia Ciobanu <emilia.maria.silvia.ciobanu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-16 11:57:31 +00:00
Martin Ertsaas 2c7bba51a6 sstate: Do not add the --no-run-if-empty arguement to xargs when on Darwin, as it is not supported.
(From OE-Core rev: 73b34d43633717b99e4f2f669939939cfa59eecb)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-15 08:10:14 +00:00
Laurentiu Palcu 9129102aee gtk-immodules-cache.bbclass: allow for offline cache generation
In order to support a RO rootfs, the cache generation during postinstall
has to be done on host. However, gtk-query-immodules application will
only be able to parse shared objects from the same ELF class.
In order not to have a native package for all the recipes providing
an input method, so we can generate the cache file natively, run
gtk-query-immodules through qemu emulator.

[YOCTO #3602]

(From OE-Core rev: 78281edfe2342dccd7f598277464a3dd05ac4c0e)

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-01-10 23:43:15 +00:00
Laurentiu Palcu aab3c1306f qemu.bbclass: add qemu_run_binary() function
[YOCTO #3602]

(From OE-Core rev: 2cfbe0bd9d02ab8c054e5bc879a2181c6a7e3719)

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-01-10 23:43:15 +00:00
Robert P. J. Day f1b530fb2f kernel.bbclass: Define MODULE_IMAGE_BASE_NAME for layer convenience.
Define the additional variable MODULE_IMAGE_BASE_NAME since some
layers (like meta-ti) would find it handy for multi-kernel
definitions in that they wouldn't have to define their own
variable representing exactly the same thing.

(From OE-Core rev: 67e77cd948c69798695d5d5f34163ef89339b35a)

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-10 23:43:14 +00:00
Chen Qi 67e056a76a rootfs_rpm.bbclass: export INSTALL_PLATFORM_EXTRA_RPM
Export this variable because package_rpm.bbclass needs it.

[YOCTO #3682]

(From OE-Core rev: 64b01c6c945346b661f294fc8a49bf04a72da3c0)

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-01-10 23:43:09 +00:00
Marco Cavallini 09ec2a4865 kernel.bbclass: kernel_do_install fails with kernel <2.6.30
* kernels <2.6.30 don't have $kerneldir/tools directory
 * so we got this error:
 * sed: can't read ...SNIP...linux/2.6.30-r0/image/usr/src/kernel/tools/perf/Makefile: No such file or directory
 * ERROR: Function failed: do_install

(From OE-Core rev: 4dd39a23dfe069ad34a925e00407b4dde978cb01)

Signed-off-by: Marco Cavallini <m.cavallini@koansoftware.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-10 23:43:09 +00:00
Hongxu Jia be78e8190a sstate.bbclass:specify function dirs to avoid race
Specify dirs in which the shell function "sstate_create_package" and
"sstate_unpack_package" are executed and don't use ${B} as default dirs
to avoid possible race with task do_rootfs at deb image creation time.

[YOCTO #3674]

(From OE-Core rev: ccef1cf783669a4683eda9d4b44dbe6bcf426259)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-09 15:05:26 +00:00
Christopher Larson af19d889ef copyleft_compliance: force the symlink creation
(From OE-Core rev: 74b82fd4cc3e5eec611800935f1c89db3bac9971)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Gilbert Coville <gilbert_coville@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-07 14:43:24 +00:00
Christopher Larson db51e36b8e copyleft_compliance: grab the scm mirror tarballs
If the mirror tarball is available, it's a better choice for this than the
repository directory.

(From OE-Core rev: 8183962869363731acf57f2f531da737512f0f2f)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Gilbert Coville <gilbert_coville@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-07 14:43:24 +00:00
Enrico Scholz 41a15a9af9 image.bbclass: quote TARGET_VENDOR
The buildsystem does not install locale files anymore, when
TARGET_VENDOR is empty.  This regression was introduced by
ff01518c6667e1b6e87df4e5a435a701d0f38fa7

(From OE-Core rev: 7d64232f370817c0536412589bd4ed612f214e18)

Signed-off-by: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-07 13:50:39 +00:00
Robert P. J. Day faf94a9d6d package.bbclass: Skip testing "packages" a second time.
Since the "packages" variable is already tested a few lines above in
the same routine:

    if len(packages) < 1:
        bb.debug(1, "No packages to build, skipping do_package")
        return

there is no point testing it again, and the error message doesn't even
refer to "packages", anyway.

(From OE-Core rev: 371fbacff47828cfff99f1152f9e269e27c474da)

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-07 11:09:44 +00:00
Robert P. J. Day d12bffc262 lib_package.bbclass: Correct comment referring to bin directories.
FILES_${PN}-bin = "${bindir}/* ${sbindir}/*"

so the comment should match that.

(From OE-Core rev: 81bc0b96a085742f7dc9e8e90bb32529efbaf920)

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-07 11:09:42 +00:00
Christopher Larson 7f8eedaa86 update-alternatives.bbclass: use absolute paths for link targets
This improves compatibility, as both the debian update-alternatives and the
chkconfig alternatives require absolute paths.

(From OE-Core rev: 2b8bf64f1f6999b65ddd3efc2c6ddb7e70fead53)

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-01-07 11:09:40 +00:00
Martin Jansa 5ffe7a216c kernel.bbclass: include PE in KERNEL_IMAGE_BASE_NAME
* without this you it's harder to see which kernel is newer version
  e.g. after branch change LOCALCOUNT in SRCPV is reset to 0, so it needs PE bump for upgrade path
  but then it's clear why gitr1+HASH has newer DATETIME then gitrN+HASH, so include PE in name
* it will sort alphabetically wrong in deploy dir for a while until old images are removed

(From OE-Core rev: 3b5fe6d2cd58b5db70c3d319ffc66b1cbff1f43a)

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-01-07 11:09:38 +00:00
Constantin Musca 94516ced8d package.bbclass: don't prepend MLPREFIX to LOCALEBASEPN
- all the recipes that overwrite LOCALEBASEPN must consider
also the MLPREFIX
- if the LOCALEBASEPN variable is not overwritten then it will
have the correct prefix (LOCALEBASEPN ??= "${PN}")

(From OE-Core rev: 855d64a3091c5358e2e1a7f4247929515b068708)

Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-07 11:09:37 +00:00
Constantin Musca 1674541ed8 multilib: fix allarch/kernel/module-base multilib issues
- skip the non-packagegroup allarch recipes in multilib_virtclass_handler
- extend PROVIDES/RPROVIDES for allarch recipes which are not packagegroups
- use variants from MULTILIB_GLOBAL_VARIANTS (lib32 lib64 libx32) to create
additional pkgdata files for multilib allarch: ${pkgdatadir}/${variant}-${PN}
and ${pkgdatadir}/runtime/${variant}-${pkg}
- use variants from MULTILIB_VARIANTS to create additional pkgdata files
for multilib kernel/module-base recipes
- add a sanity check to determine if the current multilib is in
MULTILIB_GLOBAL_VARIANTS

[YOCTO #2918]
[YOCTO #3440]
[YOCTO #3565]
[YOCTO #3568]

(From OE-Core rev: bc4da2573dfb59ea2fc4af359701818df20f7663)

Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-31 09:43:25 +00:00
Martin Jansa 9dc384ddfb gtk-icon-cache: don't call gtk-update-icon-cache on files
* check if icondir is directory before calling gtk-update-icon-cache, like all other calls do
* fixes:
  | > Executing update_icon_cache
  | + chmod +x update_icon_cache
  | + ./update_icon_cache
  | gtk-update-icon-cache.real: Failed to open file /tmp-eglibc/work/qemuarm-oe-linux-gnueabi/shr-image-all/2.0-r20/rootfs/usr/share/icons/enjoy.png/.icon-theme.cache : Not a directory
  | gtk-update-icon-cache.real: Failed to open file /tmp-eglibc/work/qemuarm-oe-linux-gnueabi/shr-image-all/2.0-r20/rootfs/usr/share/icons/monav.png/.icon-theme.cache : Not a directory
  | gtk-update-icon-cache.real: Failed to open file /tmp-eglibc/work/qemuarm-oe-linux-gnueabi/shr-image-all/2.0-r20/rootfs/usr/share/icons/orrery.png/.icon-theme.cache : Not a directory

(From OE-Core rev: 6c2962dc117304c542fd5458b39524ecdb81cae9)

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>
2012-12-26 11:34:09 +00:00
Fahad Usman 7d450fb74a cml1: set and export TERMINFO, to handle ncurses-native relocation
ncurses library looks at the compiled-in search path for the terminfo
database, and that path no longer exists, when using cached binaries (sstate).
Export TERMINFO pointing at the current sysroot, so the attempt to run mconf
is able to find the correct terminfo db.

(From OE-Core rev: b036adfb868c042245cd8fba8ecc2ba53169bfea)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>

the patch was imported from meta-mentor layer on yoctoproject git server
http://git.yoctoproject.org/cgit/cgit.cgi/meta-mentor as of commit id
0cae284f294e3a2c99d9a4d79c95c25103cd8f8b

Signed-off-by: Fahad Usman <fahad_usman@mentor.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-26 11:34:07 +00:00
Björn Stenberg 1d2c6833ae Add a new distro feature "ptest".
This patch creates a new distro feature "ptest", which creates -ptest
packages containing the test suite of the package for running on the
target. Test files are installed in /usr/lib/<pkg>/ptest.

The patch also includes a change to automake, splitting the "make check"
target into separate steps for building and running the tests.

(From OE-Core rev: 6f92e7f8891008dd3c89325d3fbe2da853372326)

Signed-off-by: Björn Stenberg <bjst@enea.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-26 11:34:04 +00:00
Mark Hatle 90c0eb29f0 rootfs_rpm.bbclass: remove debug code
Debugging code was accidently left in the previous commit.  Remove
the code as it prevents multiple concurrent bitbake builds.

(From OE-Core rev: bbd55cc34ca893c7202634fe138cedb2f380be56)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-19 21:43:55 +00:00
Mark Hatle 1874c8d7e2 package_rpm.bbclass: Refactor the attempt only install
Smart does not have a method to perform an install, but ignore failures.

There was a class of failures that stopped Smart from processing
attemptonly installs.  To work around this we need to iterate over the to
be attempted list.

(From OE-Core rev: 7c11ab93242ad3453b730da79a641479de588227)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-19 17:55:00 +00:00
Paul Eggleton 84a5c63a57 classes/image: handle multilibs in complementary package lookup
For multilib the vendor string is altered, so we need to iterate over
all of the multilib vendors when we do the glob processing for
complementary packages.

(From OE-Core rev: ff01518c6667e1b6e87df4e5a435a701d0f38fa7)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>

In addition, the RPM package arch have been munged by adding the multilib
identifier.  This identifier needs to be stripped when generating the
installed_packages list for the complementary lookup code to work.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-19 17:55:00 +00:00
Constantin Musca 2c57f28eda bitbake.conf: add nonarch_base_lib variable
Adapt stagging.bbclass to this change

(From OE-Core rev: 0730a8cbb42cd8b6667f2d1daefa0f6fcec06af2)

Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-19 17:54:58 +00:00
Laurentiu Palcu 359eb5194c gconf: add gconftool-2 native wrapper
This is needed when sstate cache is fetched from another build server.
In this case, the postinstall will fail because the backend libraries
path will be from the build server.

(From OE-Core rev: bba414bc9d14eb2d29b54c68259d13ddbe6567fa)

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>
2012-12-19 17:54:55 +00:00
Phil Blundell 3d154ae119 kernel.bbclass: Allow modules*.tar.gz generation to be inhibited
The modules.tar.gz archive is sometimes of no value and it can take
a noticeable time to build if many modules were enabled in the kernel
configuration.  The extraneous file also contributes to deploy/ clutter
and is a waste of disk space.

Allow it to be suppressed by setting MODULE_TARBALL_DEPLOY="0".

(From OE-Core rev: 262bfde1c5c51cc902b50bf0dda543434f12010c)

Signed-off-by: Phil Blundell <pb@pbcl.net>
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>
2012-12-19 17:54:51 +00:00
Martin Jansa 79f31adabf kernel.bbclass: use the same versioning schema for modules.tgz and provide link to latest
* so it will work look KERNEL_IMAGE
* also we were recreating modules.tgz with every kernel build, but
  overwritting the same output file

(From OE-Core rev: 73f242a61f913a0b0cd88265cd9ff6bcf3924623)

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>
2012-12-19 17:54:51 +00:00
Martin Jansa 5f2515667d rootfs_*.bbclass: exclude BUILDNAME var dependency from do_rootfs
* I have kernel recipe which depends on other recipe to build tiny initramfs
  image, without this change it rebuilds not only that initramfs image
  but also whole kernel when DATE or TIME is changed and OEBasicHash enabled
* also resolves ERROR shown when bitbake -S is used for image:
  ERROR: Bitbake's cached basehash does not match the one we just generated
  (/OE/oe-core/openembedded-core/meta/recipes-core/images/core-image-minimal.bb.do_rootfs)!
  ERROR: The mismatched hashes were 8c35cdf8a5d09c03941f081dd9f6d8dc and b5d6e2e5952770557c48c5779ddb73fc

(From OE-Core rev: a78d2d21fffd646a0d6e0f02a8355be010a7bd28)

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>
2012-12-19 17:54:51 +00:00
Richard Purdie 1e548a7fc7 sstate.bbclass: Improve stamp-extra-info task handling to avoid warnings
If you change a machine to a different package architecture, you will see sstate
errors about overwriting files as the code stands today. Instead it should clean
out the files safely and correctly. This patch changes the naming of stamp-extra-info
manifest files to avoid this problem. It will potentially trigger warnings during
builds in existing TMPDIRs until the system adjusts to the new naming, these are
harmless.

[YOCTO #3521]

(From OE-Core rev: 2cc8ee57f8148844bb7bcd4aaf34f6891cf3d410)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-17 17:24:58 +00:00
Richard Purdie 2636cb1133 sstate.bbclass: Remove unused/uneeded variable
(From OE-Core rev: 33ddf788c04044c8fe7ffbadab8787a5b6603186)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-17 17:24:58 +00:00
Richard Purdie d46766ea5c sstate.bbclass: Simplify overcomplicated cleanall function
The code was written before SSTATETASKNAMES existed. Since it
does exist, lets simply the code.

(From OE-Core rev: 9817e2efdb94395655d711f5eadedcd249c8cffe)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-17 17:24:57 +00:00
Lukas Bulwahn 5cf293b1f9 distutils: Replacing path to native python by path to python in the image to support python packages with console-script setup
When using distutils for a python package based on a python-setuptools
installation script that sets up a console script, the header
of the console script created by setuptools points to the
python-native path.

The console scripts are commonly executed in the image, but not
in the sysroot environment. Therefore, the header of the
console scripts should point to the python interpreter in the
image.

Setuptools does not allow to set the path of the python
interpreter via some command-line argument.
Hence after the installation script ran, the distutils
class replaces the path in the console script files created by
the installation.

(From OE-Core rev: 11229def87d048c51190b9bd275c73d1f8bf6007)

Signed-off-by: Lukas Bulwahn <Lukas.Bulwahn@oss.bmw-carit.de>

sgw - added \ to protect the space.

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-17 17:24:57 +00:00
Martin Jansa c5d7ab6a24 autotools: copy also remove-potcdate.sin from ${STAGING_DATADIR_NATIVE}/gettext/po
* some packages (e.g. uptime, cpu, forecasts, news from meta-efl)
  don't have remove-potcdate.sin in po subdirectory, but Makefile.in.in
  supplied by autotools.bbclass depends on it and fails without like this:
  | make[3]: Entering directory `/OE/shr-core/tmp-eglibc/work/x86_64-oe-linux/uptime/0.0.2+svnr80477-r0.0/E-MODULES-EXTRA/uptime/po'
  | make[3]: *** No rule to make target `remove-potcdate.sin', needed by `remove-potcdate.sed'.  Stop.
  | make[3]: Leaving directory `/OE/shr-core/tmp-eglibc/work/x86_64-oe-linux/uptime/0.0.2+svnr80477-r0.0/E-MODULES-EXTRA/uptime/po'
  | make[2]: *** [uptime.pot] Error 2

(From OE-Core rev: 5a3116638394dc72c54cf5d4f8bd42a7be0b1768)

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>
2012-12-17 17:24:55 +00:00
Mark Hatle 3fa98d1dd3 package_rpm: Workaround for 'all' arch multilib package naming
[YOCTO #3565]

All packages should not be multilib specific, however when the multilib
rules run, they automatically rename the 'all' target recipes.  As such
there is no way to know if an 'all' package should or should not contain
the multilib prefix.  We workaround this issue in the translate function
by checking to see if the runtime-reverse file exists or not.

The workaround should be removed once a proper solution to the architectural
issue is in place.

(From OE-Core rev: ea4b8c73a7f807ccd9aa22dfcf41285145a9dd2e)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-17 17:24:53 +00:00
Mark Hatle 2173ca2fb1 package_rpm.bbclass: Add a simply way to enable RPM debugging
(From OE-Core rev: 08b980da3caafc331fef457a16466eda98139bb4)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-17 17:24:52 +00:00
Mark Hatle 8b671644e1 package_rpm.bbclass: Add additional install error detection
There is a condition where the package will fail to install, but smart does
not capture the error.  Add the error string to the scan list.

(From OE-Core rev: 230068110e1cda349f9bf3886d8d06ac46deea37)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-17 17:24:52 +00:00
Mark Hatle 4a7151b971 package_rpm.bbclass: Add support for incremental installs
(From OE-Core rev: 140750f9c334ba9abb1f5c89fc28ef9b866c605b)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-17 17:24:52 +00:00
Mark Hatle f946417623 package_rpm.bbclass: Add additional logging
(From OE-Core rev: 2a21e63869ec9541dd338df1d86ef2ca01762bfe)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-17 17:24:52 +00:00
Mark Hatle 06afdb8928 package_rpm.bbclass: Fix the way the RPM platform file is generated
When generating an SDK, we need to use either the SDK or TARGET version
of the OS.  They are not interchangable!

(From OE-Core rev: 8f6e33231439c9c2c1584b2790f62f833439e3c1)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-17 17:24:51 +00:00
Mark Hatle a6aa74817c package_rpm: Update the way the multilib package names are translated
The variable MULTILIB_PACKAGE_ARCHS has been removed in favor of a
repurposed MULTILIB_PREFIX_LIST.  The format of this item is now
<libid>:<arch>:<arch1>:...:<archN>.  This ensures that we can correctly
translate the libid to one of the supported archs in a tri-lib system.

All of the users of MULTILIB_PREFIX_LIST and MULTILIB_PACKAGE_ARCHS have
been modified accordingly.

Also change the way attempted packages are installed, verify the package
exists in the translate functions, then perform the install in one single
operation.  This results in a significantly faster install time.

(From OE-Core rev: ffe6cf3a1c57defdbe8531bdeb588e199177bb6c)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-17 17:24:51 +00:00
Paul Eggleton ba08a8ccbf Update sanity tests to use smart instead of zypper
(From OE-Core rev: c56d24b35d94fe2934ac7e1dc67422e6abc7539d)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-17 17:24:51 +00:00
Paul Eggleton 2997a704fc classes/rootfs_rpm: install smart instead of zypper in rpm-based images
Switch over to smart on the target when package-management is enabled.

(From OE-Core rev: 69f258a2422e6a6ae71834dd097ffa00a1784d9e)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-17 17:24:51 +00:00
Paul Eggleton 019ba25654 classes/*_rpm: integrate Smart into RPM filesystem construction
Use Smart to construct the root filesystem for images and the contents
of SDKs rather than the custom scripts around rpm we had previously.
This ensures the result when producing an updated image will be the
same as upgrading to the same package versions from an older image on
the target, as well as allowing us to remove a substantial amount of
code making the rpm classes much easier to follow.

Some bugfixes from Bogdan Marinescu <bogdan.marinescu@intel.com>.
SDK implementation and testing as well as a number of bugfixes from
Mark Hatle <mark.hatle@windriver.com>.

(From OE-Core rev: a726ae7c032fac1aa49ce34180fa2ed2dcaf87d3)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-17 17:24:50 +00:00
Mark Hatle 5ce8c7fe9e populate_sdk_base: Add perl modules as needing to be relocated
The perl module for automake has an embedded path in it, this needs
to be relocated.

(From OE-Core rev: ad79360c1d992830d4f0e06a3bbf0622658c0540)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-14 17:30:44 +00:00
Tom Zanussi 936c460ab8 module.bbclass: make sure do_make_scripts() executes after do_patch()
If do_make_scripts() executes before do_unpack()/do_patch(), the build
fails because it can't cd into the workdir of a recipe using this
class, so make sure do_make_scripts() doesn't run before the package
has been unpacked and patched.

Fixes [YOCTO #3589].

(From OE-Core rev: 824cf145bcb55bb99a717a2dfd73e43e6b3feea4)

Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-14 08:56:31 +00:00
Andrei Gherzan 0231336247 chrpath.bbclass: Normalize rpath only of it doesn't contain ORIGIN variable
If we normalize a rpath which contains ORIGIN variable, the binary will end
up without those rpaths at all. So check first if rpath contains ORIGIN variable
and if not, move on and normalize it.

(From OE-Core rev: 46dc514ff5a3d2693546cf95c5481e0539c43580)

Signed-off-by: Andrei Gherzan <andrei.gherzan@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-14 08:53:41 +00:00
Saul Wold 8669fec353 chrpath: normalize the paths
By normalizing the paths the path comparing code works correct
to generate the right RPATH even when there is a A/../A in TMPDIR

[YOCTO #3408]

(From OE-Core rev: 50327f2bba9f479dd209cdc54646b9d551e84c59)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-13 16:54:31 +00:00
Mark Hatle 1f476dbb22 rootfs_rpm.bbclass: Revert to default shell logging behavior
Remove the set +x, and revert to the normal logging behavior.

(From OE-Core rev: e799d771c9ed9e41a900e2e96c23d4ae35d5fe08)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-13 15:18:46 +00:00
Darren Hart 722430a488 bootimg: Use FAT 32 for images larger than 512MB
Fixes [YOCTO #2138]

Commit 2175842116 dropped the forced use
of FAT32 for the hddimg generation as it broke with very small images
(< 32MB). Unfortunately, left to its own devices, mkdosfs appears to select
FAT16 even for very large images, resulting in 2.2GB images being
generated as FAT16:

$ ls -lah core-image-lsb-sdk-atom-pc-20121010233936.hddimg
-rw-rw-r-- 1 dvhart dvhart 2.2G 2012-10-17 08:00 core-image-lsb-sdk-atom-pc-20121010233936.hddimg

$ file !$
file core-image-lsb-sdk-atom-pc-20121010233936.hddimg
core-image-lsb-sdk-atom-pc-20121010233936.hddimg: x86 boot sector, code offset 0x58, OEM-ID "SYSLINUX", sectors/cluster 128, root entries 512, Media descriptor 0xf8, sectors/FAT 138, heads 64, sectors 4502496 (volumes > 32 MB) , serial number 0x50761926, label: "boot       ", FAT (16 bit)

The result was a runtime boot error from SYSLINUX and a failure to boot
live images greater than 1GB in size.

While strictly speaking it is the cluster count that determines which
FAT size is used, that calculation requires more information than we
have readily available (such as sectors per cluster). If we let mkdosfs
determine sectors per cluster and just set a sane threshold above which
FAT32 is used, we get correct bootable images. With this patch the 2.2GB
core-image-lsb-sdk uses FAT32 and the 21 MB core-image-minimal uses
FAT16, and both boot in qemu successfully:

$ ls -lah tmp/deploy/images/core-image-lsb-sdk-atom-pc-20121212220835.hddimg
-rw-r--r-- 1 dvhart dvhart 2.2G 2012-12-12 14:18 tmp/deploy/images/core-image-lsb-sdk-atom-pc-20121212220835.hddimg

$ file !$
file tmp/deploy/images/core-image-lsb-sdk-atom-pc-20121212220835.hddimg
tmp/deploy/images/core-image-lsb-sdk-atom-pc-20121212220835.hddimg: x86 boot sector, code offset 0x58, OEM-ID "SYSLINUX", sectors/cluster 8, Media descriptor 0xf8, heads 64, sectors 4470304 (volumes > 32 MB) , FAT (32 bit), sectors/FAT 4357, reserved3 0x800000, serial number 0x50c902b7, label: "boot       "

$ ls -lah tmp/deploy/images/core-image-minimal-atom-pc-20121212220600.hddimg
-rw-r--r-- 1 dvhart dvhart 21M 2012-12-12 14:06 tmp/deploy/images/core-image-minimal-atom-pc-20121212220600.hddimg

$ file !$
file tmp/deploy/images/core-image-minimal-atom-pc-20121212220600.hddimg
tmp/deploy/images/core-image-minimal-atom-pc-20121212220600.hddimg: x86 boot sector, code offset 0x58, OEM-ID "SYSLINUX", sectors/cluster 4, root entries 512, sectors 41408 (volumes <=32 MB) , Media descriptor 0xf8, sectors/FAT 41, heads 64, serial number 0x50c8ffec, label: "boot       ", FAT (16 bit)

I have tested and booted core-image-minimal and core-image-lsb-sdk for
atom-pc with qemu-system-i386 using this patch.

(From OE-Core rev: de808c552d445502bd99f78bb8159d21149f87c1)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Cc: Steve Sakoman <steve@sakoman.com>
Cc: Joshua Immanuel <josh@hipro.co.in>
Cc: Przemek Czesnowicz <przemyslawx.czesnowicz@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-13 15:18:46 +00:00
Laurentiu Palcu 0496ba3a9b populate_sdk_(deb|ipk|rpm): export NATIVE_ROOT and INTERCEPT_DIR variables
In order for the postinstall scripts to have access to the recent
improvements when generating the target SDK sysroot, export these
variables in populate_sdk.

(From OE-Core rev: 06151c34f4f4cb669b2f93ebb2f78cfecf698355)

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>
2012-12-13 15:18:43 +00:00