<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/bitbake/lib/bb/tests, branch hardknott-next</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=hardknott-next</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=hardknott-next'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2021-04-27T14:22:58+00:00</updated>
<entry>
<title>bitbake: bitbake: tests/fetch: remove write protected files too</title>
<updated>2021-04-27T14:22:58+00:00</updated>
<author>
<name>Mikko Rapeli</name>
<email>mikko.rapeli@bmw.de</email>
</author>
<published>2021-04-26T03:27:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=464472d851d3e36334f3f2c39e6f62952eae7326'/>
<id>urn:sha1:464472d851d3e36334f3f2c39e6f62952eae7326</id>
<content type='text'>
For some reason several git-annex files in Debian 10 buster
are read-only and removing them with "rm -rf" fails.

Fixes test failures like:

$ bitbake-selftest
...
rm: cannot remove '/tmp/tmpwmfn4w64/download/git2/tmp.tmpwmfn4w64.gitsource/annex/objects/f87/4d5/SHA256E-s0--e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855/SHA256E-s0--e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855': Permission denied
rm: cannot remove '/tmp/tmpwmfn4w64/download/git2/tmp.tmpwmfn4w64.gitsource/annex/objects/f87/4d5/SHA256E-s0--e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855/SHA256E-s0--e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855': Permission denied
EE..................................ssss.sssssssssssssss.sssss.......................................................................................................
======================================================================
ERROR: test_shallow_annex (bb.tests.fetch.GitShallowTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/builder/src/base/poky/bitbake/lib/bb/tests/fetch.py", line 1773, in test_shallow_annex
    fetcher, ud = self.fetch_shallow(uri)
  File "/home/builder/src/base/poky/bitbake/lib/bb/tests/fetch.py", line 1541, in fetch_shallow
    bb.utils.remove(ud.clonedir, recurse=True)
  File "/home/builder/src/base/poky/bitbake/lib/bb/utils.py", line 700, in remove
    subprocess.check_call(cmd + ['rm', '-rf'] + glob.glob(path))
  File "/usr/lib/python3.7/subprocess.py", line 347, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['rm', '-rf', '/tmp/tmpwmfn4w64/download/git2/tmp.tmpwmfn4w64.gitsource']' returned non-zero exit status 1.

Also, one "chmod" call was failing since the .git/annex subdirectory doesn't exist so just chmod
the whole temporary directory which should cover any directory name differences between
different git-annex versions. Fixes tests failing after chmod call:

Running 'export PSEUDO_DISABLED=1; unset _PYTHON_SYSCONFIGDATA_NAME; chmod u+w -R /tmp/tmpwmfn4w64/git//.git/annex' in /tmp/tmpwmfn4w64/git/

(Bitbake rev: 14c5f0735947307b9d69c57f7334fefaea7311b3)

Signed-off-by: Mikko Rapeli &lt;mikko.rapeli@bmw.de&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
(cherry picked from commit 7729ef2983c72867e99fad82d671069ba5cb32b2)
Signed-off-by: Anuj Mittal &lt;anuj.mittal@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: bitbake: tests/fetch: fix test execution without .gitconfig</title>
<updated>2021-04-27T14:22:58+00:00</updated>
<author>
<name>Mikko Rapeli</name>
<email>mikko.rapeli@bmw.de</email>
</author>
<published>2021-04-26T03:27:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=b7cba05f8267182ac553f552a5f57a91fe5e7eee'/>
<id>urn:sha1:b7cba05f8267182ac553f552a5f57a91fe5e7eee</id>
<content type='text'>
A CI user validating changes does not have any git push rights or
even a .gitconfig file so fix tests so that they run
by setting the user.name and user.email for the repo before
committing changes.

Fixes errors like:

ERROR: test_that_unpack_throws_an_error_when_the_git_clone_nor_shallow_tarball_exist (bb.tests.fetch.GitShallowTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/builder/src/base/poky/bitbake/lib/bb/tests/fetch.py", line 2055, in test_that_unpack_throws_an_error_when_the_git_clone_nor_shallow_tarball_exist
    self.add_empty_file('a')
  File "/home/builder/src/base/poky/bitbake/lib/bb/tests/fetch.py", line 1562, in add_empty_file
    self.git(['commit', '-m', msg, path], cwd)
  File "/home/builder/src/base/poky/bitbake/lib/bb/tests/fetch.py", line 1553, in git
    return bb.process.run(cmd, cwd=cwd)[0]
  File "/home/builder/src/base/poky/bitbake/lib/bb/process.py", line 184, in run
    raise ExecutionError(cmd, pipe.returncode, stdout, stderr)
bb.process.ExecutionError: Execution of 'git commit -m a a' failed with exit code 128:

*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

(Bitbake rev: 1e1d1187e602aa1ef50c23551eec07f1a0cd81ef)

Signed-off-by: Mikko Rapeli &lt;mikko.rapeli@bmw.de&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
(cherry picked from commit 57c0811f1ee19b6619f4840a39e01e3cb98c34c4)
Signed-off-by: Anuj Mittal &lt;anuj.mittal@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: doc: Update links to documentation</title>
<updated>2021-03-23T22:51:25+00:00</updated>
<author>
<name>Michael Opdenacker</name>
<email>michael.opdenacker@bootlin.com</email>
</author>
<published>2021-03-19T16:42:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=62880ffb17e374b5bbe281e4dad48c68da5cbcfb'/>
<id>urn:sha1:62880ffb17e374b5bbe281e4dad48c68da5cbcfb</id>
<content type='text'>
(Bitbake rev: ed8e1fd4cf9d5ac8a8203638add99d686b4b3521)

Signed-off-by: Michael Opdenacker &lt;michael.opdenacker@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: tests/color: Fix event register to pass the datastore</title>
<updated>2021-03-12T15:28:57+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2021-03-12T15:26:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=cca5433bafb2d7efc7d93a43bdf02e4f53534fd5'/>
<id>urn:sha1:cca5433bafb2d7efc7d93a43bdf02e4f53534fd5</id>
<content type='text'>
Adding the "if d is None" to the event handling code meant some of
these tests stopped working. The reason is that len(d) was zero but
not equal to None.

Passing the data object to the register() function in the test
correctly registers the event handler and avoids the problem, it
just happened to work previously, incorrectly.

(Bitbake rev: 426eb83c6668d82a2ebaca6c672db131e37c11da)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: event: Fix broken builds when multiconfig has a hyphen in the name</title>
<updated>2021-02-21T22:02:01+00:00</updated>
<author>
<name>Joshua Watt</name>
<email>jpewhacker@gmail.com</email>
</author>
<published>2021-02-20T02:37:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=40f5a289d5f3fd8b1d0f3ee1544531b85f5ab350'/>
<id>urn:sha1:40f5a289d5f3fd8b1d0f3ee1544531b85f5ab350</id>
<content type='text'>
5f7fdf7b2d ("bitbake: event: Prevent bitbake from executing event
handler for wrong multiconfig target") broke multiconfig builds contain
a hyphen, since it's attempt to use the multiconfig as part of a
function name and python functions are not allowed to contain a hyphen.

Rework the bitbake multiconfig test to test a multiconfig with a hyphen
and one with an underscore to validate this doesn't break in the future.

(Bitbake rev: c3168df330a4563cbd03ba74de55a22217d823ed)

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>bitbake: fetch/git: download LFS content too during do_fetch</title>
<updated>2021-01-23T17:10:46+00:00</updated>
<author>
<name>Matt Hoosier</name>
<email>matt.hoosier@garmin.com</email>
</author>
<published>2021-01-22T16:55:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=45c02843d181b5f1872ad30f4d847c395233a676'/>
<id>urn:sha1:45c02843d181b5f1872ad30f4d847c395233a676</id>
<content type='text'>
Insert an explicit pass to fetch all blobs needed by Git LFS, during the
fetch() function. This avoids the default behavior of Git LFS to wait
until 'git checkout' to begin downloading the blobs pointed to by LFS records.
Network access is not allowed at that point in the recipe's lifecycle.

[YOCTO #14191]

(Bitbake rev: 0efac66043662e7a2027192f50e92e982db2ba1c)

Signed-off-by: Matt Hoosier &lt;matt.hoosier@garmin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: tests/fetch: add test for empty query parameters</title>
<updated>2021-01-23T17:09:26+00:00</updated>
<author>
<name>Ross Burton</name>
<email>ross@burtonini.com</email>
</author>
<published>2021-01-21T10:50:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=8e92ec78322909ca5ad6ceda582b611fa77a9964'/>
<id>urn:sha1:8e92ec78322909ca5ad6ceda582b611fa77a9964</id>
<content type='text'>
To exercise the previous patch, add a test case.

(Bitbake rev: efdf6d5c4cd8155bc54dc667346f58dccb138e07)

Signed-off-by: Ross Burton &lt;ross.burton@arm.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: fetch/git: Fix usehead for non-default names</title>
<updated>2021-01-08T10:11:42+00:00</updated>
<author>
<name>Joey Degges</name>
<email>jdegges@gmail.com</email>
</author>
<published>2020-12-14T08:30:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=10c69538c0cb8708c7eff9e8dc05ca7c669cb61c'/>
<id>urn:sha1:10c69538c0cb8708c7eff9e8dc05ca7c669cb61c</id>
<content type='text'>
The usehead url parameter for git repositories causes bitbake to use
whatever commit the repository HEAD is pointing to if the repository
happens to have the name 'default'. This is the default name so in many
cases it works just fine, but if a different name is specified with the
url parameter 'name=newName' then it will fail to parse the recipe with
an error along the lines of:

ERROR: ExpansionError during parsing /path/to/my/recipe.bb
Traceback (most recent call last):
  File "/path/to/poky/bitbake/lib/bb/fetch2/git.py", line 235, in Git.urldata_init:
    &gt;        ud.setup_revisions(d)
  File "/path/to/poky/bitbake/lib/bb/fetch2/__init__.py", line 1302, in FetchData.setup_revisions:
             for name in self.names:
    &gt;            self.revisions[name] = srcrev_internal_helper(self, d, name)
  File "/path/to/poky/bitbake/lib/bb/fetch2/__init__.py", line 1167, in srcrev_internal_helper(name='newName'):
         if srcrev == "AUTOINC":
    &gt;        srcrev = ud.method.latest_revision(ud, d, name)
  File "/path/to/poky/bitbake/lib/bb/fetch2/__init__.py", line 1562, in Git.latest_revision(name='newName'):
             except KeyError:
    &gt;            revs[key] = rev = self._latest_revision(ud, d, name)
                 return rev
  File "/path/to/poky/bitbake/lib/bb/fetch2/git.py", line 650, in Git._latest_revision(name='newName'):
             raise bb.fetch2.FetchError("Unable to resolve '%s' in upstream git repository in git ls-remote output for %s" % \
    &gt;            (ud.unresolvedrev[name], ud.host+ud.path))
bb.data_smart.ExpansionError: Failure expanding variable SRCPV, expression was ${@bb.fetch2.get_srcrev(d)} which triggered exception FetchError: Fetcher failure: Unable to resolve 'master' in upstream git repository in git ls-remote output for /path/to/local/git/repo

Let's fix this by setting the unresolved rev of _all_ repository names
to 'HEAD' when the usehead url parameter is specified. Update the
currently failing test, test_local_gitfetch_usehead_withname, to now
expect success.

This change preserves existing behavior that allows usehead to be
overridden by a valid looking revision if one happens to be specified
instead of AUTOREV.

(Bitbake rev: 01e901c44ab0f496606b1d45c8953dc54970204c)

Signed-off-by: Joey Degges &lt;jdegges@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: tests/fetch: Test usehead with a non-default name</title>
<updated>2021-01-08T10:11:42+00:00</updated>
<author>
<name>Joey Degges</name>
<email>jdegges@gmail.com</email>
</author>
<published>2021-01-05T05:14:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=41ed881feaca7248426b60053aef41a2ce0eb39e'/>
<id>urn:sha1:41ed881feaca7248426b60053aef41a2ce0eb39e</id>
<content type='text'>
Add tests for fetching a URL with the usehead parameter set and a
non-default name set. We currently expect the local version of this test
to fail since there is a bug in the usehead implementation that breaks
for non-default names.

(Bitbake rev: a2345110f217fac429f6ec15f699c87c39531e7c)

Signed-off-by: Joey Degges &lt;jdegges@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: tests/fetch: Document behavior of test_gitfetch_usehead</title>
<updated>2021-01-08T10:11:42+00:00</updated>
<author>
<name>Joey Degges</name>
<email>jdegges@gmail.com</email>
</author>
<published>2021-01-05T05:08:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=d5c4cd6a0b50c87a686c9e560f1b4d7c4446bc1e'/>
<id>urn:sha1:d5c4cd6a0b50c87a686c9e560f1b4d7c4446bc1e</id>
<content type='text'>
The test `test_gitfetch_usehead' exercises a way to override the usehead
feature by setting SRCREV. It may not be obvious that this is what is
being exercised here so let's add some comments to document the expected
behavior.

(Bitbake rev: 1cd998c19101e3b093e81c126b3048c5d56058b0)

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