<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/meta/classes/sstate.bbclass, branch 2.7_M1</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=2.7_M1</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=2.7_M1'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2018-11-23T23:35:19+00:00</updated>
<entry>
<title>sstate.bbclass: Only remove sstate file when task is existed</title>
<updated>2018-11-23T23:35:19+00:00</updated>
<author>
<name>Robert Yang</name>
<email>liezhi.yang@windriver.com</email>
</author>
<published>2018-11-23T02:37:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=871fcd2c15ab3f6a259657e32b8522ccf59f6165'/>
<id>urn:sha1:871fcd2c15ab3f6a259657e32b8522ccf59f6165</id>
<content type='text'>
This can improve the performance a lot for "bitbake &lt;recipe-native/cross/crosssdk&gt;
-ccleansstate" when there are a lot of sstate files.

For example:
* Before
  $ bitbake quilt-native -ccleansstate
  - Check log.do_cleansstate:
  Removing /sstate-cache/*/*/sstate:quilt-native:x86_64-linux:0.65:r0:x86_64:3:*_package.tgz*
  Removing /sstate-cache/*/*/sstate:quilt-native:x86_64-linux:0.65:r0:x86_64:3:*_package_qa.tgz*
  Removing /sstate-cache/*/*/sstate:quilt-native:x86_64-linux:0.65:r0:x86_64:3:*_package_write_rpm.tgz*
  Removing /sstate-cache/*/*/sstate:quilt-native:x86_64-linux:0.65:r0:x86_64:3:*_packagedata.tgz*
  Removing /sstate-cache/*/sstate:quilt-native::0.65:r0::3:*_populate_lic.tgz*
  Removing /sstate-cache/*/*/sstate:quilt-native:x86_64-linux:0.65:r0:x86_64:3:*_populate_sysroot.tgz*

  There are no package tasks for quilt-native, so the first 4 lines doesn't
  make any sense, but the glob pattern "sstate-cache/*/*" is very time
  consuming when there are no disk caches. E.g., I have more than 600,000
  sstate files:
  - Without disk caches
  # echo 3 &gt;/proc/sys/vm/drop_caches
  $ time python3 -c 'import glob; glob.glob("/sstate-cache/*/*/sstate:quilt-native:x86_64-linux:0.65:r0:x86_64:3:*_package.tgz*")'
    real    4m32.583s
    user    0m5.768s
    sys     0m12.892s

  - With disk caches (e.g., run it in the second time)
  $ time python3 -c 'import glob; glob.glob("/sstate-cache/*/*/sstate:quilt-native:x86_64-linux:0.65:r0:x86_64:3:*_package.tgz*")'
    real    0m5.128s
    user    0m2.772s
    sys     0m2.308s

  So the 4 removing *package* commands cost more than 20s or 272s in theory.

* After
  $ bitbake quilt-native -ccleansstate
  - Check log.do_cleansstate:
  Removing /sstate-cache/*/sstate:quilt-native::0.65:r0::3:*_populate_lic.tgz*
  Removing /sstate-cache/*/*/sstate:quilt-native:x86_64-linux:0.65:r0:x86_64:3:*_populate_sysroot.tgz*

  We can see that it saved 20s or 272s in theory.

(From OE-Core rev: bb2d6349ea87f090c58001f0d4348b24c2982cde)

Signed-off-by: Robert Yang &lt;liezhi.yang@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>sstate.bbclass: set SSTATE_EXTRAPATHWILDCARD explicitly</title>
<updated>2018-11-23T23:35:18+00:00</updated>
<author>
<name>Robert Yang</name>
<email>liezhi.yang@windriver.com</email>
</author>
<published>2018-11-22T11:51:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=76276d90ce7fd0effe7c517206472b9dfe0c065c'/>
<id>urn:sha1:76276d90ce7fd0effe7c517206472b9dfe0c065c</id>
<content type='text'>
The glob.glob("/sstate/*/*/") is very time consuming, set
SSTATE_EXTRAPATHWILDCARD explicity to avoid that. This can save a lot of time
when there are many sstate files.

For example, I have more than 600,000 sstate files:
* Before
  - Without disk caches
  $ time python3 -c 'import glob; glob.glob("/sstate-cache/*/*/sstate:quilt-native:x86_64-linux:0.65:r0:x86_64:3:*_populate_sysroot.tgz*")'
    real    4m32.583s
    user    0m5.768s
    sys     0m12.892s

  - With disk caches
  $ time python3 -c 'import glob; glob.glob("/sstate-cache/*/*/sstate:quilt-native:x86_64-linux:0.65:r0:x86_64:3:*_populate_sysroot.tgz*")'
  real    0m4.111s
  user    0m2.348s
  sys     0m1.756s

* After
  $ time python3 -c 'import glob; glob.glob("/sstate-cache.bak/universal/*/sstate:quilt-native:x86_64-linux:0.65:r0:x86_64:3:*_populate_sysroot.tgz*")'
  - Without disk caches:
  real    0m7.928s
  user    0m0.172s
  sys     0m0.124s

  - With disk caches:
  real    0m0.131s
  user    0m0.088s
  sys     0m0.044s

We can see that it saves about 3.8s with disk caches, and saves about 264s
without disk caches.

(From OE-Core rev: 8b31c919814b8bdf25b3381053656523c001ae0d)

Signed-off-by: Robert Yang &lt;liezhi.yang@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>sstate.bbclass: update SSTATE_DUPWHITELIST</title>
<updated>2018-09-13T06:42:28+00:00</updated>
<author>
<name>Kai Kang</name>
<email>kai.kang@windriver.com</email>
</author>
<published>2018-09-11T23:25:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=d14fb257881ab9b87fa53c68af5b09a755cb162f'/>
<id>urn:sha1:d14fb257881ab9b87fa53c68af5b09a755cb162f</id>
<content type='text'>
Update SSTATE_DUPWHITELIST in sstate.bbclass.

* remove ${DEPLOY_DIR_RPM}/noarch/ which is not overwritten any more
* add directories for package target-sdk-provides-dummy

(From OE-Core rev: 6d3ca476dbc2059f4b7fa3dfd73de6bbfed49198)

Signed-off-by: Kai Kang &lt;kai.kang@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>sstate.bbclass: make SSTATE_PRUNE_OBSOLETEWORKDIR could be overwritten</title>
<updated>2018-08-28T09:30:28+00:00</updated>
<author>
<name>Kai Kang</name>
<email>kai.kang@windriver.com</email>
</author>
<published>2018-08-24T06:29:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=cd28f5fbf72cac252a64dcee5e2c6bececc45dd8'/>
<id>urn:sha1:cd28f5fbf72cac252a64dcee5e2c6bececc45dd8</id>
<content type='text'>
Define variable SSTATE_PRUNE_OBSOLETEWORKDIR with '?=' in sstate.bbclass,
then it could be overwritten by user configuration.

(From OE-Core rev: 22af59c9bfec31b31027ebd2a4da162f481aa6b5)

Signed-off-by: Kai Kang &lt;kai.kang@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>sstate: add intel-microcode to SSTATE_DUPWHITELIST</title>
<updated>2018-08-23T06:50:00+00:00</updated>
<author>
<name>Yongxin Liu</name>
<email>yongxin.liu@windriver.com</email>
</author>
<published>2018-08-22T09:24:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=4a95d573c3bf2c0d5e9c4b7a452b54a2f88ff52f'/>
<id>urn:sha1:4a95d573c3bf2c0d5e9c4b7a452b54a2f88ff52f</id>
<content type='text'>
intel-microcode multilib recipes can generate identical overlapping
files: microcode.cpio.

(From OE-Core rev: 4b27da3334aff7f9f03ae934bbab7e7af07df3f6)

Signed-off-by: Yongxin Liu &lt;yongxin.liu@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>sstate: Optimise SSTATE_EXCLUDEDEPS_SYSROOT handling</title>
<updated>2018-08-16T08:49:39+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2018-08-15T14:30:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=59acf118fc0374a9744abb9dd49b8e8aecc142eb'/>
<id>urn:sha1:59acf118fc0374a9744abb9dd49b8e8aecc142eb</id>
<content type='text'>
Using re.compile() is around six times faster than recompiling the regexp
each time so maintain a cache.

(From OE-Core rev: 41eb382737706e245f2b7104e313c8dfaa370945)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>sstate: use SSTATE_EXCLUDEDEPS_SYSROOT for skipping base-passwd|shadow-sysroot recipes</title>
<updated>2018-08-16T08:49:39+00:00</updated>
<author>
<name>André Draszik</name>
<email>andre.draszik@jci.com</email>
</author>
<published>2018-05-22T12:25:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=6e362580a667de3a5ba98e877e561ecd5cea7137'/>
<id>urn:sha1:6e362580a667de3a5ba98e877e561ecd5cea7137</id>
<content type='text'>
Use the newly introduced SSTATE_EXCLUDEDEPS_SYSROOT for specifying
the base-passwd|shadow-sysroot recipes to be excluded from a recipe sysroot.

(From OE-Core rev: 68e502e9063a88532fe0154f152ba408f0091900)

Signed-off-by: André Draszik &lt;andre.draszik@jci.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>sstate: use SSTATE_EXCLUDEDEPS_SYSROOT for skipping *-initial recipes</title>
<updated>2018-08-16T08:49:39+00:00</updated>
<author>
<name>André Draszik</name>
<email>andre.draszik@jci.com</email>
</author>
<published>2018-05-22T12:25:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=e02176b5e66721c8d872c93d2108e98d142c376b'/>
<id>urn:sha1:e02176b5e66721c8d872c93d2108e98d142c376b</id>
<content type='text'>
Use the newly introduced SSTATE_EXCLUDEDEPS_SYSROOT for specifying
the *-initial recipes to be excluded from a recipe sysroot.

(From OE-Core rev: 6706bad52f9311ea79c534ee90014c3216992999)

Signed-off-by: André Draszik &lt;andre.draszik@jci.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>sstate: allow specifying indirect dependencies to exclude from sysroot</title>
<updated>2018-08-16T08:49:39+00:00</updated>
<author>
<name>André Draszik</name>
<email>andre.draszik@jci.com</email>
</author>
<published>2018-05-22T12:25:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=7b7aa56548d61a85b928b90d2e7a3c9b3fee4a6b'/>
<id>urn:sha1:7b7aa56548d61a85b928b90d2e7a3c9b3fee4a6b</id>
<content type='text'>
Currently, a dependency on any -native recipe will pull in
all dependencies of that -native recipe in the recipe
sysroot. This behaviour might not always be wanted, e.g.
when that -native recipe depends on build-tools that are
not relevant for the current recipe.

This change adds a SSTATE_EXCLUDEDEPS_SYSROOT variable,
which will be evaluated for such recursive dependencies to
be excluded. The idea is similar to
   http://lists.openembedded.org/pipermail/openembedded-core/2018-January/146324.html
except that the list is not hard-coded anymore.

SSTATE_EXCLUDEDEPS_SYSROOT is evaluated as two regular
expressions of recipe and dependency to ignore, e.g. in
the above flex-native / bison-native use-case, one would
specify

    SSTATE_EXCLUDEDEPS_SYSROOT = ".*-&gt;(flex|bison)-native"

in layer.conf.

The existing special handling of "-initial" as well as
"base-passwd" and "shadow-sysroot" could also be
streamlined:

    SSTATE_EXCLUDEDEPS_SYSROOT += "\
        .*-&gt;.*-initial.* \
        .*(base-passwd|shadow-sysroot)-&gt;.* \
    "

Another anticipated user is meta-java, where certain newer
JDKs can only be bootstrapped (built) using older JDKs,
but it doesn't make much sense to copy all those older
JDKs and their own build tools (ant, etc.) into the
sysroot of recipes wanting to be built using the newer JDK
(only), e.g.:

    SSTATE_EXCLUDEDEPS_SYSROOT += "\
        openjdk-8-native-&gt;(ant-native|attr-native|coreutils-native|icedtea7-native|libxslt-native|make-native|openssl-native|zip-native|unzip-native) \
    "

(From OE-Core rev: 92c5131a2feae2036c71a36c18bb9175bb2856dc)

Signed-off-by: André Draszik &lt;andre.draszik@jci.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>sstate/lib.oe.path: Ensure file sparseness is preserved</title>
<updated>2018-08-15T08:44:33+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2018-08-14T17:23:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=a1b4b7c0b493968a6f9d519a3a37d87466432f0d'/>
<id>urn:sha1:a1b4b7c0b493968a6f9d519a3a37d87466432f0d</id>
<content type='text'>
Files when restored from sstate were missing their sparseness. Fix up various
functions to preserve this and make things more deterministic.

(From OE-Core rev: 055402e5504f041c346571e243c7cf0894955cad)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
