Commit Graph

250 Commits

Author SHA1 Message Date
Robert Yang a6c6659b3f sstate.bbclass: remove previous version's stamp
There is a potential problem if we don't remove the previous version's
stamp, for example:

The depend chain is:
libtool-native -> autoconf-native -> m4-native
We have two m4-native: 1.4.9 and 1.4.7

1) Clean all of them to make a fresh build so that we can reproduce the
   problem
$ bitbake m4-native autoconf-native libtool-native -ccleansstate

2) Build libtool-native so that the m4-native_1.4.17 will be built
$ bitbake libtool-native

3) Set PREFERRED_VERSION_m4-native = "1.4.9" and build again
$ bitbake libtool-native

4) Set PREFERRED_VERSION_m4-native = "1.4.17" and build again
$ bitbake libtool-native -ccleansstate && bitbake libtool-native

Then the build will fail:
[snip]
| m4: unrecognized option '--gnu'
| Try `m4 --help' for more information.
| autom4te: m4 failed with exit status: 1
[snip]

The is because when we change m4-native to 1.4.17 and build
libtool-native again:
5) libtool-native depends on autoconf-native, and autoconf-native's
   version isn't change, so it can remove the current stamp and mirror
   the sstate (the one depends on m4-native_1.4.9) from the SSTATE_DIR
   correctly.

6) The mirrored autoconf-native depends on m4-native_1.4.17's
   do_populate_sysroot, and the stamp is already there (which is made
   by step 2), so it would do nothing, but this is incorrect, since
   the one that really in the sysroot is m4-native_1.4.9, then the
   error happens.

Remove previous version's stamp in sstate_clean() will fix the problem.

[YOCTO #5422]

(From OE-Core rev: 4659d29b1040349116549644e45035a5b37d9311)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-21 10:45:29 +00:00
Ming Liu e93a345fae sstate: add do_package to the noexec list in setscene_depvalid
do_package doesn't exist and are noexec anyway for native/cross/crosssdk
packages.

(From OE-Core rev: 1028ac813fa9803ebfff6bcfa7f8b67012609b27)

Signed-off-by: Ming Liu <ming.liu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-07 13:58:32 +00:00
Ming Liu 22764d3f4d sstate: Add optimizing logic for crosssdk setscene dependencies
This patch mainly aims to add optimisation for crosssdk setscene dependency
validating which we haven't handled in current logic, and which I think we
could have as we've already implemented to native/cross, although there
are albeit not many crossdk tasks, we could still get some performance
enhancement.

(From OE-Core rev: 1094983ff87a8b745a5bc7bfe9514433ee3c4ad2)

Signed-off-by: Ming Liu <ming.liu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-06 22:17:33 +00:00
Richard Purdie 325fb2bd24 sstate: Use datastore copies due to data changes persisting
The way the "all arch" PKGSPEC is enabled, it causes corruption
of the datastore of sstate operations against other tasks.

Data store copies are cheap and allow us to use that trick, resetting
to a clean copy of the data afterwards.

(From OE-Core rev: afaf16100efa79a275a2f4b9f2caa80decfdeb81)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-21 09:00:52 +00:00
Richard Purdie 3ada51f7aa sstate/sstatesig: Add populate_lic to list of arch invariant sstate tasks
Like fetch, unpack and patch, populate_lic doesn't vary between different
archs so we should mark it as such. This means better sstate cache reuse
with fewer duplicate files as well as less confusing sstate debugging.

sstatesig also needs to account for the fact BPN is used for sstate files
in these cases.

(From OE-Core rev: 3d59d0bed756f64d0092caa3892239c779c4a341)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-20 12:26:32 +00:00
Richard Purdie e5ee1b8c0d sstate: Convert to use ':' as a filename sperator and use SSTATE_SWSPEC globally
Currently the code has problems differentiating between "gcc-cross" and "gcc-cross-initial"
sstate files. We could add in a ton of special casing but tests show this isn't scaling
well. Using a more unique separator resolves the issue.

The choice of which separator to use is a hard one. We need something which isn't commonly
used in PN, PV, PR, *_OS and *_ARCH which rules out '-', '_' and it needs to work ok with
webservers/http which makes ';' and '%' harder.

The change also sets SSTATE_SWSPEC globally since writing out differently named siginfo
files for the fetch/unpack/patch tasks is a waste of diskspace, the hashes match for
all PN in the majority of cases and if they don't, its not a big issue as the hash is
different. This makes the results from sstate debugging more understandable.

(From OE-Core rev: 6f823a23c5f1d0ffa0a27db1c1bc1907de788505)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-20 12:26:31 +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 7935ae2e80 sstate/gcc: Fix shared workdir handling for siginfo files
For a shared workdir, any one of the fetch/unpack/patch tasks may run yet the
PN and architecture fields in SSTATE_PKGSPEC may differ. This makes looking up
the appropriate siginfo file near impossible.

I've tried several different ways of resolving this and this is the neatest
solution I could find, its still rather ugly. I believe the usefulness of
better sstate debugging outweighs the ugliness of the code.

This patch also changes the sstate_checkhashes() code to look for siginfo
files rather than the actual sstate packages themselves. This means the
function can be used in other contexts to find info files for tasks that
may not have sstate data. It is assumed that sstate mirrors will have both
files available. This is done to allow bitbake to query whether tasks have
matching signatures in sstate directories or not.

(From OE-Core rev: 068e4289b597699cbff2dfde44ba833af4535281)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-18 17:08:04 +00:00
Richard Purdie 88f0166770 sstate: Write out siginfo files for non-sstate tasks
Currently siginfo files are only written for sstate tasks. In order to be truly
debuggable, its helpful to have the siginfo for intermediate tasks. This
adds that functionality so the extra siginfo files are written out too.

This will be used to add better sstate debugging in future changes.

(From OE-Core rev: 04d108cd16f5ad8f92a62ea537d1330fee712470)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-18 17:08:04 +00:00
Roy Li 8c5f345497 sstate.bbclass: ignore the tar failure.
sstate_package creates hardlink from sysroot to SSTATE_BUILDDIR, and
sstate_create_package stores SSTATE_BUILDDIR into a archive file by
tar, these two task can be run simultaneously for different packages,
and make a hardlink for a file will lead to the change of the links
number of file, and if tar is reading this file, it will fail with exit
code 1, and report "file changed as we read it":

    DEBUG: Executing shell function sstate_create_package
    tar: x86_64-linux/usr/share/aclocal/xorg-macros.m4: file changed as we read it

4b3e353a5[sstate.bbclass: fix parallel building issue] tries to use the
tar parameter --ignore-failed-read to fix, but it does not work, and
tar parameter --warning=no-file-changed can close the warning, but can
not change the exit code. so close shell immediate exit, only fail
if tar returns not 1 and 0.

Exit codes of tar:
    http://www.gnu.org/software/tar/manual/html_section/Synopsis.html

(From OE-Core rev: fad604b719e00b03e09da5fdb485e72332275b4a)

Signed-off-by: Roy Li <rongqing.li@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-24 17:24:12 +01:00
Roy.Li 0acde33c75 sstate.bbclass: fix parallel building issue
sstate_package creates hardlink from sysroot to SSTATE_BUILDDIR, then
sstate_create_package will store SSTATE_BUILDDIR into a archive file by
tar, but once other packages install the same file into sysroot, the
creating the archive file will fail with below error:

    DEBUG: Executing shell function sstate_create_package
    tar: x86_64-linux/usr/share/aclocal/xorg-macros.m4: file changed as we read it

This kind of error is harmless, use --ignore-failed-read to ignore it.
The error in tar occurs when the timestamp of the file changes and this
can happen when the number of symlinks change. The file will be included
in the archive.

[YOCTO #5122]

(From OE-Core rev: 4b3e353a532c7b68b0bb86df4a2fcc44f8bb3ef2)

Signed-off-by: Roy.Li <rongqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-14 08:20:59 +01:00
Richard Purdie 554c892ccf meta: Don't use deprecated bitbake API
These have been deprecated for a long time, convert the remaining
references to the correct modules and prepare for removal of the
compatibility support from bitbake.

(From OE-Core rev: 6a39835af2b2b3c7797fe05479341d71a3f3aaf6)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-01 15:51:42 +01:00
Richard Purdie 4273aa4287 sstate: Fix the relative symlink replacement code
ant reported on irc that the sstate absolute to relative symlink creation
code wasn't working in klibc. He was correct although the level of breakage is
rather surprising since it only worked for one level of symlink (usr/include) with
everything else being broken.

The reason is probably that nothing really uses absolute paths, we use relative
paths where at all possible already. Nothing in the target sysroot should use
absolute paths for a start. In this regard, the klibc-dev package is broken and
needs fixing. It will currently break when building for one machine, then switching
to another of the same TUNE_PKGARCH and installing from sstate but that is a
separate issue.

This patch fixes the symlink creation code by firstly passing in the correct
value we need (where the symlink will end up) and seccondly, actually using it.

I've also tweaked the debug message to contain appropriate information and got
right of the double "//" value the existing code created in favour of the form
'./..' which looks neater.

(From OE-Core rev: 9b05c65450526522d7358d0c0901b594de546748)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-23 17:29:33 +01:00
Joe MacDonald 4d326e5edf sstate.bbclass: Add an extra check for sstate_mirrors
BB_NO_NETWORK disables any fetching, however if we're using an external
sstate cache, we may want to be able to fetch those objects even if we are
not fetching the upstream sources.  Denote this situation by setting
SSTATE_MIRROR_ALLOW_NETWORK in local.conf.  When it is found, for sstate
cache fetches, mask off BB_NO_NETWORK for the local function.

(From OE-Core rev: ed585cad2e1fdc323c05fa82055a071bcf98d1bc)

Signed-off-by: Joe MacDonald <joe.macdonald@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-05 15:34:26 +01:00
Christopher Larson 00c8834293 sstate.bbclass: fetch archive+siginfo in a single pstaging_fetch
This avoids unnecessary duplication of setup. The only visible change in
behavior will be the case if siginfo exists and the archive does not, in which
case it'll redownload both, but this doesn't seem unresasonable to me,
particularly since the archive is downloaded first, making this case
particularly unlikely.

(From OE-Core rev: aa4991c307d4bbdd06c3cbf8448240b74c5e01c4)

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

(From OE-Core rev: 46402b2f5b69004751f6663d435bedae0ad9dab1)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-11 15:56:01 +01:00
Richard Purdie 7bf5c38e0f base/useradd/sstate: Ensure do_package setscene has correct fakeroot dependencies
The do_package_setscene task needs to depend on fakeroot in order to correctly
install its files.

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

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

(From OE-Core rev: 0810ea2a72bdea67a3d8002c4e12fb20f45cf1d5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-07 17:52:08 +01:00
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
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
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
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
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
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
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 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
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 6c6f6b7ffd sstate.bbclass: Ensure build directory is cleaned to start with
This directory is cleaned upon completion however if a previous build
crashes, it can lead to corrpution, hence ensure its clean at the start
too.

(From OE-Core rev: 8ef0e59d5a7da3671d1ad9a54fe068ed78f928d5)

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

(From OE-Core rev: 8e373e69acac853213a62afb8bbdf0adc0c5045a)

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

(From OE-Core rev: 3917409004a830e7ad0646f05ad7421385cbd1de)

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

(From OE-Core rev: 784ca68fcca4ffb34390d55d9343570cfdf0305f)

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

bitbake xxxx-image -c rootfs

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

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

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

(From OE-Core rev: 6107ee294afde395e39d084c33e8e94013c625a9)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-25 12:42:47 +00:00
Martin Ertsaas 2c7bba51a6 sstate: Do not add the --no-run-if-empty arguement to xargs when on Darwin, as it is not supported.
(From OE-Core rev: 73b34d43633717b99e4f2f669939939cfa59eecb)

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

[YOCTO #3674]

(From OE-Core rev: ccef1cf783669a4683eda9d4b44dbe6bcf426259)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-09 15:05:26 +00:00
Richard Purdie 1e548a7fc7 sstate.bbclass: Improve stamp-extra-info task handling to avoid warnings
If you change a machine to a different package architecture, you will see sstate
errors about overwriting files as the code stands today. Instead it should clean
out the files safely and correctly. This patch changes the naming of stamp-extra-info
manifest files to avoid this problem. It will potentially trigger warnings during
builds in existing TMPDIRs until the system adjusts to the new naming, these are
harmless.

[YOCTO #3521]

(From OE-Core rev: 2cc8ee57f8148844bb7bcd4aaf34f6891cf3d410)

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

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

(From OE-Core rev: 9817e2efdb94395655d711f5eadedcd249c8cffe)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-17 17:24:57 +00:00
Saul Wold d3154aa9f8 sstate: fix typo
(From OE-Core rev: 17d27fd6e2750e6455f656159da56c3350c4b3cd)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-06 22:59:10 +00:00
Richard Purdie dd3ad7f7f3 sstate: fix typo
(From OE-Core rev: 10cceb3854acd5c619d81011bac02da11ed580d2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-06 16:36:08 +00:00
Saul Wold 97a91e81ea sstate: fetch .siginfo files from SSTATE_MIRROR
This would be useful for doing siginfo compares to understand why a build
is not reusing something when using SSTATE_MIRROR. No error will be reported
if it fails to find the .siginfo file

[YOCTO #2898]

[RP: Small tweaks]
(From OE-Core rev: 6d86690330f0d43839b904fced4b4b02cb27b8c6)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-06 12:31:19 +00:00
Martin Jansa 381c4b69c7 sstate.bbclass: fix detection of owners matching sstate files
* without this patch:
  Python 2.7.3
  >>> sstate_search_cmd = "grep -rl /OE/jansa-test/shr-core/tmp-eglibc/pkgdata/armv7a-vfp-neon-oe-linux-gnueabi/runtime-reverse/vim-common /OE/jansa-test/shr-core/tmp-eglibc/sstate-control --exclude=master.list | sed -e 's:^.*/::' -e 's:\.populate-sysroot::'"
  >>> cmd_array = sstate_search_cmd.split(' ')
  >>> search_output = subprocess.Popen(cmd_array, stdout=subprocess.PIPE).communicate()[0]
  grep: |: No such file or directory
  grep: sed: No such file or directory

* Adding shell=True and using cmd string instead of array makes it work:
  >>> search_output = subprocess.Popen(sstate_search_cmd, shell=True, stdout=subprocess.PIPE).communicate()[0]
  >>> print search_output
  manifest-armv7a-vfp-neon-gvim.package
  manifest-armv7a-vfp-neon-vim-tiny.package
  manifest-armv7a-vfp-neon-vim.package

  But still isn't 100% reliable, I guess it's caused by some other package
  being removed from sstate while grep is already running.
  So sometimes grep can show error on STDERR
  >>> search_output = subprocess.Popen(sstate_search_cmd, shell=True, stdout=subprocess.PIPE).communicate()[0]
  grep: /OE/jansa-test/shr-core/tmp-eglibc/sstate-control/manifest-armv7a-vfp-neon-systemtap.package: No such file or directory

(From OE-Core rev: d84f7d7a12b4271f7b2bfde9fb356d750abff15d)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-05 15:34:07 +00:00
Enrico Scholz 306761b026 sstate.bbclass: fixed file-conflict check
The value of subprocess.Popen().communicate()[0] is a string.
Checking for '!= None' will always match causing bogus warnings
regarding already staged files.

(From OE-Core rev: acdd76482efc3caf80e9e0b7359be7ca724ae09a)

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-05 15:34:06 +00:00
Richard Purdie 13ecfdb331 packagegroup/allarch: Convert to use allarch class
Currently there is some odd behaviour of the packagegroup class in relation
to sstate since it sets PACKAGE_ARCH = "all" but does not use the allarch class
leading to it being undetected by sstate.

Previously it was not possible to use allarch as the recipe couldn't "undo"
settings made by the allarch class. Since this no longer happens when
PACKAGE_ARCH != all, we can use the allarch class.

This patch also fixes up one case we need to preserve TRANSLATED_TARGET_ARCH
and ensures sstate only assumes allarch when PACKAGE_ARCH is "all".

(From OE-Core rev: 591fa7c1ab9e9ff75fdce602c77ecdeda3a255d9)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-26 10:01:24 +00:00
Richard Purdie 4fbcd2403f sstate: Explicitly define populate_sysroot task relationships
Clean up and clarify the populate_sysroot task dependencies. Target sysroot
packages do need their dependencies installed, as do some target/cross
relationships. We can whitelist the *-initial dependencies as these are
never needed indirectly.

(From OE-Core rev: eeec307917234d97be2674beeadef71599fb1487)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-24 15:12:28 +00:00
Richard Purdie 4b45039be4 sstate: Add a rule for target sysroot requirements from cross dependencies
For example gcc-cross depends on linux-libc-headers and needs it to be present
to build/work correctly.

(From OE-Core rev: 43ce7a1d86bf82d976ad241057a4207b1a340b3b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-24 15:12:28 +00:00
Richard Purdie f32ef56cda sstate: Implement a setscene dependency validation routine to allow skipping of some sstate installation
This is a first attempt at logic to determine when a sstate dependency needs
to be installed and when it does not. Its a start at the logic and errs on the
side of caution, as it gets wider testing, we can refine the logic as needed.

This code should allow a significant performance speedup to certain workflows, for
example "bitbake xxx-image -c rootfs" will not populate the target sysroot.

(From OE-Core rev: b43faba37816817edc5240a139361d16e07c6131)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-20 15:31:49 +00:00
Richard Purdie 2c82669988 sstate: Drop now unneeded python whitelist entries
(From OE-Core rev: 2a9a3e5e3e9229eb11f20eeabef7929014bccd11)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-18 16:42:07 +00:00
Richard Purdie 9e0d3c0faa sstate: Bump version number to deal with layout fixes
The recent preveeding sstate directory layout fixes made the code do what it
was originally intended to do, as can be clearly seen from the code.
Unfortunately this changed the contents and layout of the sstate files
themselves since the bug was leading to a directory prefix being missing.

This is now resulting in chaotic messages on the console since things
are getting confused with the two different layouts. The simplest way to
resolve this is to bump the version number, hence moving the new layout
into its own new namespace.

Its worth noting that whilst the failure messages are scary, the failure
mode is relatively harmless since it will just fall back to building the
data rather than installing from sstate.

Usually I'd give more notice of a change like this but under the
circumstances, I'm just going to push this in to resolve the failures
people are seeing. Initially I thought the problem was limited to
some of the -cross packages and therefore of low impact but that is
clearly not the case.

(From OE-Core rev: b53ea6687b6201c8c5ab5cb0d2a845ef7e7b2abe)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-14 23:37:45 +00:00
Richard Purdie aa75269454 sstate: Fix various path manipulation issues
Fix missing parameter to endswith and pass paths through normpath to remove
any duplicate "/" characters which would corrupt other calls like basename.

(From OE-Core rev: 172a74c540378149eec493c37c030e9f42f9603d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-14 15:58:08 +00:00
Richard Purdie 19ecc264f8 sstate: Be consistent about sstate-inputdirs/outputdirs ending with '/'
The manifest file can become corrupted if sstate-inputdirs and sstate-outputdirs
don't have matching endings. This patch ensures that even if set incorrectly,
the code functions as intended, thereby handling manifest corruption safely.

(From OE-Core rev: 0109a3623a19f9ae289952a4f054e53c3eca4eaa)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-14 14:38:28 +00:00
Saul Wold 6ec5640e59 sstate: add manifest info for shared file matches
Present the manifest file that contains the matches for
files being installed to a location that already contains
that file. This will help to determine which is the correct
recipe to fix when this occurs.

[YOCTO #3191]

(From OE-Core rev: 56268f6e4ed1fc11143173bb1717a8be78c728a5)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-27 09:44:58 +01:00
Richard Purdie 50247c8f6e sstate: Improve handling of machine specific manifests
Now do_package isn't machine specific, we're only left with do_populate_sysroot as a
machine specific task. This change marks only the machine specific manifests as machine
specific, defaulting to PACKAGE_ARCH for everything else.

This means we do less work where there are multiple machines using the same
core package architecture and we can start to clean up the sstate duplicate files
whitelist.

(From OE-Core rev: febeaf3d1b8917b660c7279b008d8b03337568e9)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-22 09:47:48 +01:00
Ross Burton 3bf1848cb7 sstate: when warnings about sysroot overwrites, say what the recipe was
(From OE-Core rev: 936e2868bb9973213630477ab9c880dbdf4aac09)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-18 12:13:50 +01:00
Richard Purdie 2d89cff42a sstate: Use -m option to tar when unpacking sstate
We've noticed failures on the project autobuilders where a shared sstate
directory is used across multiple builders and the clocks become skewed.

Most of the time this causes harmless building but if this happens where
an environment is changed (make install vs make in qt4-x11-free for example),
the build can fail.

This avoids modification times in the future and should make builds safer
in shared environments sstate was designed for.

(From OE-Core rev: 8f1bdb4f4afd7f5f4c121be8ba82f4675f73e300)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-18 12:13:43 +01:00
Richard Purdie 792ae8d597 sstate: Also add datadir/sgl to sstate whitelist to avoid openjade warning
(From OE-Core rev: e0ff54db5a5ab171ee1d0dbcf7f267235c21e601)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-08 09:23:57 +01:00
Richard Purdie 415be864ab sstate: Add extra entries to the sstate duplicate files whitelist
This avoids errors where gcc/binutils get installed to the native sysroot
in the same location for multiple package architectures. Ultimately making
these native recipes with ${PACKAGE_ARCH} appended to PN will resolve this
but hide the warnings until this gets sorted out.

Also hide the python and docbook catalog warnings since they're known about,
nothing to worry about and we'll aim to clean them up properly in the 1.4 cycle.

(From OE-Core rev: 5bae58a5b59c04d8947f4842f19837a914c29b52)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-05 16:18:26 +01:00
Richard Purdie ab8d981727 sstate: Normalise paths before comparing with the whitelist
Without this, path components like // could break comparisions with the whitelist leading
to warnings being displayed to the user unintentionally.

(From OE-Core rev: d3c46ca56fab2f07bf16b61514f30765543a8747)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-05 16:18:26 +01:00
Richard Purdie edb2890f1c sstate: Relax the duplicate file whitelist for now
do_package is a machine specific task at the moment due to packagedata. This means
do_package tasks and their dependencies rerun between different machines
with various duplicate file installations. There are plans to fix this but they're
too invasive before release.

This patch relaxes the whitelist for sstate duplicate file detection to account
for this. Post-release, we re-enable stricter settings once do_package is not
machine specific.

(From OE-Core rev: c858259ce1881c6284f1fc2790c225c81e4a751e)

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>
2012-09-28 11:07:42 +01:00
Richard Purdie 9eacffe137 sstate: Remove master manifest usage
This was added to allow detection of duplicate files being installed by sstate.
There is a much simpler way, just check if the file already exists. This
effectively uses the kernel VFS as the cache which is much more efficient.

This resolves a significant performance bottleneck (lock contention on a
single file) when running builds that are just being generated from sstate
cache files.

(From OE-Core rev: 603daf343ad3f18c8adb799e3625ae2a18d94f56)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-26 15:02:25 +01:00
Richard Purdie 8593c6c1d8 sstate: Fix SSTATE_DUPWHITELIST variable usage
We need to split this variable before using it. Otherwise a single "/"
character in the list whitelists every overlapping sysroot file which
was not the intention making the whole thing useless.

We'll start seeing warnings about overlapping files now this is working
correctly after this patch.

(From OE-Core rev: 9e31c748327e92b809330f4ad7b6aaecb2edf559)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-26 15:02:25 +01:00
Richard Purdie 5a71f25825 sstate: Append to EXTRASSTATEMAPS and add comment
Appending to EXTRA_SSTATEMAPS is better than just hardcoding a value. Also
add a comment about why this is necessary.

(From OE-Core rev: d4f4a57b8d564d57256017d937ed2eabf94c36ae)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-12 14:24:38 +01:00
Richard Purdie 1c64c6b300 sstate.bbclass: Remove hardcoded task mappings
I've not idea why this got left in but as per the comment, it needs fixing
and we shouldn't have hardcoded mappings like this. Lets remove it
and dynamically generate the data instead.

[YOCTO #3039]

(From OE-Core rev: 2df064ad46c1510fa8a401c22db4ab3278c3c807)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-02 05:52:06 -07:00
Richard Purdie 9ba1e33e2d sstate: Ensure master.list exists if it doesn't already
This fixes builds where master.list doesn't already exist. This
change was meant to be part of the previous sstate commit but ended
up separated.

(From OE-Core rev: c2109b765b24a7ffe4781257ad3fe4641a3b2a49)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-30 22:45:56 -07:00
Richard Purdie 59260f952f sstate.bbclass: Detect overwriting files in sstate controlled directories
We have a potential problem where two sstate packages try and touch the same
file. This adds code which will print a warning whenever this happens.

The implementation does but by maintaining a master file list and comparing
file accesses against this. There are a number of places we have duplicate
accesses which are harmless, mostly in the deploy directory so these
are whitelisted.

For now the code prints warnings, this could be strengthened in future to
become error messages. Whilst working on this code on and off over the past
few months various issues were uncovered, some serious.

[YOCTO #238]

(From OE-Core rev: 1f1b6f93d6b7aa8c9bd9bb5b1826997812e36932)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-30 17:44:06 -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 72ab2866e1 sstate.bbclass: Add a string representing the lsb release to native/cross sstate
This patch adds the lsb name and revision to the path used for sstate files.
This means that reuse of sstate files between different distributions is restricted
by default. The behaviour can be configured using mirror urls, for example:

SSTATE_MIRRORS = "file://Ubuntu-11.10/(.*) file://Ubuntu/\1 \n"

would map Ubuntu 11.10 to a more generic "Ubuntu" named sstate feed.

Usually, more modern distros have increased libc versions for example
so whilst more older native/cross sstate packages will usually work on newer
distros, the opposite is not true. This patch allows development of policy
to better handle this although no default policy is currently being used.

(From OE-Core rev: 9360fc318cec5c873b17f59b817dd6312c81ee27)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-28 09:20:53 +01:00
Richard Purdie 2045338ab4 sstate: Add a two character subdirectory to the sstate directory layout
Currently all sstate files are placed into one directory. This does not scale and
causes a variety of filesystem issues. This patch adds a two character subdirectory
to the layout (based on the first two characters of the hash) so that files
can be split into several directories.

This should help performance of sstate in most cases.

(From OE-Core rev: 5d45c7b025f6635b2232d7bf92b7c1aba350396b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-28 09:20:53 +01:00
Richard Purdie e18ae61b60 sstate: Set SSTAGE_PKGARCH for allarch packages to allow reuse
allarch sstate packages could be marked as machine or package_arch specific. This
change ensures they are not.

(From OE-Core rev: f3104240ad5bb542c339ee29b2672523ad3ae50c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-22 11:42:23 +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 72df57b3a5 sstate.bbclass: Move crosssdk before cross to ensure correct variables are set
There was a bug showing up where the crosssdk recipes were being installed as machine
specific in the sstate-control directory. This turned out to be due to the architecture
fields used by sstate being set incorrectly. The problem is that the crosssdk inherits
the cross class. It therefore needs to be listed in this if statement block before
the cross check, not after.

This should resolve some package architecture issue of crosssdk sstate files.

(From OE-Core rev: 79fe28e6033273f9632ca7549d1599d3fd1463ef)

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>
2012-07-17 10:53:57 +01:00
Robert Yang e40995e569 meta: replace os.system with subprocess.call
Replace os.system with subprocess.call since the older function would
fail (more or less) silently if the executed program cannot be found

More info:
http://docs.python.org/library/subprocess.html#subprocess-replacements

[YOCTO #2454]

(From OE-Core rev: a07d03cc6f67c88feb9813ae7deb6e4a93552dfe)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-30 12:04:45 +01:00
Mark Hatle f24d8df3af sstate.bbclass: Make sure we don't have an empty fixmepath file
Jason Wessel noticed that a package without any fixmepath entries would
generate a sed warning about no input files.  This patch resolves that
by ensuring that an empty fixmepath file never gets written into the
sstate archive.  Also we avoid a second message by only doing xargs if
we got input.

(From OE-Core rev: 326563d5a897ae2dba7cfd8d73579d3d979d72c8)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-18 15:25:13 +01:00
Joshua Lock 441c1f8faa meta/classes/sstate.bbclass: ensure sstate files have group R/W
In order to make sharing sstate files easier chmod them with 0664 permissions	so that they are readable and writable by the user and any other members of 	their group.

(From OE-Core rev: dae9ad8a0ba0343e3083694cdcb20f0d02927ad0)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-17 21:13:08 +01:00
Mark Hatle 75fcc7c806 sstate.bbclass: Optimize the generation and install path fixups
The fixmepath file that is generated contains a list of all of the files
that need their paths fixed.  In the previous version the fixmepath was
generated to include all of the files that sed may have changed.  In the
new version, we first grep the files to see if they contain a path that
needs to be changed, only then do we perform the sed operation on those files.

This results in a modest performance increate in the creation of the sstate
file.  The following numbers include the do_package and do_populate_sysroot
tasks on the perl recipe.

Before the change:
real    4m23.018s
user    1m57.067s
sys     1m33.327s

After the change:
real    4m13.083s
user    1m54.062s
sys     1m26.064s

However, a more significnt performance gain is felt during the
extraction/install of sstate cache files, as the fixmepaths file now has a
significantly smaller list of files to modify.

Before the change:
real    0m39.798s
user    0m11.158s
sys     0m12.642s

After the change:
real    0m25.511s
user    0m8.408s
sys     0m5.077s

(All numbers above were recorded with a cold filesystem cache on a machine
with 12 GB of ram.)

(From OE-Core rev: 46067264bedeff8248a2b2441733420fe6651f84)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-15 19:06:06 +01:00
Mark Hatle b85bbc52d3 sstate.bbclass: Improve sstate_installpkg performance
In a pathological case, lots of files to process, the sstate_installpkg
performance was very poor.  It interated over each file and ran 3
individual sed commands per file.  Changing this to keep iterating
but running only a single command took about 1/3 time time.

However, when looking at the corresponding sstate_hardcode_path
function, it was clear we could optimize this further.

Using the same encoding logic to specify only the minimumal sed
operation necessary, and using xargs to avoid the os.system call the
install step was able to be performed in 13% of the original time.

Example timing numbers for perl:

3m7s original code
1m20s single sed, but interating
0m26s using xargs and limited sed

(From OE-Core rev: d9f655753fbdc8cbd8e705577430fed4f23732b3)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-11 18:00:27 +01:00
Richard Purdie bb1d7fad7f Revert "bitbake.conf/sstate.bbclass: Change PATH when installing sstate files to avoid issues"
Reluctantly revert this since it breaks the tar-native workaround we have
for old versions of tar :(

This reverts commit 01218e29f9.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-23 12:29:57 +00:00
Richard Purdie 8dbbbffa11 sstate.bbclass: Remove possibility of file corruption and make package writing atomic
There is currently a race window when creating sstate packages since we don't
atomically write the files to SSTATE_DIR. This change ensures we do so by writing
to a temporary file and then doing an atomic move.

(From OE-Core rev: 52bf113e786a57123a9da98f64442afbc2f1471e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-23 12:29:56 +00:00
Richard Purdie 01218e29f9 bitbake.conf/sstate.bbclass: Change PATH when installing sstate files to avoid issues
This resolves issues related to pigz-native when installing from sstate that people
have been seeing. It also gives us a way to solve issues like the gzip-native race
during sstate package creation covered in Yocto #1774.

(From OE-Core rev: 518dffe20178f5969dddccb17d6ab347afb72beb)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-21 15:33:07 +00:00
Richard Purdie b1aeaa8b0d meta: Replace bb.data.expand(xxx, d) -> d.expand(xxx)
sed \
 -e 's:bb.data.\(expand([^,()]*\), *\([^) ]*\) *):\2.\1):g' \
 -i `grep -ril bb.data.expand *`

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-05 10:23:53 -08:00
Richard Purdie 22f0df2aa7 sstate: Remove unecessary bb.data.expand()
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-05 10:23:20 -08:00
Richard Purdie d01dadfb87 meta/classes: Convert to use appendVar and appendVarFlags
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-05 10:22:36 -08:00
Martin Jansa db94ad4cf3 sstate.bbclass: improve performance of sstate package creation
* also fixes replacing paths for perl where cmd line was probably
  too long for os.system(cmd) (it had 560410 characters because a lot of
  files from sstate_scan_cmd).
* also print those 2 commands so we can find them in log.do_package

(From OE-Core rev: 94c52d68fc2ce258bcc5b0978ac73413480a1a93)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-24 17:06:57 +00:00
Martin Jansa 30b709c50c sstate.bbclass: add *_config to SSTATE_SCAN_FILES
* e.g. mysql5 has mysql_config not mysql-config

(From OE-Core rev: aebdffc93ba8446bbd4e20263f0f75d4d4460c47)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-23 23:53:02 +00:00
Richard Purdie d60912993d sstate.bbclass: Optimise sstate_hardcode_path
The sstate_hardcode_path() function triggered large numbers of exec()
calls when processing packages with large numbers of file relocations
(e.g. perl). This patch optimises those calls into longer single commands
which make the code significantly more efficient.

This reduced the do_package time for perl by 2 minutes (from 4.75 minutes)
for me.

(From OE-Core rev: 4159ff761cf29a03aeb56c7686a4e7af02b52219)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-10 14:38:45 +00:00
Richard Purdie 9a58e312ef sstate.bbclass: Add support for sstate preinst functions
(From OE-Core rev: f2b0a71b3100a0d2ceb80300d7f3823a31eb907a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-27 09:40:07 +00:00
Richard Purdie 6b2027da12 sstate: Add SSTATE_SCAN_FILES
We process all files in the native/cross cases for finding and
fixing relocation issues. In the target case we've only processed
.la and binconfig files. Since there are other files which are
in need of this processing, this change allows recipes to specify
files that may be outside the normal set. This means hardcoded
paths that need to be fixmepathed to work correctly are handled
and addresses some sstate relocation bugs that have been seen.

Based on a patch from Saul Wold <sgw@linux.intel.com>

(From OE-Core rev: 6ffdcd9120b572fa41659029c3bda7bf00ebcb77)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-12-15 14:36:24 +00:00
Richard Purdie 0a434ac101 getVar/setVar cleanups
Complete the bb.data.getVar/setVar replacements with accesses
directly to the data store object.

(From OE-Core rev: 2864ff6a4b3c3f9b3bbb6d2597243cc5d3715939)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-27 10:25:34 +00:00
Richard Purdie 85162b7463 sstate.bbclass: Ensure we expand stamp-extra-info
Without this change we can end up looking for <stamp>.${MACHINE}
instead of the expected expanded value.

(From OE-Core rev: 9f743b5033177216fe0e1d3e43ba831f356df08e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-21 16:48:52 +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
Richard Purdie 439792ea5f sstate.bbclass: Ensure machine specific stamps are only wiped for the current task
sstate was being a little too ethusiastic about removing stamp files and
was removing stamp files for other machines when it shouldn't have been.

This patch teaches sstate about machine specific stamp extensions and
allows it to only remove the current task's stampfiles.

Based on a patch from Phil Blundell <philb@gnu.org> with some tweaks
from me.

(From OE-Core rev: 5e9488495401399d39fcb5012b86c313b6caca73)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-10-07 11:35:43 +01:00
Richard Purdie 1750e9018f sstate: No need to spew out a debug message per file, summarise instead
(From OE-Core rev: c7b02c6e80819e30a0818282ab8d960243a2d0e8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-26 17:56:43 +01:00
Richard Purdie 129c98c182 sstate: Avoid contention between sstate packages
If several sstate packages are decompressing at the same time, they can
conflict over the "fixmepath". If two packages try to write to this at
the same time it results in an error. To avoid this we remove the file
once we've finished processing it.

(From OE-Core rev: c08d7093bf654ffedb155c5627972e9ecfeb0b60)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-07 23:39:59 +01:00
Richard Purdie 6ede105953 sstate: Add level 2 debug so its possible to see what sstate is doing
Currently its hard to figure out if/when sstate is checking for possible
packages to speed up builds. This patch adds level 2 debug output which
better indicates what files are being searched for an why.

[YOCTO #1259]

(From OE-Core rev: a752b23767189f2678367e47ca0b41f49c56a631)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-08-11 19:08:02 +01:00
Richard Purdie 5aa96bd0ef bitbake.conf/classes: Variable cleanup
This patch removes the variables BASE_PACKAGE_ARCH, BASEPKG_HOST_SYS,
BASEPKG_TARGET_SYS and also removes the immediate assignments in
several core classes as these are no longer required.

This should make it clearer what some of the core variables do and
simplfy some overly complex and confusing class code.

(From OE-Core rev: d5521be2dcbaf213c140b0d12a4176380874426b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-25 14:36:30 +01:00
Richard Purdie edb2423085 sstate: Improve performance by moving files rather than using copy and delete
Acked-by: Joshua Lock <josh@linux.intel.com>
(From OE-Core rev: c5913c644d10470e2c3c8b55cf044995fc109d87)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-12 15:00:45 +01:00
Mark Hatle dd31ff210a sstate.bbclass: Fix an issue if the config changes
We need to check if we know of the task type, before we attempt
to process it.  In order to reproduce the problem build with:

PACKAGE_CLASSES = "package_ipk"

Then change it to:

PACKAGE_CLASSES = "package_rpm"

Build again -- and then try bitbake -c cleansstate <recipe>

(From OE-Core rev: 8870ba9d261d3cacbe5d1219fdd95840c05ecf9e)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-29 14:46:52 +01:00
Richard Purdie 1d2f3957b5 classes/conf: Drop MULTIMACH_ARCH variable, it adds unused complexity and serves no useful purpose
(From OE-Core rev: e623d3015bbdeb2b42b9763937be899a1fa9c0ca)

Signed-off-by: Richard  Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-28 13:55:39 +01:00
Richard Purdie 3dc2615e1a sstate.bbclass: When removing files, take an exclusive lock, even for shared lockfiles
(From OE-Core rev: 4a3e94c2ec014a8aef5e8ebb21bdbdf8d28416b3)

Signed-off-by: Richard  Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-09 15:48:26 +01:00
Khem Raj 673c85a8c0 sstate.bbclass: Reduce SSTATE_MANIFESTS assignment to be weak
Distributions can then override this variable if needed
useful e.g. when building uclibc/eglibc both using
same tmpdir

(From OE-Core rev: 839e6e7f3717cc69cf8fc5b1c51bac63ec00655e)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-04-28 10:44:36 +01:00
Dexuan Cui 7ddc746e5a sstate: ensure an ordered mapping between SSTATETASKS and SSTATETASKNAMES
Fix [YOCTO #964]

A recent commit 25a6e5f9(sstate: use only unique set of SSTATETASK) breaks
the ordered mapping between SSTATETASKS and SSTATETASKNAMES. As a result,
in sstate_cleanall, the line
taskname = tasks[namemap.index(name)]
gets an incorrect result, and "bitbake -c cleanall" doesn't really remove
the files populalted by do_populate_sysroot.

(From OE-Core rev: 2f6505f0e795b6c8cad641a6918739c3faac1f99)

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-04-08 06:14:54 -07:00
Richard Purdie 2f0c06a452 sstate: Add support for taking shared lockfiles
(From OE-Core rev: c411a10e06f479ff364c07766f7c77907b7b4a16)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-03-29 14:01:51 +01:00
Martin Jansa 25a6e5f98c sstate: use only unique set of SSTATETASK
* otherwise strange error like this:
  ERROR: Logfile of failure stored in: /OE/shr-core/tmp/work/armv7a-oe-linux-gnueabi/libtool-cross-2.4-r1/temp/log.do_package_write_ipk.25551
  Log data follows:
  | ERROR: Package already staged (/OE/shr-core/tmp/sstate-control/manifest-nokia900-libtool-cross.deploy-ipk)?!
  | ERROR: Function 'sstate_task_postfunc' failed
  NOTE: package libtool-cross-2.4-r1: task do_package_write_ipk: Failed
  ERROR: Task 11 (/OE/shr-core/openembedded-core/meta/recipes-devtools/libtool/libtool-cross_2.4.bb, do_package_write_ipk) failed with exit code '1'

  is shown in this case with package_ipk twice in INHERIT

* Thanks to Richard for fix

(From OE-Core rev: f2fe5e840b8aa0558b5462ef2c7517b2f14ec2ea)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-03-24 12:33:38 +00:00
Richard Purdie 273cfeccb7 sstate: Ensure a clean removes setscene stamps as well as the main task stamps
(From OE-Core rev: d07fe8aef537a8bcb96a802e18d7c980ff4c5ce2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-03-19 01:16:32 +00:00
Richard Purdie 16e1f1051e sstate.bbclass: Turn absolute symbolic links into relative ones for sstate packages
(From OE-Core rev: 655139c2644d085331f4f6814119fbd904ff244b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-03-18 23:23:29 +00:00
Paul Eggleton ed1cbc9fa8 sstate.bbclass: always delete stamp files in sstate_clean
For safety, always delete the stamp files in sstate_clean regardless of
whether the manifest file exists or not.

(From OE-Core rev: f781c35da9a11eefdb06bda72ca89753df863efa)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-03-15 13:20:48 +00:00
Paul Eggleton cbbf658041 sstate.bbclass: avoid deleting unrelated stamp files
Avoid deleting stamp files whose names contain the current task's name as a
substring. This will be especially important for example if do_package_write
is ever made an sstate task (as it would previously have deleted the stamps
here for do_package_write_ipk etc.)

(From OE-Core rev: ea743ea30e2289733d27979e8ec921648342da0e)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-03-15 13:20:47 +00:00
Richard Purdie fc1b893d1a sstate: Ensure the SRCURI fetcher cache is not used for sstate
(From OE-Core rev: 115b3b95e87320b4a6a678df45fece06469dfaeb)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-03-08 11:19:42 -08:00
Scott Garman fa6e786082 sstate.bbclass: add SSTATEPOSTINSTFUNCS
When doing builds using sstate cache, there was no way to run
the equivalent of a pkg_postinst function. This is needed by
the SGML-related documentation recipes to properly update the
catalog files when new DTDs and stylesheets are installed.

SSTATEPOSTINSTFUNCS is a new variable you can set to function(s)
in your recipe to run after install is completed from sstate.

Thanks to Richard Purdie for suggesting this solution.

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
2011-02-23 15:52:51 +00:00
Zhai Edwin 49a18f1748 sstate: Fix bugs after new fetcher
Current sstate's fetch code doesn't reflect latest fetcher changes, so old
fetch style cause exception and fail silently.

[BUGID #708] got fixed.

Another issue is "import xxx" in python function from sstate.bbclass can only
sit in the head of the function, else have UnboundLocalError: "local variable
XXX referenced before assignment".

Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
2011-02-11 14:07:49 +00:00
Richard Purdie 984e90f4d7 meta/classes: Update classes to use new fetcher API
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-07 09:06:37 +00:00
Richard Purdie 9b2fd4b0fe license.bbclass: Add coverage by sstate code (also use cleandirs and dirs task attribures for directory handling)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-03 12:33:18 +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 c7ad2dada7 sstate: Ensure stale stamp files are removed as part of sstate_clean()
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-01-28 10:28:06 +00:00
Richard Purdie 754047b6ec sstate.bbclass: Fix stupid typo
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-01-27 23:26:10 +00:00
Richard Purdie 021cf7dabf sstate.bbclass: No need to dump the contents of the sstate package to stdout
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-01-27 22:38:11 +00:00
Richard Purdie bb7a42ee4e sstate.bbclass: Handle whitespace in the list of files to 'fixup' to resolve log warning
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-01-27 22:34:52 +00:00
Richard Purdie 8a6e8623b4 sstate.bbclass: Optimise to check if the manifest exists without taking locks
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-01-27 20:52:33 +00:00
Richard Purdie 4c55d2bd04 sstate.bbclass: Correctly handle empty sstate packages
Signed-off-by: Richard  Purdie <richard.purdie@linuxfoundation.org>
2011-01-26 12:02:30 +00:00
Richard Purdie 222796ed93 sanity/sstate: Due to the sysroot layout changes, the toolchain bootstrap process changes and the recent pseudo bug, bump the tmpdir layout version number and the sstate version numbers
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-01-25 12:32:50 +00:00
Yu Ke e2ac26e7b1 base/sstate.bbclass: Rename fetcher "go" method to "download" when using fetch v2
Signed-off-by: Yu Ke <ke.yu@intel.com>
2011-01-25 12:25:47 +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
Dexuan Cui 46395d4856 sstate.bbclass: allow each step of toolchain bootstrap processes to do populate_sysroot independently
Some steps (like gcc-cross-initial, gcc-cross-intermediate and eglibc-initial)
will install to new locations to avoid file overwriting.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
2011-01-25 10:59:17 +00:00
Richard Purdie 542cebbc32 sstate.bbclass: Ensure clean/setscene sstate functions run under appropriate locking
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-01-19 11:48:55 +00:00
Koen Kooi ca148f4627 sstate.bbclass: fix multimachine builds when PACKAGE_ARCH = MACHINE_ARCH
previously you could only build one set of packages for multiple machines:

MACHINE=foo bitbake task-base
MACHINE=bar bitbake task-base

would only create task-base packages for foo, but not for both foo and bar.
Doing MACHINE=bar bitbake task-base -c cleanall would remove the packages for foo.

The solution is to use MULTIMACH_ARCH as suggested by Richard Purdie.

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
2011-01-04 09:46:26 -08:00
Paul Eggleton 3f814ff9c4 sstate.bbclass: delete sstate files when doing cleanall
This fixes the cleanall task to actually delete the sstage cache files. This
was not working correctly before due to attempting to use the current task's
hash in the package file name to be deleted, which of course is the hash of
the cleanall task when doing cleanall. The siginfo files are now deleted as
well.

Signed-off-by: Paul Eggleton <paul.eggleton@intel.com>
2010-12-20 17:54:16 +00:00
Dongxiao Xu 7e7bb24b85 sstate.bbclass: Remove the temp sstate-build-* directories in WORKDIR
Remove the temp sstate-build-* directoies.
Take poky-image-minimal as an example, this saves about 17% disk space.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
2010-11-14 21:08:23 -08:00
Richard Purdie 89929e1f28 bitbake/fetch: Allow checking of a single url at a time (massive sstate speed improvement)
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-11-13 20:10:53 +08:00
Richard Purdie d6e8f7d8a6 sstate.bbclass: Only create symlinks to different localpath urls if the fetch succeeded
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-11-13 20:08:23 +08:00
Richard Purdie ecf2eb1efa sstate: Provide a temporary mechanism to stop collisions between toolchain components in builds from scratch using sstate
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-11-02 13:18:07 +00:00
Richard Purdie 3f599b3f6a sstate: Fix mirror handling for file:// urls
The fetcher has special handling for file:// mirror urls, being efficient and
just providing an updated path. Unfortunately the sstate fetching code wasn't
able to handle this. This patch detects this and injects a symlink to ensure
everything works. It also fixes some datastore references to be correct and
ensures the sstate download directory exists if it doesn't already.

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-10-22 14:48:54 +01:00
Richard Purdie f806c499c0 sstate: Fix broken plaindirs support
When installing a sstate package, directories tracked by plaindirs were being installed
to the incorrect location. With the current implementation this was limited to
the do_package task.

This patch ensures plaindirs tracked files are created in the correct location, fixing
the bug where these files would go missing.

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-10-22 12:51:35 +01:00
Richard Purdie fd4457199e base/sstate: Add cleanall task to remove downloads and sstate cached files
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-10-22 10:22:34 +01:00
Richard Purdie 240b6636f9 sstate: Fix SSTAGE_MIRRORS handling and improve example in local.conf.sample
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-10-07 15:42:56 +01:00
Richard Purdie 35d095c282 bitbake/sstate: Implement a lookup function to speed up setscene processing
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-10-05 22:26:33 +01:00
Richard Purdie ca5fff3806 sstate: Deal with a potential race when cleaning packages
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-10-01 14:07:18 +01:00
Joshua Lock 62fe6dc755 sstate: list directories in child first order in the manifest file
The directory list in the manifest file needs to be sorted such that child
directories are deleted first. Fortunately as the list is generated by walking
the directory tree achieving this is as simple as reversing the directory list.

Fixes [BUGID #269]

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2010-09-29 17:10:41 +01:00
Richard Purdie 1e0e6f1185 sstate.bbclass: Add signature hash to sstate package names
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-09-29 12:12:53 +01:00
Richard Purdie 97dec8410b sstate.bbclass: Update to use SSTATE variables everywhere and remove the now unneeded complicated paths from the sstate files
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-09-29 12:12:26 +01:00
Richard Purdie dd28a9c516 sstate.bbclass: pstage -> sstate name changes (no global implications)
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-09-29 12:12:26 +01:00
Richard Purdie 7087fb788a sstate.bbclass: Rename PSTAGE2 -> SSTATE
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-09-29 12:12:26 +01:00
Richard Purdie e888596636 sstate: Trigger generation of siggen info when building sstate packages
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-09-13 15:41:07 +01:00
Jeff Polk 27dd7f82c9 sstate: Add sstate-interceptfuncs called between install and package
Adds the ability to impose intercept function call(s) after
sstate_install and before sstate_package in sstate_task_postfunc.

Signed-off-by: Jeff Polk <jeff.polk@windriver.com>
2010-09-10 12:55:34 +01:00
Richard Purdie e8fdc98779 sstate: Make sure the sstate function is the last to run, not the first
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-09-07 15:16:31 +01:00
Richard Purdie a6ce10e83e sstate: Handle symlink directory entries correctly
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-09-03 15:28:27 +01:00
Kevin Tian e055544ce1 sstate: fix dir name in manifest
dir name in manifest is incorrect:

/media/disk/builds/master-arm/tmp/sysroots/usr/
/media/disk/builds/master-arm/tmp/sysroots/lib/
/media/disk/builds/master-arm/tmp/sysroots/include/

Also add one debug note when removing manifest entries

Signed-off-by: Kevin Tian <kevin.tian@intel.com>
2010-08-31 16:38:20 +01:00
Kevin Tian 03983e9647 sstate: make do_cleanup really working
there's a bug in creating manifest_pattern, which means actually with
new sstate do_cleanup hasn't worked yet

We can use PSTAGE2_MANFILEPREFIX easily for this purpose.

Signed-off-by: Kevin Tian <kevin.tian@intel.com>
2010-08-31 16:37:49 +01:00
Richard Purdie 4b2a355a31 sstate/utility-tasks: Ensure do_clean functions correctly and removes shared state
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-08-27 12:33:58 +01:00
Richard Purdie 5c7531f78c sstate: Run sstate_cleanall() as part of do_setscene()
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-08-27 12:29:01 +01:00
Joshua Lock d46c362a46 sstate: fix architecture of sstate archives
Using TARGET_ARCH as the pacakge architecture for sstate archives lead to some
issues when using two machines with different BASE_PACKAGE_ARCH's but the same
TARGET_ARCH such as netbook and qemux86 machines.

Probable fix for [BUGID #223]

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2010-08-25 18:01:23 +01:00
Richard Purdie f070ee959c Rename packaged-staging2 -> sstate and remove the old empty class
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-08-19 22:48:17 +01:00