]> code.ossystems Code Review - openembedded-core.git/log
openembedded-core.git
8 years agooeqa/sdk/cases: Migrate tests to the new OEQA framework
Aníbal Limón [Sun, 27 Nov 2016 23:51:53 +0000 (17:51 -0600)]
oeqa/sdk/cases: Migrate tests to the new OEQA framework

Summary of the changes:

- Remove auto extend_path using pkgutil at __init__, is not needed.
- Change base class to OESDKTestCase.
- Add td_vars attr to set dependencies of certain variables in test
data.
- Change skips from module level to class level because Test context
  (tc)
now isn't at module level.
- Variable names changes to be consistent (i.e. sdktestdir ->
  sdk_dir).

[YOCTO #10599]

- Don't use bb.utils functions use instead remove_safe and shutil
  for copy files.
- SDKBuildProject pass test data variables instead of call getVar
  inside.

[YOCTO #10231]

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
8 years agooeqa/utils: {Target,SDK,}BuildProject remove dependency of bb
Aníbal Limón [Wed, 2 Nov 2016 19:42:01 +0000 (13:42 -0600)]
oeqa/utils: {Target,SDK,}BuildProject remove dependency of bb

Don't use bitbake references inside utils modules, in order todo
that changes getVar calls for arguments in the __init__ method like
dl_dir for all the classes and testlogdir, builddatetime in
SDKBUildProject.

Also don't export proxies inside _download_archive method, a good
practice is to setup the proxies at init of the process instead of
do it in this helper module.

[YOCTO #10231]
[YOCTO #10599]

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
8 years agooeqa/utils: Move targetbuild to buildproject module
Aníbal Limón [Wed, 2 Nov 2016 19:04:28 +0000 (13:04 -0600)]
oeqa/utils: Move targetbuild to buildproject module

The new buildproject module will contain only BuildProject class
a helper class for build source code.

The remaining classes TargetBuildProject and SDKBuildProject was
move to runtime and sdk respectively.

[YOCTO #10599]

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
8 years agoclasses/testsdk: Migrates testsdk.bbclass to use new OESDKTestContext
Aníbal Limón [Wed, 30 Nov 2016 16:56:09 +0000 (10:56 -0600)]
classes/testsdk: Migrates testsdk.bbclass to use new OESDKTestContext

The functionality provided is the same with imporvements on code
reuse and better interfaces.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
8 years agooeqa/sdk: Add case and context modules for the SDK component
Aníbal Limón [Mon, 31 Oct 2016 23:24:25 +0000 (17:24 -0600)]
oeqa/sdk: Add case and context modules for the SDK component

Adds case and context modules for SDK based on oetest.py old code.

Enables SDK Test component usage with oe-test, the SDK Test component
adds command line options for specify sdk installed dir, sdk environment
and target/hosts maniftest.

[YOCTO #10599]

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
8 years agooeqa/{runtime,sdk}/files: Move testsdkmakefile from runtime to sdk module
Aníbal Limón [Wed, 9 Nov 2016 21:03:52 +0000 (15:03 -0600)]
oeqa/{runtime,sdk}/files: Move testsdkmakefile from runtime to sdk module

It doesn't make sense to have files related to sdk module into runtime
module.

[YOCTO #10599]

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
8 years agooeqa/sdk: Move test cases inside cases directory
Aníbal Limón [Mon, 31 Oct 2016 23:20:48 +0000 (17:20 -0600)]
oeqa/sdk: Move test cases inside cases directory

For match with the new structure of the OEQA framework.

In the new framework Test component base directory in this case
sdk module will contain case and context implementations.

[YOCTO #10599]

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
8 years agooeqa: Move common files to oeqa/files instead of runtime only
Aníbal Limón [Wed, 9 Nov 2016 20:57:40 +0000 (14:57 -0600)]
oeqa: Move common files to oeqa/files instead of runtime only

Those files are used by runtime and sdk test cases, so move to
base directory of oeqa module.

[YOCTO #10599]

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
8 years agooeqa/utils/__init__.py: Adds compatibility with bitbake logger
Mariano Lopez [Wed, 21 Dec 2016 13:14:00 +0000 (13:14 +0000)]
oeqa/utils/__init__.py: Adds compatibility with bitbake logger

The bitbake logger changes the way debug is logged and adds
different levels within debug, this is passed as argument
to the function and breaks compatibility with vanilla loggers.

This implements a way to handle this adding a new function for
debug, that will dispatch the correct logging method signature.

Also overrides info method to use logging.INFO + 1 in order to
see plain data.

Also this commit fix the issue of not showing the test summary
and results when running from bitbake.

[YOCTO #10686]

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
8 years agoclasses/populate_sdk_base: Add write_sdk_test_data to postprocess
Aníbal Limón [Fri, 25 Nov 2016 18:30:12 +0000 (12:30 -0600)]
classes/populate_sdk_base: Add write_sdk_test_data to postprocess

This function will generates testdata.json per SDK type.

[YOCTO #10231]

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
8 years agoclasses/rootfs-postcommands: Add write_image_test_data
Aníbal Limón [Fri, 25 Nov 2016 17:37:06 +0000 (11:37 -0600)]
classes/rootfs-postcommands: Add write_image_test_data

This function will generates testdata.json by image type.

[YOCTO #10231]

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
8 years agooe/data: Add export2json function
Aníbal Limón [Fri, 25 Nov 2016 17:36:06 +0000 (11:36 -0600)]
oe/data: Add export2json function

The export2json function export the variables contained in
the data store to JSON format, the main usage for now will be
to provide test data to QA framework.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
8 years agooeqa/core: Add README
Aníbal Limón [Wed, 9 Nov 2016 18:03:01 +0000 (12:03 -0600)]
oeqa/core: Add README

The README has an introduction and explains how to run the test suite
and creates a new Test component.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
8 years agooeqa/core/cases: Add example test cases
Aníbal Limón [Wed, 9 Nov 2016 17:57:54 +0000 (11:57 -0600)]
oeqa/core/cases: Add example test cases

Serves as an first input of how to the OEQA framework works.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
8 years agooeqa/core/context: Add support of OETestContextExecutor
Aníbal Limón [Wed, 9 Nov 2016 17:50:46 +0000 (11:50 -0600)]
oeqa/core/context: Add support of OETestContextExecutor

The OETestContextExecutor class supports to use oe-test for run core
test component also is a base class for the other test components
(runtime, sdk, selftest).

Te principal functionality is to support cmdline parsing and execution
of OETestContext, the test components could extend the common options
to provide specific ones. The common options between test components
are test data file, output log and test cases path's to scan.

Also it initializes the logger to be passed to the whole OEQA framework.

[YOCTO #10230]

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
8 years agoscripts/oe-test: Add new oe-test script
Aníbal Limón [Mon, 31 Oct 2016 20:42:30 +0000 (14:42 -0600)]
scripts/oe-test: Add new oe-test script

The new oe-test script will be use to run test components with
one single script.

The oe-test script search for test components inside meta/lib/oeqa,
the test components needs to implement OETestContextExecutor inside
context module in order to be supported by oe-test.

[YOCTO #10230]

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
8 years agooeqa/core: Add tests for the OEQA framework
Mariano Lopez [Wed, 9 Nov 2016 17:26:59 +0000 (11:26 -0600)]
oeqa/core: Add tests for the OEQA framework

This test suite covers the current functionality for the OEQA
framework.

For run certain test suite,

$ cd meta/lib/oeqa/core/tests
$ ./test_data.py

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
8 years agooeqa/core/decorator: Add support for OETestDataDepends and skipIfDataVar
Aníbal Limón [Wed, 9 Nov 2016 17:24:57 +0000 (11:24 -0600)]
oeqa/core/decorator: Add support for OETestDataDepends and skipIfDataVar

The OETestDataDepends decorator skips a test case if a variable
isn't into test data (d).

The skipIfDataVar decorator skips a test case if a variable
has certain value.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
8 years agooeqa/core/decorator: Add support for OETimeout decorator
Mariano Lopez [Wed, 9 Nov 2016 17:19:07 +0000 (11:19 -0600)]
oeqa/core/decorator: Add support for OETimeout decorator

The OETimeout provides support for specify certain timeout
in seconds for a test case, if the timeout is reach the SIGALRM
is sent and an exception is raised to notify the timeout.

[YOCTO #10235]

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
8 years agooeqa/core/decorator: Add support for OETestID and OETestTag
Mariano Lopez [Wed, 9 Nov 2016 17:14:23 +0000 (11:14 -0600)]
oeqa/core/decorator: Add support for OETestID and OETestTag

These two decorators stores certain TAG or ID for the test case
also provides support for filtering in loading step.

[YOCTO #10236]

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
8 years agooeqa/core/decorator: Add support for OETestDepends
Aníbal Limón [Wed, 9 Nov 2016 17:09:07 +0000 (11:09 -0600)]
oeqa/core/decorator: Add support for OETestDepends

The OETestDepends decorator could be used over test cases to
define some dependency between them.

At loading time sorting the tests to grauntee that a test case
executes before also raise an exception if found a circular
dependency between test cases.

At before test case run reviews if the dependency if meet, in the
case of don't it skips the test case run.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
8 years agooeqa/core: Add loader, context and decorator modules
Aníbal Limón [Wed, 9 Nov 2016 16:38:37 +0000 (10:38 -0600)]
oeqa/core: Add loader, context and decorator modules

loader: Implements OETestLoader handling OETestDecorator
and filtering support when load tests. The OETestLoader is
responsible to set custom methods, attrs of the OEQA
frameowork.

[YOCTO #10231]
[YOCTO #10317]
[YOCTO #10353]

decorator: Add base class OETestDecorator to provide a common
way to define decorators to be used over OETestCase's, every
decorator has a method to be called when loading tests and
before test execution starts. Special decorators could be
implemented for filter tests on loading phase.

context: Provides HIGH level API for loadTests and runTests
of certain test component (i.e. runtime, sdk, selftest).

[YOCTO #10230]

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
8 years agooeqa/core: Add utils module for OEQA framework
Mariano Lopez [Wed, 9 Nov 2016 16:33:42 +0000 (10:33 -0600)]
oeqa/core: Add utils module for OEQA framework

misc: Functions for transform object to other types.
path: Functions for path handling.
test: Functions for operations related to test cases and suites.

[YOCTO #10232]

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
8 years agooeqa/core: Add base OEQA framework
Aníbal Limón [Tue, 8 Nov 2016 23:57:43 +0000 (17:57 -0600)]
oeqa/core: Add base OEQA framework

case: Defines OETestCase base class that provides custom
    methods/attrs defined by the framework.
    Every OETestCase instance contains a reference to the test
    data (d), the test context (tc) and the logger.
    Also implements _oe{SetUp,TearDown}Class for make special
    handling of OEQA decorators and validations.

runner: Defines OETestRunner/OETestResult with support for RAW
    and XML result logs.

exception: Custom exceptions related to the OEQA framework based
    on class OEQAException.

[YOCTO #10230]
[YOCTO #10233]

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
8 years agowic: bootimg-pcbios: use wic-tools target
Ed Bartosh [Thu, 19 Jan 2017 13:53:46 +0000 (15:53 +0200)]
wic: bootimg-pcbios: use wic-tools target

Used wic-tools target to get location of syslinux.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
8 years agowic: rebuild wic-tools if its sysroot doesn't exist
Ed Bartosh [Thu, 19 Jan 2017 14:01:34 +0000 (16:01 +0200)]
wic: rebuild wic-tools if its sysroot doesn't exist

Rebuild wic-tools if its native sysroot doesn't exist to ensure
that all required tools are available.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
8 years agowic: misc.py: add parameter 'cache' to get_bitbake_vars
Ed Bartosh [Thu, 19 Jan 2017 14:18:28 +0000 (16:18 +0200)]
wic: misc.py: add parameter 'cache' to get_bitbake_vars

This parameter will be used to allow or prevent variable caching.

For example, we don't want to cache value of RECIPE_SYSROOT_NATIVE
wic-tools variable as we may decide to rebuild wic-tools.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
8 years agoselftest: fixed 3 wic test cases
Ed Bartosh [Wed, 18 Jan 2017 17:32:16 +0000 (19:32 +0200)]
selftest: fixed 3 wic test cases

Fixed test_systemd_bootdisk, test_wic_image_type and test_qemu
test cases by building core-image-minimal with correct configuration.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
8 years agoselftest: wic: don't set WKS_FILE
Ed Bartosh [Wed, 18 Jan 2017 17:24:27 +0000 (19:24 +0200)]
selftest: wic: don't set WKS_FILE

Setting WKS_FILE variable should be done only when
wic image is expected to be built by bitbake.
If it's set for all images it breaks image building in
some cases.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
8 years agowic: fixed test_iso_image test case
Ed Bartosh [Wed, 18 Jan 2017 17:21:17 +0000 (19:21 +0200)]
wic: fixed test_iso_image test case

Fixed isoimage-isohybrid plulgin and correspondent wic tet case:
- used wic-tools target when getting varlue of STAGING_LIBDIR variable
- ensured that image is built with efi and hddimg enabled

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
8 years agowic: fixed recipe name
Ed Bartosh [Wed, 18 Jan 2017 17:17:34 +0000 (19:17 +0200)]
wic: fixed recipe name

Renamed grub-efi-native -> grub-efi in NATIVE_RECIPES
dictionary as '-native' suffix is added to the recipe name in
the code.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
8 years agopartition.py: use FAKEROOTCMD variable to get path to pseudo
Ed Bartosh [Mon, 16 Jan 2017 20:58:14 +0000 (22:58 +0200)]
partition.py: use FAKEROOTCMD variable to get path to pseudo

wic used native sysroot to get path to pseudo utility.
This approach doesn't work with recipe specific sysroots.

Using FAKEROOTCMD should fix the issue.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
8 years agoimage.bbclass: put .env files to ${STAGING_DIR}/imgdata/
Ed Bartosh [Mon, 16 Jan 2017 20:53:46 +0000 (22:53 +0200)]
image.bbclass: put .env files to ${STAGING_DIR}/imgdata/

As STAGING_DIR_TARGET started to point to a recipe specific
sysroot wic is not able to add .env files when .wks file refers
to multiple rootfs recipes.

Used STAGING_DIR instead of STAGING_DIR_TARGET to make the
directory with .env files the same for all recipes.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
8 years agoimage_types: add RECIPE_SYSROOT_NATIVE to WICVARS
Ed Bartosh [Mon, 16 Jan 2017 20:49:46 +0000 (22:49 +0200)]
image_types: add RECIPE_SYSROOT_NATIVE to WICVARS

Added RECIPE_SYSROOT_NATIVE to the WICVARS for wic
to be able to access it when run from bitbake.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
8 years agowic: fix getting path of native sysroot
Ed Bartosh [Mon, 16 Jan 2017 20:42:29 +0000 (22:42 +0200)]
wic: fix getting path of native sysroot

wic used STAGING_DIR_NATIVE variable as a path to native sysroot.
This doesn't work with recipe specific sysroots as STAGING_DIR_NATIVE
points to the native sysroot of the current recipe.

Used RECIPE_SYSROOT_NATIVE variable of wic-tools recipe
to fix the issue.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
8 years agoselftest: build wic-tools in the Wic.setUp
Ed Bartosh [Wed, 18 Jan 2017 17:13:39 +0000 (19:13 +0200)]
selftest: build wic-tools in the Wic.setUp

Built wic-tools recipe instead of set of tools recipes
to ensure that all tools are available from one recipe sysroot.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
8 years agoimage_types.bbclass: build wic-tools
Ed Bartosh [Wed, 18 Jan 2017 17:10:49 +0000 (19:10 +0200)]
image_types.bbclass: build wic-tools

Added dependency do_image_wic -> wic-tools:do_build to ensure
that all required tools are ready to use by wic.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
8 years agowic: add wic-tools recipe
Ed Bartosh [Wed, 18 Jan 2017 16:53:48 +0000 (18:53 +0200)]
wic: add wic-tools recipe

This meta recipe is for building tools used by wic.
It allows wic to find tools in recipe specific sysroot as
all tools will be present in wic-tools sysroot.

NOTE: task do_build_sysroot is created to ensure that
sysroot is re-populated when package is built. Otherwise it will
be taken from sstate and sysroot will not be populated.

Generated wic-tools.env file for wic to be able to get values of
wic-tools variables when wic run from bitbake.

Also add dependency to grub-efi

Without grub-efi test_iso_image test case fails with this error:

AssertionError: Command 'wic create mkhybridiso --image-name
core-image-minimal' returned non-zero exit status 1:
Error: Please build grub-efi first

Fixed by adding dependency wic-tools -> grub-efi.

[RP: Added syslinux exclusion for non-IA arches]
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake.conf: Exclude extend_recipe_sysroot function from sstate checksums
Richard Purdie [Fri, 20 Jan 2017 16:28:45 +0000 (16:28 +0000)]
bitbake.conf: Exclude extend_recipe_sysroot function from sstate checksums

The extend_recipe_sysroot itself is excluded from the task hashes. This is
because it only ever acts upon the contents of the task dependencies and hence
those checksums accurately relfect what its doing. It does mean sysroots don't
repopulate if this function changes but there are other easy ways to achieve
that if needed.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoselftest/devtool: Update to account for recipe specific sysroot
Richard Purdie [Wed, 11 Jan 2017 10:38:34 +0000 (10:38 +0000)]
selftest/devtool: Update to account for recipe specific sysroot

There is no common sysroot any more so add the libusb dependency using DEPENDS
and check for the output in the sysroot output directory so the tests
work with recipe specific sysroots.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoSwitch to Recipe Specific Sysroots
Richard Purdie [Wed, 7 Dec 2016 13:54:35 +0000 (13:54 +0000)]
Switch to Recipe Specific Sysroots

This patch is comparatively large and invasive. It does only do one thing, switching the
system to build using recipe specific sysroots and where changes could be isolated from it,
that has been done.

With the current single sysroot approach, its possible for software to find things which
aren't in their dependencies. This leads to a determinism problem and is a growing issue in
several of the market segments where OE makes sense. The way to solve this problem for OE is
to have seperate sysroots for each recipe and these will only contain the dependencies for
that recipe.

Its worth noting that this is not task specific sysroots and that OE's dependencies do vary
enormously by task. This did result in some implementation challenges. There is nothing stopping
the implementation of task specific sysroots at some later point based on this work but
that as deemed a bridge too far right now.

Implementation details:

* Rather than installing the sysroot artefacts into a combined sysroots, they are now placed in
  TMPDIR/sysroot-components/PACKAGE_ARCH/PN.

* WORKDIR/recipe-sysroot and WORKDIR/recipe-sysroot-native are built by hardlinking in files
  from the sysroot-component trees. These new directories are known as RECIPE_SYSROOT and
  RECIPE_SYSROOT_NATIVE.

* This construction is primarily done by a new do_prepare_recipe_sysroot task which runs
  before do_configure and consists of a call to the extend_recipe_sysroot function.

* Other tasks need things in the sysroot before/after this, e.g. do_patch needs quilt-native
  and do_package_write_deb needs dpkg-native. The code therefore inspects the dependencies
  for each task and adds extend_recipe_sysroot as a prefunc if it has populate_sysroot
  dependencies.

* We have to do a search/replace 'fixme' operation on the files installed into the sysroot to
  change hardcoded paths into the correct ones. We create a fixmepath file in the component
  directory which lists the files which need this operation.

* Some files have "postinstall" commands which need to run against them, e.g. gdk-pixbuf each
  time a new loader is added. These are handled by adding files in bindir with the name
  prefixed by "postinst-" and are run in each sysroot as its created if they're present.
  This did mean most sstate postinstalls have to be rewritten but there shouldn't be many of them.

* Since a recipe can have multiple tasks and these tasks can run against each other at the same
  time we have to have a lock when we perform write operations against the sysroot. We also have
  to maintain manifests of what we install against a task checksum of the dependency. If the
  checksum changes, we remove its files and then add the new ones.

* The autotools logic for filtering the view of m4 files is no longer needed (and was the model
  for the way extend_recipe_sysroot works).

* For autotools, we used to build a combined m4 macros directory which had both the native and
  target m4 files. We can no longer do this so we use the target sysroot as the default and add
  the native sysroot as an extra backup include path. If we don't do this, we'd have to build
  target pkg-config before we could built anything using pkg-config for example (ditto gettext).
  Such dependencies would be painful so we haven't required that.

* PKDDATA_DIR was moved out the sysroot and works as before using sstate to build a hybrid copy
  for each machine. The paths therefore changed, the behaviour did not.

* The ccache class had to be reworked to function with rss.

* The TCBOOTSTRAP sysroot for compiler bootstrap is no longer needed but the -initial data
  does have to be filtered out from the main recipe sysroots. Putting "-initial" in a normal
  recipe name therefore remains a bad idea.

* The logic in insane needed tweaks to deal with the new path layout, as did the debug source
  file extraction code in package.bbclass.

* The logic in sstate.bbclass had to be rewritten since it previously only performed search and
  replace on extracted sstate and we now need this to happen even if the compiled path was
  "correct". This in theory could cause a mild performance issue but since the sysroot data
  was the main data that needed this and we'd have to do it there regardless with rss, I've opted
  just to change the way the class for everything. The built output used to build the sstate output
  is now retained and installed rather than deleted.

* The search and replace logic used in sstate objects also seemed weak/incorrect and didn't hold
  up against testing. This has been rewritten too. There are some assumptions made about paths, we
  save the 'proper' search and replace operations to fixmepath.cmd but then ignore this. What is
  here works but is a little hardcoded and an area for future improvement.

* In order to work with eSDK we need a way to build something that looks like the old style sysroot.
  "bitbake build-sysroots" will construct such a sysroot based on everything in the components
  directory that matches the current MACHINE. It will allow transition of external tools and can
  built target or native variants or both. It also supports a clean task. I'd suggest not relying on
  this for anything other than transitional purposes though. To see XXX in that sysroot, you'd have
  to have built that in a previous bitbake invocation.

* pseudo is run out of its components directory. This is fine as its statically linked.

* The hacks for wayland to see allarch dependencies in the multilib case are no longer needed
  and can be dropped.

* wic needed more extensive changes to work with rss and the fixes are in a separate commit series

* Various oe-selftest tweaks were needed since tests did assume the location to binaries and the
  combined sysroot in several cases.

* Most missing dependencies this work found have been sent out as separate patches as they were found
  but a few tweaks are still included here.

* A late addition is that extend_recipe_sysroot became multilib aware and able to populate multilib
  sysroots. I had hoped not to have to add that complexity but the meta-environment recipe forced my
  hand. That implementation can probably be neater but this is on the list of things to cleanup later
  at this point.

In summary, the impact people will likely see after this change:

* Recipes may fail with missing dependencies, particularly native tools like gettext-native,
  glib-2.0-native and libxml2.0-native. Some hosts have these installed and will mask these errors

* Any recipe/class using SSTATEPOSTINSTFUNCS will need that code rewriting into a postinst

* There was a separate patch series dealing with roots postinst native dependency issues. Any postinst
  which expects native tools at rootfs time will need to mark that dependency with PACKAGE_WRITE_DEPS.

There could well be other issues. This has been tested repeatedly against our autobuilders and oe-selftest
and issues found have been fixed. We believe at least OE-Core is in good shape but that doesn't mean
we've found all the issues.

Also, the logging is a bit chatty at the moment. It does help if something goes wrong and goes to the
task logfiles, not the console so I've intentionally left this like that for now. We can turn it down
easily enough in due course.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agopackage_rpm: Clean up pointless exception handling
Richard Purdie [Sat, 21 Jan 2017 14:18:01 +0000 (14:18 +0000)]
package_rpm: Clean up pointless exception handling

The exception handling in this function seemed mildly crazy. Python will
given perfectly good or in several cases better information if we let its
standard traceback/exception handling happen. Remove the pointless code.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agopackage_ipk: Clean up pointless exception handling
Richard Purdie [Sat, 21 Jan 2017 14:14:24 +0000 (14:14 +0000)]
package_ipk: Clean up pointless exception handling

The exception handling in this function seemed mildly crazy. Python will
given perfectly good or in several cases better information if we let its
standard traceback/exception handling happen. Remove the pointless code.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agopackage_ipk: Improve failure debug output
Richard Purdie [Sat, 21 Jan 2017 14:11:52 +0000 (14:11 +0000)]
package_ipk: Improve failure debug output

Currently if the dpkg-deb command fails you see an error message like this:

ERROR: nss-3.27.1-r0 do_package_write_ipk: opkg-build execution failed
ERROR: nss-3.27.1-r0 do_package_write_ipk: Function failed: do_package_ipk

which is pretty much useless. If we use subprocess.check_output, we see a
traceback and then:

Exception: subprocess.CalledProcessError: Command '<cmd>' returned non-zero exit status 1

Subprocess output:
<output>

which is much easier to debug from.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agopackage_deb: Clean up pointless exception handling
Richard Purdie [Sat, 21 Jan 2017 14:08:07 +0000 (14:08 +0000)]
package_deb: Clean up pointless exception handling

The exception handling in this function seemed mildly crazy. Python will
given perfectly good or in several cases better information if we let its
standard traceback/exception handling happen. Remove the pointless code
along with the duplicated key checking which was broken in the inner loop
by usage of the wrong variable.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agopackage_deb: Improve failure debug output
Richard Purdie [Sat, 21 Jan 2017 13:55:36 +0000 (13:55 +0000)]
package_deb: Improve failure debug output

Currently if the dpkg-deb command fails you see an error message like this:

ERROR: nss-3.27.1-r0 do_package_write_deb: dpkg-deb execution failed
ERROR: nss-3.27.1-r0 do_package_write_deb: Function failed: do_package_deb

which is pretty much useless. If we use subprocess.check_output, we see a
traceback and then:

Exception: subprocess.CalledProcessError: Command '<cmd>' returned non-zero exit status 1

Subprocess output:
<output>

which is much easier to debug from.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agopopulate_sdk_ext: Add wic-tools to BB_SETSCENE_ENFORCE_WHITELIST
Richard Purdie [Sat, 21 Jan 2017 11:10:59 +0000 (11:10 +0000)]
populate_sdk_ext: Add wic-tools to BB_SETSCENE_ENFORCE_WHITELIST

wic-tools has tasks which would always rerun and not come from sstate
to ensure we have a correctly populated sysroot. This is low overhead
and can be ignored from an eSDK perspective.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoRevert "populate_sdk_ext: whitelist do_package tasks"
Richard Purdie [Sat, 21 Jan 2017 11:10:03 +0000 (11:10 +0000)]
Revert "populate_sdk_ext: whitelist do_package tasks"

Since Paul reverted the sstate.bbclass change which was checking the sstate
mirror test results, this change should also not be needed anymore.

This reverts commit e30f5002c4f216757ace27ad8d06164716ca46b5.

8 years agoepiphany: Fix dependencies for recipe specific sysroot
Jussi Kukkonen [Fri, 20 Jan 2017 13:09:38 +0000 (15:09 +0200)]
epiphany: Fix dependencies for recipe specific sysroot

gettext and glib-2.0 tools are required during build.

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agometa-environment: Ensure all multilib dependencies are accounted for
Richard Purdie [Fri, 20 Jan 2017 13:55:47 +0000 (13:55 +0000)]
meta-environment: Ensure all multilib dependencies are accounted for

Currently the recipe depends on the mulitlib libcs all being built
but the dependencies don't account for this. Fix the DEPENDS so
that the requires pieces are all built first rather than relying on
luck.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoutils: Factor out common multilib datastore creation function
Richard Purdie [Fri, 20 Jan 2017 13:50:47 +0000 (13:50 +0000)]
utils: Factor out common multilib datastore creation function

This code is already used in two places and we need it in others so
turn it into its own function.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agooe-selftest: devtool: remove use of git -C
Paul Eggleton [Fri, 20 Jan 2017 01:49:02 +0000 (14:49 +1300)]
oe-selftest: devtool: remove use of git -C

The -C option isn't available in versions of git older than 1.8.5,
and officially we only require git 1.8.3.1 or newer (and the latter is
the version you'll find on CentOS 7, so the test fails there). In any
case we can simply specify the working directory to runCmd() so just
do that instead.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agokernel.bbclass: Add PACKAGE_WRITE_DEPS for postinst
Jussi Kukkonen [Thu, 19 Jan 2017 15:45:43 +0000 (17:45 +0200)]
kernel.bbclass: Add PACKAGE_WRITE_DEPS for postinst

The depmodwrapper dependency is not actually used by the class but
anyone using pkg_postinst_kernel-base() will need it.

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
8 years agocantarell-fonts: inherit pkgconfig
Jussi Kukkonen [Thu, 19 Jan 2017 09:27:13 +0000 (11:27 +0200)]
cantarell-fonts: inherit pkgconfig

configure fails without pkg-config.

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
8 years agofontcache.bbclass: Add PACKAGE_WRITE_DEPS for postinst
Jussi Kukkonen [Thu, 19 Jan 2017 09:16:04 +0000 (11:16 +0200)]
fontcache.bbclass: Add PACKAGE_WRITE_DEPS for postinst

Qemu is used to run fc-cache on postinstall.

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
8 years agogconf.bbclass: Add PACKAGE_WRITE_DEPS for postinst
Jussi Kukkonen [Thu, 19 Jan 2017 09:13:49 +0000 (11:13 +0200)]
gconf.bbclass: Add PACKAGE_WRITE_DEPS for postinst

gconftool-2 is used during postinstall.

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
8 years agogio-module-cache: Add PACKAGE_WRITE_DEPS for postinst
Jussi Kukkonen [Thu, 19 Jan 2017 09:11:03 +0000 (11:11 +0200)]
gio-module-cache: Add PACKAGE_WRITE_DEPS for postinst

Qemu is used to run gio-querymodules on postinstall.

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
8 years agogsettings: Add PACKAGE_WRITE_DEPS for postinst
Jussi Kukkonen [Thu, 19 Jan 2017 09:06:37 +0000 (11:06 +0200)]
gsettings: Add PACKAGE_WRITE_DEPS for postinst

glib-compile-schemas is needed during postinstall.

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
8 years agogtk-immodules-cache: Add PACKAGE_WRITE_DEPS for postinst
Jussi Kukkonen [Thu, 19 Jan 2017 08:59:59 +0000 (10:59 +0200)]
gtk-immodules-cache: Add PACKAGE_WRITE_DEPS for postinst

Qemu is used to run gtk-query-immodules-* on postinstall.

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
8 years agomime.bbclass: Add PACKAGE_WRITE_DEPS for postinst
Jussi Kukkonen [Thu, 19 Jan 2017 08:53:05 +0000 (10:53 +0200)]
mime.bbclass: Add PACKAGE_WRITE_DEPS for postinst

update-mime-database is used in postinstall.

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
8 years agoupdate-alternatives.bbclass: Add PACKAGE_WRITE_DEPS for postinst
Jussi Kukkonen [Thu, 19 Jan 2017 08:47:13 +0000 (10:47 +0200)]
update-alternatives.bbclass: Add PACKAGE_WRITE_DEPS for postinst

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
8 years agoupdate-rc.d: Add PACKAGE_WRITE_DEPS for postinst
Jussi Kukkonen [Thu, 19 Jan 2017 08:39:53 +0000 (10:39 +0200)]
update-rc.d: Add PACKAGE_WRITE_DEPS for postinst

use_updatercd() will always return true in rootfs generation so
checking that is not required.

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
8 years agodbus: Add PACKAGE_WRITE_DEPS for postinst
Jussi Kukkonen [Thu, 19 Jan 2017 08:16:34 +0000 (10:16 +0200)]
dbus: Add PACKAGE_WRITE_DEPS for postinst

systemctl is needed if both systemd and sysvinit are in distro
features.

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
8 years agosystemd: Add PACKAGE_WRITE_DEPS for postinst
Jussi Kukkonen [Thu, 19 Jan 2017 08:11:13 +0000 (10:11 +0200)]
systemd: Add PACKAGE_WRITE_DEPS for postinst

Qemu is used to run udevadm in postinstall.

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
8 years agoeudev: Add PACKAGE_WRITE_DEPS for postinstall
Jussi Kukkonen [Thu, 19 Jan 2017 08:07:44 +0000 (10:07 +0200)]
eudev: Add PACKAGE_WRITE_DEPS for postinstall

Qemu is used to run udevadm in postinstall.

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
8 years agoshadow: Add PACKAGE_WRITE_DEPS for postinst
Jussi Kukkonen [Thu, 19 Jan 2017 08:04:19 +0000 (10:04 +0200)]
shadow:  Add PACKAGE_WRITE_DEPS for postinst

pwconv and grpconv are used in the postinstall script.

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
8 years agoxorg-font-common: Add PACKAGE_WRITE_DEPS for postinst
Jussi Kukkonen [Thu, 19 Jan 2017 08:01:05 +0000 (10:01 +0200)]
xorg-font-common: Add PACKAGE_WRITE_DEPS for postinst

mkfontdir and mkfontscale are used in the postinstall script.

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
8 years agolinux-dtb: Add PACKAGE_WRITE_DEP for postinstall
Jussi Kukkonen [Thu, 19 Jan 2017 07:57:22 +0000 (09:57 +0200)]
linux-dtb: Add PACKAGE_WRITE_DEP for postinstall

update-alternatives is used in postinstall.

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
8 years agonss: Add PACKAGE_WRITE_DEPS
Jussi Kukkonen [Thu, 19 Jan 2017 07:44:04 +0000 (09:44 +0200)]
nss: Add PACKAGE_WRITE_DEPS

nss-native is required in postinst. It's also needed during
build so not removed from DEPENDS.

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
8 years agouseradd: Add PACKAGE_WRITE_DEPS for postinst
Richard Purdie [Thu, 19 Jan 2017 17:01:10 +0000 (17:01 +0000)]
useradd: Add PACKAGE_WRITE_DEPS for postinst

The postinstall needs shadow-native, mark the dependency

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoca-certificates: Add PACKAGE_WRITE_DEPS for postinst
Richard Purdie [Thu, 19 Jan 2017 17:01:10 +0000 (17:01 +0000)]
ca-certificates: Add PACKAGE_WRITE_DEPS for postinst

The postinstall needs ca-certificates-native, mark the dependency

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agomatchbox-session-sato: Add PACKAGE_WRITE_DEPS for postinst
Richard Purdie [Thu, 19 Jan 2017 17:01:10 +0000 (17:01 +0000)]
matchbox-session-sato: Add PACKAGE_WRITE_DEPS for postinst

The postinstall needs gconf-native, mark the dependency and drop
the now unneeded DEPENDS.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agomodutils-initsripts: Add PACKAGE_WRITE_DEPS for postinst
Richard Purdie [Thu, 19 Jan 2017 17:01:10 +0000 (17:01 +0000)]
modutils-initsripts: Add PACKAGE_WRITE_DEPS for postinst

The postinstall needs systemd-systemctl-native, mark the dependency

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agosystemd-compat-units: Add PACKAGE_WRITE_DEPS for postinst
Richard Purdie [Thu, 19 Jan 2017 17:01:10 +0000 (17:01 +0000)]
systemd-compat-units: Add PACKAGE_WRITE_DEPS for postinst

The postinstall needs systemd-systemctl-native, mark the dependency

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agopsplash: Add PACKAGE_WRITE_DEPS for postinst
Richard Purdie [Thu, 19 Jan 2017 17:01:10 +0000 (17:01 +0000)]
psplash: Add PACKAGE_WRITE_DEPS for postinst

The postinstall needs systemd-systemctl-native, mark the dependency

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoinitscripts: Add PACKAGE_WRITE_DEPS for postinst
Richard Purdie [Thu, 19 Jan 2017 17:01:10 +0000 (17:01 +0000)]
initscripts: Add PACKAGE_WRITE_DEPS for postinst

The postinstall needs systemd-systemctl-native, mark the dependency

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agov86d: Add PACKAGE_WRITE_DEPS for postinst
Richard Purdie [Thu, 19 Jan 2017 17:01:10 +0000 (17:01 +0000)]
v86d: Add PACKAGE_WRITE_DEPS for postinst

The postinstall needs systemd-systemctl-native, mark the dependency

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agokeymaps: Add PACKAGE_WRITE_DEPS for postinst
Richard Purdie [Thu, 19 Jan 2017 17:01:10 +0000 (17:01 +0000)]
keymaps: Add PACKAGE_WRITE_DEPS for postinst

The postinstall needs systemd-systemctl-native, mark the dependency

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agosystemd: Add PACKAGE_WRITE_DEPS for postinst
Richard Purdie [Thu, 19 Jan 2017 17:01:10 +0000 (17:01 +0000)]
systemd: Add PACKAGE_WRITE_DEPS for postinst

The postinstall needs systemd-systemctl-native, mark the dependency

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agopixbufcache: Add PACKAGE_WRITE_DEPS for postinst
Richard Purdie [Thu, 19 Jan 2017 17:01:10 +0000 (17:01 +0000)]
pixbufcache: Add PACKAGE_WRITE_DEPS for postinst

The postinstall needs qemu-native and gdk-pixbuf-native, mark these dependencies

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agokernel-module-split: Add PACKAGE_WRITE_DEPS for postinst
Richard Purdie [Thu, 19 Jan 2017 17:01:10 +0000 (17:01 +0000)]
kernel-module-split: Add PACKAGE_WRITE_DEPS for postinst

The postinstall needs kmod-native and depmodwrapper-cross, mark these dependencies.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agogtk-icon-cache: Add PACKAGE_WRITE_DEPS for postinst
Richard Purdie [Thu, 19 Jan 2017 16:56:30 +0000 (16:56 +0000)]
gtk-icon-cache: Add PACKAGE_WRITE_DEPS for postinst

gdk-pixbuf-native and gtk-icon-utils-native are needed by the postinstall
scripts so mark the dependency. The utils may be needed at icon build
time too so DEPENDS is unchanged.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agosstate: Drop the depchain isPostDep() checks
Richard Purdie [Thu, 19 Jan 2017 16:53:53 +0000 (16:53 +0000)]
sstate: Drop the depchain isPostDep() checks

The dependencies of do_package_write_* tasks are either going to be packaging
tools needed to build the packages, or, native tools needed at postinst
time. Now we've formalised this dependency pattern, drop the hardcoded
list and work based on the rule. The package creation tools are usually
the same tools needed at rootfs/postinst time anyway so the difference is
moot.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoclasses/package*: Add support for PACKAGE_WRITE_DEPS
Richard Purdie [Thu, 19 Jan 2017 16:49:00 +0000 (16:49 +0000)]
classes/package*: Add support for PACKAGE_WRITE_DEPS

Add a new variable to allow markup of postinstall (and preinst)
script dependnecies on native/cross tools.

If your postinstall can execute at rootfs creation time rather than on
target but depends on a native tool in order to execute, you need to
list that tool in PACKAGE_WRITE_DEPENDS.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agolib/oe/utils: Add build_depends_string function
Richard Purdie [Thu, 19 Jan 2017 19:31:54 +0000 (19:31 +0000)]
lib/oe/utils: Add build_depends_string function

This is useful when manipulating depends strings for task [depends]
flags and is slightly easier to parse than some inline python.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoRevert "kernel: Modify kernel modules installation path."
Jason Wessel [Thu, 19 Jan 2017 21:14:41 +0000 (13:14 -0800)]
Revert "kernel: Modify kernel modules installation path."

This reverts commit 0ccb2efe9837e2915c093341a662dffc1df00866.

The OVS fails to function and the kernel modules cannot be found by
any of the kernel tools such as depmod because they are installed
into the wrong directory in multilib 64bit/32bit bulids.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoRevert "linux-firmware: Modify firmware installation path"
Jason Wessel [Thu, 19 Jan 2017 21:14:40 +0000 (13:14 -0800)]
Revert "linux-firmware: Modify firmware installation path"

This reverts commit a46a23fed9acd097ecc8ab3985d18688abe7b065.

The 64bit/32bit multilib builds break because the kernel's
firmware loader cannot find the firmware because it
gets placed int the wrong directory.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoRevert "classes/sstate: add a mode to error if sstate package unavailable"
Paul Eggleton [Thu, 19 Jan 2017 18:29:17 +0000 (07:29 +1300)]
Revert "classes/sstate: add a mode to error if sstate package unavailable"

It turns out that this check cannot work. We don't have the information
to know whether an sstate package is really needed at this point in the
execution, so we check the availability for things that we won't
actually end up needing later on. Thus we can't fail if some of these
aren't found or we'll get needless failures.

This check was intended to give earlier more accurate errors when sstate
artifacts failed to download, but that's not practical so we'll rely
solely on the task execution check that was added within the runqueue.

This reverts most of commit 9e711b54487c3141d7264b8cf0d74f9465020190 (we
still need to allow BB_SETSCENE_ENFORCE through from the external
environment since the eSDK relies upon that.)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoclasses/populate_sdk_ext: force a known value for TMPDIR
Paul Eggleton [Thu, 19 Jan 2017 18:29:16 +0000 (07:29 +1300)]
classes/populate_sdk_ext: force a known value for TMPDIR

If TMPDIR is configured to be somewhere outside of TOPDIR (a not
uncommon configuration where you have multiple disks and space on /home
is at a premium) then our attempt to find out the location of paths
under TMPDIR by using a relative path led to horribly broken paths
ending up in the eSDK. To save pain, just force a known value for TMPDIR
(i.e. ${TOPDIR}/tmp) and then we can assume that everywhere else.

Fixes [YOCTO #10797].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agocore-image-sato: SDK should contain intltool and glib-2.0 tools for NLS
Richard Purdie [Wed, 11 Jan 2017 01:09:03 +0000 (01:09 +0000)]
core-image-sato: SDK should contain intltool and glib-2.0 tools for NLS

The SDK (and its tests) need these tools. We happened to be finding them
from the native tools in PATH but recipe specific sysroots prevents that.

This fixes the SDK to work as originally intended and contain these tools.

We have to clear this in the eSDK case since the _append can't be overridden
from the class. Ugly, but we'll have to come back to this issue.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agostaging: Add dependency on virtual/binutils for strip binary
Richard Purdie [Thu, 12 Jan 2017 13:30:02 +0000 (13:30 +0000)]
staging: Add dependency on virtual/binutils for strip binary

The staging code strips binaries and we need virtual/binutils for that.
Add a specific dependency since the one from do_configure and others
may not be enough to ensure the binaries are in our own sysroot.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agooe-selftest: Error if the user has buildhistory enabled
Richard Purdie [Thu, 12 Jan 2017 13:30:53 +0000 (13:30 +0000)]
oe-selftest: Error if the user has buildhistory enabled

buildhistory interfers with various tests so error if the user has it enabled,
hence avoiding time spent running the tests only for them to fail.

For example, if there is an sstate cache and something comes from that cache,
you can get a "version went backwards" warning from buildhistory which would
then change the outcome of a test. Its safer/easier to disable it.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agomultilib_global: Drop pointless event mask/code filtering
Richard Purdie [Tue, 17 Jan 2017 12:11:15 +0000 (12:11 +0000)]
multilib_global: Drop pointless event mask/code filtering

This code was pointless so cleanup, drop the unused event and the
filtering is no longer needed.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agodevtool: fix source extraction to work with recipe specific sysroots
Paul Eggleton [Mon, 16 Jan 2017 23:14:36 +0000 (12:14 +1300)]
devtool: fix source extraction to work with recipe specific sysroots

When extracting source for a recipe within devtool (for extract, modify
or upgrade) We need to redirect WORKDIR, STAMPS_DIR etc. under a
temporary directory so that:
 (a) we pick up all files that get unpacked to the WORKDIR, and
 (b) we don't disturb the existing build
However, with recipe-specific sysroots the sysroots for the recipe will
be prepared under WORKDIR, and if we used the system temporary directory
i.e. usually /tmp) as used by mkdtemp by default, then our attempts to
hardlink files into the recipe-specific sysroots will fail on systems
where /tmp is a different filesystem, and we'd have to fall back to
copying the files which is a waste of time. Put the temp directory under
the WORKDIR to prevent that from being a problem.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
[RP: Add needed mkdirhier call]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agosstate: Fix EXTRA_STAGING_FIXMES handling
Richard Purdie [Tue, 17 Jan 2017 17:42:40 +0000 (17:42 +0000)]
sstate: Fix EXTRA_STAGING_FIXMES handling

The code wasn't working properly, tweak so that it works as expected and
the grep expression includes the right patterns. Not sure this code has ever
worked prior to this.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agosysprof/gst-player/pcmanfm: Add missing glib-2.0-native DEPENDS
Richard Purdie [Thu, 19 Jan 2017 13:48:44 +0000 (13:48 +0000)]
sysprof/gst-player/pcmanfm: Add missing glib-2.0-native DEPENDS

These recipes use glib-2.0 NLS tools so we need to depend on glib-2.0-native.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agosysprof: Add missing libxml2-native DEPENDS
Richard Purdie [Sun, 15 Jan 2017 08:24:43 +0000 (08:24 +0000)]
sysprof: Add missing libxml2-native DEPENDS

Configure searches for xmllint which comes from libxml2-native.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agovte: Add missing libxml2-native DEPENDS
Richard Purdie [Sat, 14 Jan 2017 23:09:15 +0000 (23:09 +0000)]
vte: Add missing libxml2-native DEPENDS

Configure searches for xmllint which comes from libxml2-native.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agosystemd-boot: Add missing gperf-native DEPENDS
Richard Purdie [Sat, 14 Jan 2017 14:16:11 +0000 (14:16 +0000)]
systemd-boot: Add missing gperf-native DEPENDS

Configure searches for this and fails if its not present.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agointltool: Allow nativesdk variant to build
Richard Purdie [Wed, 11 Jan 2017 01:08:11 +0000 (01:08 +0000)]
intltool: Allow nativesdk variant to build

This tool has been missing from the SDKs, the recipe specific sysroot
work highlighted the issues.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>