Commit Graph

48 Commits

Author SHA1 Message Date
Joshua Lock c4e2c59088 meta: remove True option to getVar calls
getVar() now defaults to expanding by default, thus remove the True
option from getVar() calls with a regex search and replace.

Search made with the following regex: getVar ?\(( ?[^,()]*), True\)

(From OE-Core rev: 7c552996597faaee2fbee185b250c0ee30ea3b5f)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-16 10:23:23 +00:00
Richard Purdie 53c9723ea8 staging: Drop unused SYSROOT_LOCK
This hasn't been used in years and isn't referenced anywhere, drop
the definition.

(From OE-Core rev: 68258f856f08f35813964e58ef761471e29373ad)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-08 10:31:29 +00:00
Richard Purdie 0918ac9fdd staging: Add BB_SETSCENE_VERIFY_FUNCTION2 for bitbake runqueue changes
We're about to rewrite the data structures in taskdata/runqueue in bitbake
and we 'leaked' knowledge about those structures to this single function.

Add a 'v2' function definition for use with the newer bitbake, the older
one can remain for compatibility for a while, then be removed. The function
is comparatively simple and rarely changes.

(From OE-Core rev: 2a6f88d51414993d18096f7f0dc27c0b862240bc)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-15 08:35:01 +01:00
Richard Purdie 642a997ade classes/lib: Update xrange -> range for python3
xrange() no longer exists in python 3, use range()

(From OE-Core rev: d022b4335100612d6596cc4c4956cb98ed5873cc)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02 08:24:00 +01:00
Peter Kjellerstedt e839431468 staging.bbclass: Make it easier to define which dirs to stage
The directories that should be staged in the sysroot are now specified
in the SYSROOT_DIRS variable. Extra directories that should be staged
for native are specified in SYSROOT_DIRS_NATIVE. Finally, directories
that should not be staged are specified in SYSROOT_DIRS_BLACKLIST.

This also removes the sysroot_stage_libdir() function as it is no
longer used (it was just a wrapper for sysroot_stage_dir()).

(From OE-Core rev: 80e7e7f78d957b8159bede2a5cd5614d8d73039c)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-13 13:41:27 +01:00
Robert Yang 41242a22b3 staging.bbclass: remove trail slash from SYSROOT_DESTDIR
Fixed path:
QA Issue: <foo> sysroot-destdir//usr/lib/ <foo>

Note the 2 slashes "//".

(From OE-Core rev: 227247dfebe6cdff67ba2c0976b59e3f9d34f7ea)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-21 09:32:41 +00:00
Jackie Huang 606c9e7f78 staging.bbclass: make already-stripped can be skipped
Add a check like what we does in package.bbclass
so that the already-stripped QA test can be skipped.

(From OE-Core rev: 2262fdb256954b22dadb2f7c6922e6046c269742)

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-22 16:08:50 +00:00
Richard Purdie fed80c3d40 staging: Strip files in sysroot
Add functionality to strip binaries/libraries going into the sysroot. Whilst
this does fractionally slow down the build, it also significantly reduces the
size of the sstate cache files.

(From OE-Core rev: 30f3774f4cd5bbb8c1e6884aeff5af91ab053fc1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-23 16:07:23 +01:00
Richard Purdie 78a2c81427 staging: Exclude MULTI_PROVIDER_WHISTLIST from do_populate_sysroot
If you switch between multilib and non-multilib builds, pretty much
everything rebuilds due to the use of MULTI_PROVIDER_WHITELIST
in do_populate_sysroot. It doesn't need to do this so exclude
that variable for checksum purposes.

(From OE-Core rev: 7f3a44ff30d07083ee8c4e2b7ac91dc6a9c8857b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-30 14:10:33 +01:00
Paul Eggleton 5d8552e1b4 classes/staging: ensure do_populate_sysroot re-execs on changes to sysroot preprocessing funcs
Without this dependency, changes to functions added to
SYSROOT_PREPROCESS_FUNCS do not change do_populate_sysroot's signature
and thus don't cause it to re-execute.

Fixes [YOCTO #5852].

(From OE-Core rev: 9950a88906bd701d0892b3ed222717ff78a93921)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-25 09:55:36 +00:00
Richard Purdie bdbc158b47 staging: Save out provider information into the sysroot
This patch saves out provider information into the sysroot for all providers
except those in MULTI_PROVIDER_WHITELIST. This means that we will start seeing
warnings when two providers for the same thing are installed into the sysroot.

In the future those warnings can be turned into errors.

Partially addresses [YOCTO #4102]

(From OE-Core rev: 9e696b9d32e33ba37dc09ff312328e540fc25de2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-25 09:55:36 +00:00
Richard Purdie 480bf037ae sstate: Get rid of crazy name mapping
When originally developed, it was thought a task may have more than one associated
sstate archive. The way the code has grown that idea is now not possible or needed.
We can therefore assume one sstate archive per task and drop the crazy name
mapping code. Simpler is better in this case.

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

(From OE-Core rev: 5afe86a6854b21692fd97c5fc7fab50dbc068acb)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-18 17:08:05 +00:00
Richard Purdie 931cf6e9a8 staging: Use hardlinking for sysroot_stage_dir
This saves about 2GB on a core-image-sato build so is worth doing and is
consistent with our efforts to try and decrease our build footprint.

Build time in my local test seemed unaffected but on more IO bound
machines it should help.

(From OE-Core rev: 7136cbc64e5efb09f3fae3e2e35a181ca3d66dd4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-14 13:39:47 +00:00
Martin Jansa f33afade31 bitbake.conf: Remove double slash from PATH_prepend and PKG_CONFIG_DIR
* we correctly have
  ${STAGING_DIR_NATIVE}${base_sbindir_native}
  and then double slash in
  ${STAGING_DIR_NATIVE}/${base_bindir_native}
* similar in PKG_CONFIG_DIR where libdir also starts with slash
  ${STAGING_DIR_HOST}/${libdir}/pkgconfig
* also fix double slash in insane.bbclass and staging.bbclass
* I was a bit nervous about staging change (in case the / was important
  in some weird use-case, but the extra slash is there since following
  commit where other extra slashes were removed only the one before
  libdir was kept:

  commit 6ea78d6489
  Author: Richard Purdie <rpurdie@linux.intel.com>
  Date:   Mon Nov 2 17:10:51 2009 +0000

  autotools.bbclass: Separate out useful staging functions into
                     base.bbclass and call from autotools classes
* this isn't fixing any real-world issue AFAIK, I was just trying to
  debug one weird case where debugedit fails with
  canonicalization unexpectedly shrank by one character
  and it's easier to grep for '//' without many harmless instances
  already in run* scripts etc

(From OE-Core rev: 0ddaf52e9e344986ae2b016cc068d9eee71b4347)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-14 16:55:24 +01:00
Richard Purdie d3846f06d1 classes: tar 1.27 fixes
tar version 1.27 returns:

tar: --same-order option cannot be used with -c

with the commandlines we have been using. We can remove the -s option (which
is --same-order) to remove the error.

(From OE-Core rev: 3d5a6d0a480a0fa98260a3b3ffc71b8d9e3e58af)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-14 16:55:21 +01:00
Richard Purdie f8ea6a8eed staging.bbclass: Drop unused/legacy function
(From OE-Core rev: 9120c88085236e1be9854376e43a7b14f937ba03)

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

(From OE-Core rev: 05be11c7508984cc4aa757becb7a8f47c5b7e919)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06 13:12:59 +00:00
Richard Purdie 34b415842d staging: Drop obsolete comments
(From OE-Core rev: 44a2374dcfd68c8e158e0c901d75dbd7327652a5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-25 12:58:35 +00:00
Constantin Musca 2c57f28eda bitbake.conf: add nonarch_base_lib variable
Adapt stagging.bbclass to this change

(From OE-Core rev: 0730a8cbb42cd8b6667f2d1daefa0f6fcec06af2)

Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-19 17:54:58 +00:00
Richard Purdie 266d9ce1cf staging.bbclass: Might as well drop the applications, fonts and pixmap directories from ${datadir}
These cause various file conflicts and aren't useful within the sysroot anyway. We might
as well remove them. Whitelisting the contents of ${datadir} that *is* useful might
be a better option in future.

(From OE-Core rev: c9fdd2fd108fa557d8f60339405447b4ea4d6f64)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-29 16:02:07 -07:00
Richard Purdie 48619958d5 meta/classes: Various python whitespace fixes
It was pointed out we have a number of weird indentations in the python functions.
This patch cleans up 3, 7 and other weird indentations for the core bbclass files.

It also fixes some wierd (odd) shell function indentation which my searches picked up.

(From OE-Core rev: 8385d6d74624000d68814f4e3266d47bc8885942)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-21 12:15:30 +01:00
Richard Purdie f3d5e08e65 staging.bbclass: Add support for invalidtasks parameter (see bitbake change)
(From OE-Core rev: d3ae2fc896fd866aac9f064dccbff971c324f43c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-26 14:56:20 +01:00
Richard Purdie a9b51e7859 staging.bbclass: Also don't bother staging locale files, its pointless
(From OE-Core rev: 782ce542a8250133cf1b1bc32927c17cd09cfca3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-19 17:18:09 +01:00
Richard Purdie 1ed15fbd4c staging.bbclass: Ensure the task starts from a clean directory
I found that some files were not getting removed from the sysroot, despite them
clearly being removed by the recipe. I found SYSROOT_DESTDIR is only ever copied
into, not cleaned. This patch ensures its empty when the task starts so that
stale files are removed and not persisted.

(From OE-Core rev: 8a313f6d32ae0bdac0393887712b09f1b685aaa5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-19 17:18:08 +01:00
Richard Purdie 52d1f7bee7 staging.bbclass: Don't stage doc/manpage/info files
There is no point in having doc, manpage or info files in the staging directory. They
just bloat the sstate package size and waste time as they're copied around.

We never used to stage these but it crept in when we started staging $datadir. This
patch corrects that so they're removed and stop making it into the sysroot.

(From OE-Core rev: ec4fea852bde2294ad7a7a703ccf11eb9a109c31)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-19 17:18:08 +01:00
Richard Purdie bfd279de32 Convert tab indentation in python functions into four-space
(From OE-Core rev: 604d46c686d06d62d5a07b9c7f4fa170f99307d8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-19 10:24:50 +01:00
Richard Purdie 36e918b8a8 Quoting fixes
We have various variables which are either not quoted at all or are half
quoted. This patch fixes the bad exmaples so everything is consistent.

(From OE-Core rev: 30253358f5e76fb7b25be27198b4c125e0dbdf2c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-26 12:52:12 +00:00
Koen Kooi ae3184c96e classes: replace 'Poky' with 'OE-core'
(From OE-Core rev: 1fdcd32520a05465b0d54c062f28bac9cdf74a20)

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-01 15:07:42 +00:00
Richard Purdie 47004dfbaa staging: Remove debug accidently left in
(From OE-Core rev: 5d757b8bee10a79843e6ab726784393cbef67f73)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-22 15:00:56 +00:00
Richard Purdie 3ab018c625 staging.bbclass: Add BB_SETSCENE_VERIFY_FUNCTION function
Since we clean out do_populate_sysroot if do_configure runs, don't
allow do_populate_sysroot_setscene functions if we're going to
run do_configure.

(From OE-Core rev: 5f1dc1991f97037692193572298eb7f7a5640760)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-22 13:07:11 +00:00
Richard Purdie c8dee9b92d Convert to use direct access to the data store (instead of bb.data.*Var*())
This is the result of running the following over the metadata:

sed \
-e 's:bb.data.\(setVar([^,()]*,[^,()]*\), *\([^ )]*\) *):\2.\1):g' \
-e 's:bb.data.\(setVarFlag([^,()]*,[^,()]*,[^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^() ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-i `grep -ril bb.data *`

(From OE-Core rev: b22831fd63164c4db9c0b72934d7d734a6585251)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-10 11:51:19 +00:00
Mark Hatle 477f685ce0 Add umask task control
Bitbake now allows the umask to be specified per task.  The
following tasks will have a umask of 022 set by default:

do_configure
do_compile
do_install
do_package
do_populate_sysroot
do_rootfs

do_configure and do_compile need a umask of 022 set because -many- recipes
directly copy generated files out of recipe's build directory.  Instead of
fixing each existing and future recipe, it was shown to be much easier to
just set the umask.

(From OE-Core rev: 0cfa7ebcf661aa0645c6d4d858b04946ebacb7e4)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-30 20:57:05 +01:00
Mark Hatle d3d236b2bf Misc hard link fixes
I searched the various classes and looked for copies that should attempt to
preserve hardlinks.  This fixes the majority of this copies by switching to
using tar as the copy method.  It also has the side effect of preserving sparse
files.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2011-02-09 22:46:30 +00:00
Richard Purdie 8cae183a22 staging.bbclass: Only clean out the sysroot if we rerun configure, not at setscene time
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-01-28 10:28:19 +00:00
Richard Purdie 70301cc433 staging.bbclass: No need to create these directories any more, also remove invalid comment
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-01-26 11:37:32 +00:00
Dongxiao Xu 7f41f1a888 bitbake: machine specific sysroots implementation
This commit changes the sysroots path to be machine specific.

Changes includes:

1) STAGING_DIR_TARGET and STRAGING_DIR_HOST points to machine specific
paths.

2) task stamp files. Adding ${MACHINE} info into stamp files for
do_populate_sysroots and do_package tasks. Add a BB_STAMPTASK_BLACKLIST
to keep native, nativesdk, crosssdk, and cross-canadian stamp unchanged.

3) siteconfig path. Separate the site config path for different machines
to avoid one machine adopting the cache file of another machine.

4) sstate. Add machine name to sstate manifest file.
Change relocation code for sstate paths since sysroot is machine.
Keep native, nativesdk, crosssdk, and cross-canadian unchanged.

5) toolchain scripts. Change the environment path to point to machine
specific sysroots in toolchain scripts bbclass.

6) Relocate la files when populating to a different machine of the same
architecture.

7) Exclude STAGING_DIR_TARGET and STAGING_DIR_HOST parameter from sstate
siginfo since they contain ${MACHINE} information.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
2011-01-25 12:25:46 +00:00
Dongxiao Xu bc9d2fbfd4 staging: Use relative path in sysroot-destdir for target recipes
Original we used absolute path in sysroot-destdir for both native and
target recipes. This commit changes target recipes to use relative path
which is same as the image directory.

[sgw: merged with libtool sysroot work]
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
2011-01-21 11:18:37 +00:00
Scott Garman 14770205c1 staging.bbclass, utils.bbclass: remove la mangling code
libtool v2.4 --with-libtool-sysroot eliminates the need for
la mangling.

Based on Khem Raj's OE commits.

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
2011-01-21 01:36:15 -08:00
Dongxiao Xu 4cd1118a09 staging: relocate *.la paths in destination dirs
Keep the la files in source directories unchanged,
and do relocation in destination directories (sysroot-destdir).

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
2011-01-17 22:10:11 +00:00
Richard Purdie f07b1a2756 Drop variables that do nothing
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-12-10 22:51:19 +00:00
Richard Purdie 2d93cb0a0d Revert "classes: Disable setscene tasks for initial testing"
This reverts commit 084ec86402.
2010-10-05 22:26:33 +01:00
Richard Purdie 084ec86402 classes: Disable setscene tasks for initial testing
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-08-19 22:36:26 +01:00
Richard Purdie c28973c160 staging.bbclass: Convert to packaged-staging
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-08-19 20:06:25 +01:00
Kevin Tian 44d7c5678f staging.bbclass: mangle *.la for ${base_libdir} too
currently staging.bbclass mangle *.la to ensure sysroot prefix attached to
dependency_libs if other *.la is referenced, however it only happens on
${libdir}. libpam is special with its libraries under ${base_libdir}. So
this extends mangle to ${base_libdir} too

Signed-off-by: Kevin Tian <kevin.tian@intel.com>
2010-08-13 13:36:02 +01:00
Richard Purdie 049aaa0233 staging: Remove now unused legacy staging code
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-30 14:41:45 +01:00
Richard Purdie dc807f54f8 Finally deprecate all legacy do_stage functions. This changes the existing warning
into a fatal error if any legacy do_stage functions are found.

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-22 11:44:28 +01:00
Joshua Lock f23aa92f08 staging: fix staging of empty directories and add localstatedir
If a program creates an empty directory during its build it's probably for a
good reason, so if it exists it seems sensible to stage it.
Some programs require localstatedir to operate so we should be sure to stage
it.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2010-07-16 15:31:04 +01:00
Richard Purdie 9c5386c1fd base.bbclass: Split up as per the patch in OE.dev by Chris Larson making code more readable and modularised
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-03-19 23:12:06 +00:00