Commit Graph

228 Commits

Author SHA1 Message Date
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