summaryrefslogtreecommitdiff
path: root/meta/classes/sstate.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* sstate.bbclass: Make sure we don't have an empty fixmepath fileMark Hatle2012-05-181-5/+12
| | | | | | | | | | | | 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. 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>
* meta/classes/sstate.bbclass: ensure sstate files have group R/WJoshua Lock2012-05-171-0/+1
| | | | | | 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. Signed-off-by: Joshua Lock <josh@linux.intel.com>
* sstate.bbclass: Optimize the generation and install path fixupsMark Hatle2012-05-151-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate.bbclass: Improve sstate_installpkg performanceMark Hatle2012-05-111-7/+21
| | | | | | | | | | | | | | | | | | | | | | | 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 Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "bitbake.conf/sstate.bbclass: Change PATH when installing sstate ↵Richard Purdie2012-03-231-8/+0
| | | | | | | | | files to avoid issues" Reluctantly revert this since it breaks the tar-native workaround we have for old versions of tar :( This reverts commit 01218e29f963120c77885964702198d9bce77e11.
* sstate.bbclass: Remove possibility of file corruption and make package ↵Richard Purdie2012-03-231-2/+4
| | | | | | | | | | 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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake.conf/sstate.bbclass: Change PATH when installing sstate files to ↵Richard Purdie2012-03-211-0/+8
| | | | | | | | | | 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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: Replace bb.data.expand(xxx, d) -> d.expand(xxx)Richard Purdie2012-03-051-15/+15
| | | | | | | | sed \ -e 's:bb.data.\(expand([^,()]*\), *\([^) ]*\) *):\2.\1):g' \ -i `grep -ril bb.data.expand *` Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: Remove unecessary bb.data.expand()Richard Purdie2012-03-051-7/+7
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/classes: Convert to use appendVar and appendVarFlagsRichard Purdie2012-03-051-6/+2
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate.bbclass: improve performance of sstate package creationMartin Jansa2012-02-241-23/+16
| | | | | | | | | * 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 Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
* sstate.bbclass: add *_config to SSTATE_SCAN_FILESMartin Jansa2012-02-231-1/+1
| | | | | | | * e.g. mysql5 has mysql_config not mysql-config Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate.bbclass: Optimise sstate_hardcode_pathRichard Purdie2012-02-101-11/+16
| | | | | | | | | | | | 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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate.bbclass: Add support for sstate preinst functionsRichard Purdie2012-01-271-0/+5
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: Add SSTATE_SCAN_FILESRichard Purdie2011-12-151-1/+2
| | | | | | | | | | | | | | 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* getVar/setVar cleanupsRichard Purdie2011-11-261-7/+7
| | | | | | | Complete the bb.data.getVar/setVar replacements with accesses directly to the data store object. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate.bbclass: Ensure we expand stamp-extra-infoRichard Purdie2011-11-211-1/+1
| | | | | | | Without this change we can end up looking for <stamp>.${MACHINE} instead of the expected expanded value. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Convert to use direct access to the data store (instead of bb.data.*Var*())Richard Purdie2011-11-101-47/+47
| | | | | | | | | | | | | | | 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 *` Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate.bbclass: Ensure machine specific stamps are only wiped for the ↵Richard Purdie2011-10-061-2/+7
| | | | | | | | | | | | | | | 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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: No need to spew out a debug message per file, summarise insteadRichard Purdie2011-09-261-3/+4
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: Avoid contention between sstate packagesRichard Purdie2011-09-071-0/+3
| | | | | | | | | 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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: Add level 2 debug so its possible to see what sstate is doingRichard Purdie2011-08-111-2/+8
| | | | | | | | | | 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] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake.conf/classes: Variable cleanupRichard Purdie2011-07-251-3/+3
| | | | | | | | | | | 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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: Improve performance by moving files rather than using copy and deleteRichard Purdie2011-07-121-5/+11
| | | | | Acked-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate.bbclass: Fix an issue if the config changesMark Hatle2011-06-291-0/+2
| | | | | | | | | | | | | | | 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> Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
* classes/conf: Drop MULTIMACH_ARCH variable, it adds unused complexity and ↵Richard Purdie2011-06-281-2/+2
| | | | | | serves no useful purpose Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate.bbclass: When removing files, take an exclusive lock, even for shared ↵Richard Purdie2011-06-091-1/+1
| | | | | | lockfiles Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate.bbclass: Reduce SSTATE_MANIFESTS assignment to be weakKhem Raj2011-04-281-1/+1
| | | | | | | | Distributions can then override this variable if needed useful e.g. when building uclibc/eglibc both using same tmpdir Signed-off-by: Khem Raj <raj.khem@gmail.com>
* sstate: ensure an ordered mapping between SSTATETASKS and SSTATETASKNAMESDexuan Cui2011-04-081-2/+4
| | | | | | | | | | | | | 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. Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
* sstate: Add support for taking shared lockfilesRichard Purdie2011-03-291-0/+7
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: use only unique set of SSTATETASKMartin Jansa2011-03-241-2/+2
| | | | | | | | | | | | | | | | | * 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 Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: Ensure a clean removes setscene stamps as well as the main task stampsRichard Purdie2011-03-191-0/+2
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate.bbclass: Turn absolute symbolic links into relative ones for sstate ↵Richard Purdie2011-03-181-1/+28
| | | | | | packages Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate.bbclass: always delete stamp files in sstate_cleanPaul Eggleton2011-03-151-9/+7
| | | | | | | For safety, always delete the stamp files in sstate_clean regardless of whether the manifest file exists or not. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
* sstate.bbclass: avoid deleting unrelated stamp filesPaul Eggleton2011-03-151-1/+3
| | | | | | | | | 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.) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
* sstate: Ensure the SRCURI fetcher cache is not used for sstateRichard Purdie2011-03-081-1/+1
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate.bbclass: add SSTATEPOSTINSTFUNCSScott Garman2011-02-231-0/+5
| | | | | | | | | | | | | | 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>
* sstate: Fix bugs after new fetcherZhai Edwin2011-02-111-3/+3
| | | | | | | | | | | | | 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>
* meta/classes: Update classes to use new fetcher APIRichard Purdie2011-02-071-28/+28
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* license.bbclass: Add coverage by sstate code (also use cleandirs and dirs ↵Richard Purdie2011-02-031-0/+1
| | | | | | task attribures for directory handling) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging.bbclass: Only clean out the sysroot if we rerun configure, not at ↵Richard Purdie2011-01-281-1/+0
| | | | | | setscene time Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: Ensure stale stamp files are removed as part of sstate_clean()Richard Purdie2011-01-281-2/+6
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate.bbclass: Fix stupid typoRichard Purdie2011-01-271-1/+1
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate.bbclass: No need to dump the contents of the sstate package to stdoutRichard Purdie2011-01-271-2/+2
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate.bbclass: Handle whitespace in the list of files to 'fixup' to resolve ↵Richard Purdie2011-01-271-0/+2
| | | | | | log warning Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate.bbclass: Optimise to check if the manifest exists without taking locksRichard Purdie2011-01-271-3/+3
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate.bbclass: Correctly handle empty sstate packagesRichard Purdie2011-01-261-1/+6
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity/sstate: Due to the sysroot layout changes, the toolchain bootstrap ↵Richard Purdie2011-01-251-1/+1
| | | | | | 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>
* base/sstate.bbclass: Rename fetcher "go" method to "download" when using ↵Yu Ke2011-01-251-1/+4
| | | | | | fetch v2 Signed-off-by: Yu Ke <ke.yu@intel.com>
* bitbake: machine specific sysroots implementationDongxiao Xu2011-01-251-9/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>