<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/meta/classes/externalsrc.bbclass, branch dunfell-next</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=dunfell-next</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=dunfell-next'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2019-12-28T23:25:42+00:00</updated>
<entry>
<title>externalsrc: always set SRCPV</title>
<updated>2019-12-28T23:25:42+00:00</updated>
<author>
<name>Alexander Kanavin</name>
<email>alex.kanavin@gmail.com</email>
</author>
<published>2019-12-17T18:55:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=65767d35d1569abc2a656970206b97a8d5fd7484'/>
<id>urn:sha1:65767d35d1569abc2a656970206b97a8d5fd7484</id>
<content type='text'>
If devupstream is in use by the recipe, then that
variant has SRCPV, but the main variant may not,
in which case bitbake throws an expansion error.

(From OE-Core rev: 740e3f5e1d4a8abb07c7a4e4aedd804d679c7562)

Signed-off-by: Alexander Kanavin &lt;alex.kanavin@gmail.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>externalsrc: stop rebuilds of 2+ externalsrc recipes sharing the same git repo</title>
<updated>2019-09-19T19:30:35+00:00</updated>
<author>
<name>Quentin Schulz</name>
<email>quentin.schulz@streamunlimited.com</email>
</author>
<published>2019-09-19T14:55:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=9daa97bea87a33f1a890378e1686bcec779cad80'/>
<id>urn:sha1:9daa97bea87a33f1a890378e1686bcec779cad80</id>
<content type='text'>
externalsrc do_configure task watches oe-devtool-tree-sha1 file and its
checksum. That file basically contains the result of `git add -A
${EXTERNALSRC} &amp;&amp; git write-tree` which is the hash of temporary
"commit" of the non committed changes. This file is stored in the .git
directory of the git repo of the externalsrc recipe. do_configure then
depends on the checksum of oe-devtool-tree-sha1 file.

If 2+ recipes with different externalsrc paths but same git repo (e.g.
one recipe at /some/path and the other at /some/path/subdir) are parsed,
this oe-devtool-tree-sha1 will be overwritten by those recipes at
parsing time since .git is shared between those recipes.

If there is one non committed git change in /some/path but not in
/some/path/subdir, the oe-devtool-tree-sha1 of both recipes will be
different.

What will happen is that recipe1 will watch over the
oe-devtool-tree-sha1 with a specific checksum, fill in file-checksums
for do_configure correctly, then recipe2 will watch over the identically
named file with different content also fill in the file-checksums
varflag. When do_configure of recipe1 will be evaluated for
re-execution, oe-devtool-tree-sha1 will be of the value of what is
watched over by recipe2, thus triggering a rebuild of recipe1.

This behavior is not always reproducible which I'm guessing is due to a
small window between recipe1 putting info into oe-devtool-tree-sha1 and
calculating the checksum of that file and recipe2 putting its content
into oe-devtool-tree-sha1.

By appending the name of the recipe to oe-devtool-tree-sha1, we make
sure that a recipe won't have its oe-devtool-tree-sha1 overwritten by
another recipe sharing the same externalsrc git repo.

(From OE-Core rev: 1b727dd7295a7a7fe17800f8038242efbf7fe2b7)

Signed-off-by: Quentin Schulz &lt;quentin.schulz@streamunlimited.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>externalsrc.bbclass: Set BB_DONT_CACHE for non-target recipes</title>
<updated>2018-10-08T13:13:54+00:00</updated>
<author>
<name>Ola x Nilsson</name>
<email>ola.x.nilsson@axis.com</email>
</author>
<published>2018-10-04T10:43:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=244ba497845a41eac8d179fbb057101c19c676f3'/>
<id>urn:sha1:244ba497845a41eac8d179fbb057101c19c676f3</id>
<content type='text'>
BB_DONT_CACHE was not set for non-virtual recipes where PN != BPN, such
as quilt-native.  Recipes that do not set BBCLASSEXTEND should always
have BB_DONT_CACHE set by externalsrc.

(From OE-Core rev: 4eff427a0ee629a1541a420a9591411648569a97)

Signed-off-by: Ola x Nilsson &lt;olani@axis.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>externalsrc.bbclass: don't configure with --disable-dependency-tracking</title>
<updated>2018-05-29T20:07:13+00:00</updated>
<author>
<name>Andre McCurdy</name>
<email>armccurdy@gmail.com</email>
</author>
<published>2018-05-18T04:35:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=24882b24165d8034d6611139a8254fa6a52f1b60'/>
<id>urn:sha1:24882b24165d8034d6611139a8254fa6a52f1b60</id>
<content type='text'>
One of the uses of externalsrc is to enable iterative editing and
rebuilding of source files during development. In such situations,
disabling Automake dependency tracking can lead to sources not being
rebuilt even though files they depend on have been modified.

(From OE-Core rev: af2f802d5b59203a887982af83252565b8078085)

Signed-off-by: Andre McCurdy &lt;armccurdy@gmail.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>classes/externalsrc: ensure cleandirs code handles non-absolute paths</title>
<updated>2018-04-05T13:49:07+00:00</updated>
<author>
<name>Paul Eggleton</name>
<email>paul.eggleton@linux.intel.com</email>
</author>
<published>2018-04-04T11:02:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=5e6ffb2adbf544700470bbdb9428c2e020c9f8a6'/>
<id>urn:sha1:5e6ffb2adbf544700470bbdb9428c2e020c9f8a6</id>
<content type='text'>
It's possible that a trailing or extra slash somewhere in the external
source path could result in the directory not being removed from
cleandirs; it's also possible that a cleandirs entry is somewhere
underneath the source tree and that tree should never have parts of it
deleted by the build system. Use oe.path.is_path_parent() (which makes
paths absolute before checking them) to find out if any path in
cleandirs is anywhere underneath the external source path, and drop it
if it is.

(From OE-Core rev: 87ec0fb470274d980f8553a85f778809c269c5d7)

Signed-off-by: Paul Eggleton &lt;paul.eggleton@linux.intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>classes/externalsrc: handle if cleandirs contains python expressions</title>
<updated>2018-04-05T13:49:06+00:00</updated>
<author>
<name>Paul Eggleton</name>
<email>paul.eggleton@linux.intel.com</email>
</author>
<published>2018-04-04T11:02:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=eb37cdd8908380e02460111f1739bd1cc0a22d8e'/>
<id>urn:sha1:eb37cdd8908380e02460111f1739bd1cc0a22d8e</id>
<content type='text'>
Use the existing oe.recipeutils.split_var_value() function to split the
unexpanded value of the cleandirs varflag, in case it contains python
expressions - we don't want to split the expression itself as the chunks
will not expand properly individually and we can miss something that
expands to the source tree (and thus it can get deleted, the avoidance
of which is the whole point of this code).

(From OE-Core rev: 611cee69d7300a4746edd752c9557af60e7beecc)

Signed-off-by: Paul Eggleton &lt;paul.eggleton@linux.intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>externalsrc: do not call make clean for recipes with CLEANBROKEN = "1" set</title>
<updated>2018-03-25T08:40:42+00:00</updated>
<author>
<name>Andreas Müller</name>
<email>schnitzeltony@gmail.com</email>
</author>
<published>2018-03-21T12:20:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=4fb30daa96de18f5af857efe6c45e5804bbe8575'/>
<id>urn:sha1:4fb30daa96de18f5af857efe6c45e5804bbe8575</id>
<content type='text'>
ERROR: distrho-ports-0.0.0+git999-r0 do_buildclean: oe_runmake failed
ERROR: distrho-ports-0.0.0+git999-r0 do_buildclean: Function failed: do_buildclean
ERROR: Logfile of failure stored in: &lt;...&gt;/temp/log.do_buildclean.17285
Log data follows:
| DEBUG: Executing shell function do_buildclean
| NOTE: make clean
| make clean -C libs/drowaudio
| make[1]: Entering directory '/home/a.mueller/data/oe-core/workspace/sources/distrho-ports/libs/drowaudio'
| make clean -C build-drowaudio
| make[2]: Entering directory '/home/a.mueller/data/oe-core/workspace/sources/distrho-ports/libs/drowaudio/build-drowaudio'
| make[2]: *** No rule to make target 'clean'.  Stop.
| make[2]: Leaving directory '/home/a.mueller/data/oe-core/workspace/sources/distrho-ports/libs/drowaudio/build-drowaudio'
| make[1]: *** [Makefile:7: clean] Error 2
| make[1]: Leaving directory '/home/a.mueller/data/oe-core/workspace/sources/distrho-ports/libs/drowaudio'
| make: *** [Makefile:73: clean] Error 2
| ERROR: oe_runmake failed

(From OE-Core rev: 21fa28d8faf33b2717e38886352238dd360ef346)

Signed-off-by: Andreas Müller &lt;schnitzeltony@gmail.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>externalsrc.bbclass: Suppress git errors</title>
<updated>2018-02-16T18:05:40+00:00</updated>
<author>
<name>Joshua Watt</name>
<email>jpewhacker@gmail.com</email>
</author>
<published>2018-02-14T17:09:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=96a87ced108d1c108c3f79bd1974c4e6ac0a2295'/>
<id>urn:sha1:96a87ced108d1c108c3f79bd1974c4e6ac0a2295</id>
<content type='text'>
Suppress any warnings git might generate when searching for a valid git
directory, as there are use cases where the directory is expected to not
exist and the warning is superfluous

(From OE-Core rev: 66011996e1a8b738b31466fccad9973f8b48f71d)

Signed-off-by: Joshua Watt &lt;JPEWhacker@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>externalsrc: fix ExpansionError if the source dir does not exist yet</title>
<updated>2017-11-08T22:24:03+00:00</updated>
<author>
<name>Luca Ceresoli</name>
<email>luca@lucaceresoli.net</email>
</author>
<published>2017-09-29T08:39:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=ab6ebff5c4cf962e9df6dc1d3fddd796d308fadd'/>
<id>urn:sha1:ab6ebff5c4cf962e9df6dc1d3fddd796d308fadd</id>
<content type='text'>
The externalsrc class code assumes that the source directory
(EXTERNALSRC) exists before bitbake is called. Otherwise do_configure
will fail obviously since externalsrc does not fetch anything.

Commit 3ca6085729d9 ("externalsrc: Handle .git not being a directory")
changed this behaviour. Now on a missing EXTERNALSRC directory we get
a bb.data_smart.ExpansionError during _parsing_, way before
do_configure can be run.

This new behaviour creates two problems:

 * First, there error message is very cryptic (and it's hard to
   provide a better message since no task is ever run):

     ERROR: ExpansionError during parsing /&lt;...&gt;/&lt;...&gt;.bb
     Traceback (most recent call last):
     bb.data_smart.ExpansionError: Failure expanding variable do_compile[file-checksums], expression was ${@srctree_hash_files(d)} which triggered exception FileNotFoundError: [Errno 2] No such file or directory: '&lt;...&gt;'

 * Second, this prevents creating a class based on externalsrc that
   automatically fetches the code in EXTERNALSRC before do_compile
   runs.

Fix both problems by simply calling git with '-C ${EXTERNALSRC}'
instead of calling git inside the non-existing directory. This changes
from a bb.data_smart.ExpansionError to a
subprocess.CalledProcessError, which is in line with what's actually
going on: git is telling us it can't find the git dir.

Also remove a comment that does not apply anymore.

(From OE-Core rev: 8e8251582e977d7c6ab525ac1b493fbbe3af38b2)

Signed-off-by: Luca Ceresoli &lt;luca@lucaceresoli.net&gt;
Cc: Joshua Watt &lt;jpewhacker@gmail.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>classes/externalsrc: delete symlinks at start of do_buildclean</title>
<updated>2017-09-21T08:24:24+00:00</updated>
<author>
<name>Paul Eggleton</name>
<email>paul.eggleton@linux.intel.com</email>
</author>
<published>2017-09-18T04:54:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=14a0736751741d8df77977356959e10182f452cb'/>
<id>urn:sha1:14a0736751741d8df77977356959e10182f452cb</id>
<content type='text'>
To help users find the work and log directories (especially within the
eSDK) we create symlinks to these from the source tree. However during
do_buildclean we call "make clean", and some project Makefiles which
delete something like "*/*/lib" which will match files underneath the
oe-workdir symlink and fail. do_buildclean is called from do_clean which
is in turn called by devtool reset by default, and thus devtool reset is
blocked. An example of a recipe where this is visible is the openssl-qat
recipe in meta-intel.

In order to fix this, delete the symlinks at the start of do_buildclean
since we shouldn't need them at that point anyway, and thus make clean
won't be able to trip over them.

Fixes [YOCTO #11036].

(From OE-Core rev: 927b3b05a7f6b85967f7375b1942605fe8d37d0c)

Signed-off-by: Paul Eggleton &lt;paul.eggleton@linux.intel.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
