Commit Graph

2999 Commits

Author SHA1 Message Date
Richard Purdie 1808552a86 autotools.bbclass: Factor out aclocal copying function
Some recipes may need to manually call the aclocal copying
functionality so factor this out into a function.

(From OE-Core rev: a5a08543c8cec43d993b2bba0ad6a9357c0a5e04)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-04 11:50:24 +01:00
Jesse Zhang c81ecf96ed sanity.bbclass: make sure python is a full install
Components of the Standard Library should be available. Add a sanity
check for xml.parsers.expat; we might add more in the future.

[YOCTO #4424]

(From OE-Core rev: bb027a332f2f2927a6bcbc4c035b42a012d0579e)

Signed-off-by: Jesse Zhang <sen.zhang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-04 11:43:35 +01:00
Jackie Huang 50fae526de sstate.bbclass: fixup extra hardcoded paths
sstate has a logic to fixup hardcoded paths in scripts,
but it misses in some specific cases, so add
EXTRA_STAGING_FIXMES to the fixup hardcoded paths
mechanism, so that we can specify what hardcoded paths
need to be fixed in a recipe, e.g.
EXTRA_STAGING_FIXMES = "STAGING_BINDIR_TOOLCHAIN"

(From OE-Core rev: 2e840db56c45b4c63fded55f4ed763b7099284b9)

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-04 11:43:35 +01:00
Jonathan Liu 9ba5cedf9a classes/buildhistory: record removals in buildhistory directory
"git add ." does not record files that were removed in the buildhistory
directory. Specify the -A flag to also record removals.

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

(From OE-Core rev: a45a247e2cfa58892a0c9eb050d603a38cd839db)

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

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

(From OE-Core rev: e8d2a2a3646f964ec61ece62e14788cd7184dd01)

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

(From OE-Core rev: b2f2d6a2b166b3c79cc5a0d386ee1dda2d4fa010)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-30 20:59:09 +01:00
Joe Slater 84de4f5b40 cmake.bbclass: modify construction of compiler flags
Use CFLAGS instead of CPPFLAGS for C_FLAGS variants.

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

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

(From OE-Core rev: 558662927be550aeb8dd163f65e16b1750bbd127)

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

(From OE-Core rev: 70b75d506e6c4b46694b00d674df9d4a94140bd6)

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

(From OE-Core rev: b6107abd50da651596c43119001cfc80fdf87554)

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

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

[YOCTO #4531]
[ CQID: WIND00412051 ]

(From OE-Core rev: 9742e866f545bc0d04aca697b541ed88f4e1764a)

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

(From OE-Core rev: 66d09565783186ab14fa77ecdfe2131a44a265ab)

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

(From OE-Core rev: 8375782a295c6294ea4ab889c309bebf873f3489)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-24 14:14:45 +01:00
Tomas Frydrych 32b4a4abd9 clutter.bbclass: removed unused function
Clutter and cogl no longer use --with-fpu configure option, so we no longer
require the get_fpu_settings() function.

(From OE-Core rev: ea59330c48cdb7d7106deea3f19c043ba60c23e4)

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

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

(From OE-Core rev: 37beb7bdab78de5253a894f35afafa34c13a00f5)

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

(From OE-Core rev: 7cbde5d8f2b88ec4e79cb0d564ee0f3c9baa7c2d)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-24 14:14:38 +01:00
Richard Purdie 56a2b28724 sanity.bbclass: Drop dubious print
(From OE-Core rev: be4cd4614a2a702130d18e9d082fd83a15faa013)

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

(From OE-Core rev: 835b64d4e9ed7b627b56a75d529f1a403c5db1a8)

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

[YOCTO #4262]

(From OE-Core rev: 99175cabc3936733dd92fac5ebc6f865b864fe92)

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

(From OE-Core rev: 9b64b68c93c71c503ef26fa440b974b82438dc88)

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

(From OE-Core rev: 72579e1fe49e8bc66c9f5850a2c679ce8941c85d)

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

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

[YOCTO #4391]

(From OE-Core rev: b3e2e405c53d63bc71872d41f455507be833e7eb)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-21 00:18:42 +01:00
Zongchun Yu 360bfe943a toolchain-scripts.bbclass:Add CROSS_COMPILE variable to environment-setup file
when compiling the linux kernel manually. users need to set CROSS_COMPILE separately.
adding the CROSS_COMPILE variable will be nice for using.

(From OE-Core rev: b66ec45e5dd9418a6568c04ef30854531a4b66f3)

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

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

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

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

The "raise e" should be removed.

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

  insane.bbclass
  package.bbclass
  package_rpm.bbclass

[YOCTO #4461]

(From OE-Core rev: 4c47525c5a171b1282615c9fbc7d84addef85f92)

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

(From OE-Core rev: 94c83fa26af104d28aa4e6951bcb109bb0c82265)

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

[YOCTO #4438]

(From OE-Core rev: 17e7ac0c5e75245d17a90e5cc49ade3d18a168ba)

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

Fixes parsing errors like

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

(From OE-Core rev: f9f1397d688cc4eb8d736066b1280bee40a8916a)

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

(From OE-Core rev: a015881f2207aded601459ba3eebbefb0002b3c5)

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

(From OE-Core rev: cf5e40598ae9a83f22cabedc7b72000beb62703c)

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

IMAGE_FSTYPES += "live vmdk"

Would not generate the iso.

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

(From OE-Core rev: c5c1517726aa103a3cdb60abda95e28997cac7c4)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-12 09:37:32 +01:00
Paul Eggleton 1810369f77 classes/core-image: drop apps-console-core IMAGE_FEATURES support
Remove the legacy support for the apps-console-core IMAGE_FEATURES item;
we've kept this for a while but it's time for it to go.

(From OE-Core rev: bcd5ed8dd0e80cb76415cd2be9686d4e8023421d)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-12 09:37:31 +01:00
Paul Eggleton d63c8a1597 classes/image: show an error on invalid IMAGE_FEATURES
If the user specifies an invalid feature in IMAGE_FEATURES, show an
error during parsing. Valid IMAGE_FEATURES are drawn from
PACKAGE_GROUP_ definitions, COMPLEMENTARY_GLOBS and a new 'validitems'
varflag on IMAGE_FEATURES (so that additional non-package group features
can be added elsewhere.)

Implements [YOCTO #3308].

(From OE-Core rev: 8d25442ab795ff0f8e072da2022108eff128e2b2)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-12 09:37:31 +01:00
Jonathan Liu 00aa0b315b image-vmdk: Fix error recreating symbolic link
If the vmdk image symbolic link already exists from a previous build,
overwrite it instead of returning an error.

(From OE-Core rev: bcfb5a783dc94fe38539a19f4f7de249ce2391c1)

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

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

(From OE-Core rev: 95b7cafafcaa4dda7328632475003f5778ab95bd)

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

Implements [YOCTO #4288].

(From OE-Core rev: c331f0a5cac765174a1b5de5c12aec7e965d4158)

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

Implements [YOCTO #4154].

(From OE-Core rev: ed6bb6e3db518082d3a9c45d548bc1339be2c5ca)

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

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

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

(From OE-Core rev: 45c7dab5d51065c7b24ab5292f8e9d3104eb0626)

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

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

(From OE-Core rev: 799c16ed317aed7638e264ee2f92e4b722f1b011)

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

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 22:28:04 +01:00
Richard Purdie 566628d8cd class/lib: Fix up various file access methods
There are various bits of cruft that have built up around our file accesses. This patch
cleans some of them up, specifically:

 * Remove pointless "from __builtin__ import file"
 * Use open(), not file()
 * Wrap file usage in a with container to ensure files are closed
 * Add missing .close() calls in some cases

(From OE-Core rev: a43e0a8ecd0441131e929daf998c3cd454d9c8f3)

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

(From OE-Core rev: 4808629faa1222b31f92a3e410e06adb8e081293)

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

(From OE-Core rev: 402d652edf79bcfe1eaf1a3b55ad1177d1e3ee85)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 22:28:03 +01:00
Richard Purdie b54339d633 classes/lib: Fix getcmdstatus breakage
I mistakenly thought subprocess had getcmdstatus in python 2. It doesn't so lets
add a wrapper and have this work in both worlds.

(From OE-Core rev: 2253e9f12734c6e6aa489942b5e4628eca1fa29d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 16:05:08 +01:00
Richard Purdie 8aa498d895 base.bbclass: Drop unused/obsolete import
(From OE-Core rev: e501a98e87b8854040ac4081326871d7d6397917)

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

(From OE-Core rev: 3dff13793e875ff58cc38c4a960caca9b6969843)

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

(From OE-Core rev: e2e1dcd74bc45381baccf507c0309dd792229afe)

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

(From OE-Core rev: 4f47b3a4726dd47e8a6db228fcaf25d1890e3e52)

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

(From OE-Core rev: 754874e68d1037c76fc4cc7d35d3fa12946d00f8)

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

(From OE-Core rev: dde7af5f6c769eae721b1ee18462b841c8ea3277)

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

(From OE-Core rev: b2d10f15db23246e3957b69d77433f87674928bb)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 14:06:51 +01:00
Richard Purdie c3d18afaa5 classes/recipes/lib: Fix various python whitespace issues
There are some left over tab characters in the python functions. This
removes them and resolves python 3 errors.

(From OE-Core rev: fafeb381c48291fa65c634c01c244843c8d7fad3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 14:06:51 +01:00
Richard Purdie db8217f6b8 classes: Use modern exception raising syntax
Modern expection rasing syntax is function call format, convert to this
to keep python 3 happy and model correct coding style in the core.

(From OE-Core rev: f4b382754603d3f1caa13824bcc8d06b568bbc59)

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

(From OE-Core rev: ec74285bd2108f12f33fc8ac0dc1d124ab48be21)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 14:06:50 +01:00
Richard Purdie 2ac4f8b397 clases/lib: Use modern exception syntax
Update older code to use modern exception handling syntax which
is the form accepted by python 3.

(From OE-Core rev: b010501cd089e649a68f683be0cf4d0aac90fbe3)

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

(From OE-Core rev: 9843ad9d783f68b97fedfe5b435528538bb26c1c)

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

(From OE-Core rev: 2400a74923e51e17ecfa94c2d63908b0b2aac76a)

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

(From OE-Core rev: d3ad9a4c573fec08b5606a4c3e86f93cb95e8718)

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

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

[YOCTO #4310]

(From OE-Core rev: cd90be31571178d6822dba5a94a2795209a3576c)

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

(From OE-Core rev: 6e57a3231fb29f869d476b8511d6f4393f82651b)

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

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

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

(From OE-Core rev: 8505008c115efb54d18e5f25441c7a938a32ffaf)

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

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

Implements [YOCTO #4228].

(From OE-Core rev: 4e39c1b9dbba1d2b07ffc2c6a1a252fc8f7680ee)

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

Signed-off-by: Jessica Zhang <jessica.zhang@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-02 17:41:55 +01:00
Robert Yang c51e8b4532 sstate.bbclass: make hard links for staging files
Make hard links for staging files instead of copy to save the disk space
(3G will be saved for a core-image-sato build), and it doesn't affect
much on the build time.

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

[YOCTO #4372]

(From OE-Core rev: 5853e0f482b22258c909268fe71673a29e31989b)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-02 17:41:53 +01:00
Laurentiu Palcu 4a3d4b8d7a Pass the mlprefix to postinst_intercept script
This is needed in order to have separate multilib intercept hooks.

(From OE-Core rev: 44eae13c164ca6e15a6013eafeab3eb44f24c8e0)

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

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

(From OE-Core rev: 15408466515cec7cbb4c394aa203c87b6165f884)

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

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

(From OE-Core rev: f6244a9d3da7c301f19efc114c2aaf39e5eec299)

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

(From OE-Core rev: d8c4f442c41bf3ac5e064630657cd3fa1b5c43b1)

Signed-off-by: Phil Blundell <philb@gnu.org>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-29 14:45:06 +01:00
Phil Blundell 5652086c75 kernel-arch: Always use ld.bfd to link the kernel
The kernel's penchant for custom linker scripts means that it doesn't
generally get on very well with gold.  Make sure we are using the BFD
linker here no matter what the distro default is set to.

(From OE-Core rev: 5c8277610ae84740e0724b27f10dba3895d40c05)

Signed-off-by: Phil Blundell <philb@gnu.org>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-28 12:12:21 +01:00
Christopher Larson 824962fcf2 package.bbclass: ensure license excluded files aren't packaged
An excluded package left its files behind, which meant they could end up in
another package instead, meaning we could ship GPLv3 binaries even with GPLv3
in INCOMPATIBLE_LICENSE. Skip the files belonging to the excluded packages to
prevent this from occurring.

(From OE-Core rev: c045bfe6b991006ac80f0e2d06a8917ae58d9262)

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

(From OE-Core rev: b9b187f8a0f513e676cd3d18f71d1055445f29fa)

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

(From OE-Core rev: 82dae98d0eb771c05e57635f0f8763b118d8177e)

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

(From OE-Core rev: b396138ee081c8f5dddbaab0e374787ba2e31029)

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

(From OE-Core rev: 2cd244d6c93ec6d39e2649de64575c365bd4238d)

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

(From OE-Core rev: 9553874cf02ba443aff1bbead56bacfcda9bb6ca)

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

(From OE-Core rev: 540cf355599e555615ed9684c3b480463588eb78)

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

(From OE-Core rev: 805add18e7b917aaef61c82c0b5f2e9682af1d0d)

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

(From OE-Core rev: b10d17d1b03fd0564103a6998f218d0968d1032b)

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

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

(From OE-Core rev: c72ec4b52827f75351790eab483d258b2e87611a)

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

(From OE-Core rev: 138c5f3af892e33f576fc7dd268e122b179f82a1)

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

(From OE-Core rev: 1fa8909e24866ffada75daf63225c8daa000b9be)

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

[YOCTO #4293]

(From OE-Core rev: 1392f959cb8cd50b5a4492899e54f3ed68ef56d7)

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

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

[YOCTO #3453]

(From OE-Core rev: 1a1927f8a04fe0a2b3b853ebdd33ccb807f00b59)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-13 23:49:28 +01:00
Paul Eggleton db61a66dba classes/sanity: fix handling of bblayers.conf updating
Fix the fairly long-standing problem of treating a newer bblayers.conf
in the same manner as an older one (reporting that it had been updated
even if nothing was done). The recent work to do a reparse without
having to manually re-run bitbake turned this from an annoyance into an
endless loop, so it had to be fixed.

As part of fixing this the following changes have been made:
* Extensions are now implemented using a function list, so distro layers
  can add their own functions which should either succeed (indicating
  they have successfully updated the file) or raise an exception
  (indicating nothing could be done). The functions are called in
  succession until one succeeds, at which point we reparse.
* If we can't do the update, the error message now says "older/newer"
  instead of just "older" since we only know the version is different.

(From OE-Core rev: 46b00fdfc9d1e3dc180de087bae2682a1baa2954)

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

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

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

(From OE-Core rev: 3f501204f375cc40a14597a25cb09faaba9ff802)

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

(From OE-Core rev: abb5bd9f2d3583808b61a0832378e4db45022be6)

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

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

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

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

[YOCTO #4050]

(From OE-Core rev: cf53c606fc1bc81abb68b6851ae68916f92e1d84)

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

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

Disable ptest for native packages.

Don't emit errors on missing _ptest functions.

(From OE-Core rev: 01bea4ef932e46eb2fcc8b4be7ff5e2b5b2a0978)

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

KERNEL_IMAGE_STRIP_EXTRA_SECTIONS = ".comment .unwanted"

The kernel output is stripped in place.

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

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

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

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

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

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

[YOCTO 3515]

(From OE-Core rev: 5f6d33b05b4e7883f2728ca812cb5386d1e36989)

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

(From OE-Core rev: 48e8b613b3f5c7b1d917bf3147606d44072ce49e)

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

[ YOCTO #3960 ]

(From OE-Core rev: b016bc9aaabc90fe4dc98af8c5e73dfcb4526ef4)

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

(From OE-Core rev: e2915b6e1d2088d3a791bf629dabc58f38940961)

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

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

[ YOCTO #4213 ]

(From OE-Core rev: 319ef0df4ae7ed0372eff90e11244123eccb023c)

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

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

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

(From OE-Core rev: 8ceef74dd4f662b4c7e3c170ce486e966ebebeff)

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

(From OE-Core rev: a751e9042dfffcc5c4701634a1f1f598012d609c)

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

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

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

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

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

[YOCTO #3514]

(From OE-Core rev: f0b19ddce3c92c5d06976cf73d4c4c480e053dff)

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

(From OE-Core rev: 0bdde53e885aae3506c7b070b6e21f64a7cd4115)

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

(From OE-Core rev: 0c60d3b04eb77629abc3bbc2a6d8a2b8f0a44309)

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

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

fails with:

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

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

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

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

[YOCTO #4179]

(From OE-Core rev: 78f91e08c8a7b0f0c831a087f7c89e2c76047e7a)

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

(From OE-Core rev: 225e7826b0d082f43db82201e826b98b3a95cd57)

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

(From OE-Core rev: 0bc22ed6bd67031749e8f2cb5415dabf933eef56)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-04 14:04:41 +01:00
Paul Eggleton c7f52855f9 classes/sstate: avoid traceback when no files have been staged
If no files have been staged we want to continue without error instead
of showing a traceback.

Fixes [YOCTO #4056].

(From OE-Core rev: ca36be708e54c0c86535bc8512295c76c48f6cf5)

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

[YOCTO #4080]

(From OE-Core rev: 6f86fe5d66e401377bccd9f635270033b99a9f4b)

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

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

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

[YOCTO #4032]

(From OE-Core rev: 0c80286a3383b436a0a63a0b00eb357dd9dea4fb)

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

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

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

MYVAR = "foo"

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

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

(From OE-Core rev: 1416613e94af46c6e74532bca0f026d1540becbb)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-03 17:01:12 +01:00
Martin Jansa c0910f26ea update-rc.d, systemd: redirect also stderr from type
* different shells different behavior?
  bash prints 'type: update-rc.d: not found' on stderr
  busybox's sh on stdout

(From OE-Core rev: 45e22312c48b23480bd6dff98702b0691a48f7d1)

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

(From OE-Core rev: 7e437aa3e0ec862aac69a4434be0b2b652d26972)

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

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

(From OE-Core rev: b1a085db9d8ad2a3117af6f50e510bc9c2f9407b)

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

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

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

[YOCTO #4145]

(From OE-Core rev: 0c389f41d7ea0697a5468c73cce295a2fa64e9e0)

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

(From OE-Core rev: 108bae276fe7e462378073207a3bdca7326f8e57)

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

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

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

(From OE-Core rev: d915e2e084257830c43f7f21af3aec24b7e1a211)

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

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

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

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

Relates to [YOCTO #3041].

(From OE-Core rev: 2179db89436d719635f858c87d1e098696bead2a)

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

(From OE-Core rev: 056490ddbfdbb6cc6fa0d8ff8716d64819d6b16c)

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

[YOCTO #3374]

(From OE-Core rev: e6ffc747a8ca5142c9bc6fbd2b06b5808bb38b02)

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

(From OE-Core rev: 8be32b8f30f63691f6b7a9592361b0975c6f8d7a)

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

(From OE-Core rev: cf43320c343437659aee94acd005bf7712f273cd)

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

(From OE-Core rev: ac00e56cb9daacef17a6fdebe7b8ca1667b7e1c4)

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

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

(From OE-Core rev: a3856ab19f1d4ae312f559521785ad4384700729)

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

(From OE-Core rev: 4d56de8018d550b3d181d451900cbfb698d64141)

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

(From OE-Core rev: 827106a57ca88760a19f9309d859b500c5c4fe97)

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

(From OE-Core rev: 553a8010e81448629a94ab04fd989e6e49066f2b)

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

(From OE-Core rev: 48dfd61901ce07491ef913cf04dbd9de9a52759f)

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

[YOCTO #4089]

(From OE-Core rev: 262a69ffd33e9d001a7a15fc73671a015e3b5dd1)

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

(From OE-Core rev: 9a414a57ad69a426a8d8a2970c42ca7427240615)

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

Fixes [YOCTO #3251].

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

(From OE-Core rev: c257f292bf75061647e380889487c7e2625592de)

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

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

Implements [YOCTO #3964].

(From OE-Core rev: c3736064483d4840e38cb1b8c13d2dd3a26b36aa)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-23 11:41:13 +00:00
Zhenhua Luo 5b5e03838d fix march sanity check issue
1. check if gcc_test is really generate before os.remove("gcc_test") to avoid
   following error:
      ERROR: Execution of event handler 'check_sanity_eventhandler' failed
      Traceback (most recent call last):
      File "check_sanity_eventhandler(e)", line 4, in check_sanity_eventhandler(e=<bb.event.ConfigParsed object at 0x3151450>)
      File "sanity.bbclass", line 107, in check_sanity(sanity_data=<bb.data_smart.DataSmart object at 0x11ba110>)
      File "sanity.bbclass", line 22, in check_gcc_march(sanity_data=<bb.data_smart.DataSmart object at 0x11ba110>)
      OSError: [Errno 2] No such file or directory: 'gcc_test'
2. set result to False when build failed with -march=native to ensure
   -march=native is appended to BUILD_CFLAGS  when host gcc really supports this flag,
   otherwise following error appears when build native packages.
      | cap_text.c:1: error: bad value (native) for -march= switch
      | cap_text.c:1: error: bad value (native) for -mtune= switch

(From OE-Core rev: 4a4228fe250c8b23a5deeb25825d61c6e84a47a2)

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

(From OE-Core rev: 0fdda5840452c7715ed775d5d18d9f850396f483)

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

(From OE-Core rev: e9485c7077e5a9508371bbbbebdaaf1e9685da61)

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

(From OE-Core rev: bc830ab3f6e9704c830e934c6f39c85ef11f867d)

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

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

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

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

You can see the screen shots attached to the bugzilla.

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

[ YOCTO #3944 ]

(From OE-Core rev: 7032d559c04bae09e6b7c39ddeb1bf35acc0584c)

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

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

(From OE-Core rev: 556dee0c4d6d8a87c0cddbd2f60fe5917d009f18)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-18 21:26:40 +00:00
Andreas Oberritter a3409b909d image_types.bbclass: only create links if the target exists
When creating images containing many partitions, rootfs.$type
may not be available.

(From OE-Core rev: cf8e9d8942fdddaac21fca46137120da959c814c)

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

(From OE-Core rev: dc175a20d3a269c08691d92ecf13afff8c1340dd)

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

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

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

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

(From OE-Core rev: fd5d80ab1a405cb4ef94f2cde25f8c251da490f0)

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

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

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

[YOCTO #3675]

(From OE-Core rev: 6c930c3c06f2e698540626c87bd7f7f571df35ef)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-18 13:18:21 +00:00
Kevin Strasser 52026492c6 archiver: fix archive filtering behavior
With the addition of sstate, ensure that archiving tasks are only
added to the build if they produce output in the directory specified
by the 'sstate-inputdirs' flag.

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

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

(From OE-Core rev: 392562a21d9f2deb6fe6f8bb5378b09f4c5918d4)

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

Only attempt to archive scripts and logs when explicitly enabled.

(From OE-Core rev: 7f1f3e6b6db9a50f5e68bc8dff95549e692153b1)

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

(From OE-Core rev: 919613c0e75362ee0eace99b51cc77d34a05372f)

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

(From OE-Core rev: 239a43fc4037bfe941bb60dd077ee477de177b7c)

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

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

(From OE-Core rev: 0f8447a7d99d2645b932eac1c24149f0c2d3791e)

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

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

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

(From OE-Core rev: f46cf86d0ec3b80ce526b4dad1b1eac5995969ec)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-15 01:53:05 +00:00
Martin Jansa 92281f9998 package.bbclass: add debug-without-src PACKAGE_DEBUG_SPLIT_STYLE
* same as original and default version, but does not package source files in PN-dbg

(From OE-Core rev: 3c8452c3abae74a42989c0fbd5ba303788528750)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-15 01:53:03 +00:00
Richard Purdie 7803f5f98c package_rpm: Ensure package dependencies have correct version numbers
If a recipe has versioned dependencies on another package within
the same recipe, there are potentially races where the version
remapping may not happen correctly.

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

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

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

(From OE-Core rev: bd03014c8fd080e04dd0a96a6b4b9211568c1cf1)

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

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

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

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

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

do_rootfs[vardepsexclude] += "BUILDNAME"

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

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

do_rootfs -> rootfs_xxx_do_rootfs -> BUILDNAME

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

[YOCTO #3299]

(From OE-Core rev: 9d039f482c84dde264564fde93f39764113cc0d3)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-12 18:33:27 +00:00
Ross Burton 0aad8decf0 base.bbclass: don't backfill features that already exist
It's too easy to cause rebuilds because the DISTRO_FEATURES have changed in
meaningless ways (such as re-ordering or duplicate items).  Help stop this by
checking if the feature to be back-filled is already present.

(From OE-Core rev: 63c7192119d54b92d908441109ed4e4fff761cba)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-10 04:36:52 +00:00
Constantin Musca 9d076dcba1 package_deb.bbclass: set DPKG_ARCH_arm to "armel"
- the system should be using "armel" by default, not "arm"

[YOCTO #3741]

(From OE-Core rev: 74c671a609172a3801e53fe93e2853c4f0eb93b1)

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

[YOCTO #3406]

(From OE-Core rev: 05182ee354a9f773c8ab2f4cd7f1fdf552e7fcda)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-07 11:20:02 +00:00
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