<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/bitbake/lib/bb/fetch2/git.py, branch yocto-3.1.20</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=yocto-3.1.20</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=yocto-3.1.20'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2022-07-15T11:41:59+00:00</updated>
<entry>
<title>bitbake: fetch/git: Fix usehead for non-default names</title>
<updated>2022-07-15T11:41:59+00:00</updated>
<author>
<name>Joey Degges</name>
<email>jdegges@gmail.com</email>
</author>
<published>2022-07-03T12:17:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=9c5b33ccbabfa112da30423e8dad88e235a2b16f'/>
<id>urn:sha1:9c5b33ccbabfa112da30423e8dad88e235a2b16f</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: a247f56df680382d62910bb9a174e0fdd29e4ca8)

Signed-off-by: Joey Degges &lt;jdegges@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
(cherry picked from commit 01e901c44ab0f496606b1d45c8953dc54970204c)
Signed-off-by: Paulo Neves &lt;ptsneves@gmail.com&gt;
Signed-off-by: Steve Sakoman &lt;steve@sakoman.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: fetch/git: Handle github dropping git:// support</title>
<updated>2021-11-03T11:31:43+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2021-11-02T12:40:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=0810ac6b926cd901f0619e95f367efc79d4c3159'/>
<id>urn:sha1:0810ac6b926cd901f0619e95f367efc79d4c3159</id>
<content type='text'>
github is dropping support for git protocol in Git urls. Add code to remap
this to https in a way that could be used in older bitbake versions.

(Bitbake rev: c222eddcebe892ae209aea7776cfc1147ac1df6e)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: fetch2/git: Use os.rename instead of mv</title>
<updated>2021-10-23T16:47:38+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2021-10-22T13:59:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=9c007cb1e35f4744682f9f00fe15ceb18fbf7ffc'/>
<id>urn:sha1:9c007cb1e35f4744682f9f00fe15ceb18fbf7ffc</id>
<content type='text'>
os.rename will overwrite the destination file if present so we can use this
instead of the process call overhead.

(Bitbake rev: c5b8a2fce98c362ea77d74a8bc472d01b739a98a)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
(cherry picked from commit b3cccaa6a896c41d8c9be5eebc327f726542d16b)
Signed-off-by: Steve Sakoman &lt;steve@sakoman.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: fetch2/git: Avoid races over mirror tarball creation</title>
<updated>2021-10-23T16:47:38+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2021-10-22T13:59:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=9827758ebe3c0b6b4f06dedc814b810629b184e3'/>
<id>urn:sha1:9827758ebe3c0b6b4f06dedc814b810629b184e3</id>
<content type='text'>
There is a potential race over the mirror tarballs where a partial git repo
could be extracted causing fetcher failures if the tarball is being rewritten
whilst another build accesses it.

Create the mirror tarball atomically to avoid this.

[YOCTO #14441]

(Bitbake rev: e3da0ecbd282da060b52a4bcf3ed36497295fde0)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
(cherry picked from commit 3250bc950c56bd7dd2114df26e5a8e13b04ceac8)
Signed-off-by: Steve Sakoman &lt;steve@sakoman.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: fetch/gitsm: Fix crash when using git LFS and submodules</title>
<updated>2021-05-13T12:12:00+00:00</updated>
<author>
<name>Niels Avonds</name>
<email>niels@codebits.be</email>
</author>
<published>2021-05-10T14:15:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=34597b96d94cd4d7aae38c394181df7bebec4171'/>
<id>urn:sha1:34597b96d94cd4d7aae38c394181df7bebec4171</id>
<content type='text'>
Gitsm fetcher crashes when cloning a repository that contains LFS files.
This happens because the unpack method is called during download, but the
submodules have not been downloaded yet at this point.

This issue was introduced in this
commit: 977b7268bf4fd425cb86d4a57500350c9b829162

[YOCTO #14283]

(Bitbake rev: b4acaa314cd8bc86c50e14464ff01c2d110122c4)

Signed-off-by: Niels Avonds &lt;niels@codebits.be&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
(cherry picked from commit 26caedc4d2e9b5a0f1d57f9291754a7f6c5e437e)
Signed-off-by: Anuj Mittal &lt;anuj.mittal@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
(cherry picked from commit e05d79a6ed92c9ce17b90fd5fb6186898a7b3bf8)
Signed-off-by: Steve Sakoman &lt;steve@sakoman.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-02-05T12:18:38+00:00</updated>
<author>
<name>Matt Hoosier</name>
<email>matt.hoosier@garmin.com</email>
</author>
<published>2021-02-03T14:22:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=977b7268bf4fd425cb86d4a57500350c9b829162'/>
<id>urn:sha1:977b7268bf4fd425cb86d4a57500350c9b829162</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: 2351b496bb63b96920d4ae67bec816f00d510df2)

Signed-off-by: Matt Hoosier &lt;matt.hoosier@garmin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
(cherry picked from commit 0efac66043662e7a2027192f50e92e982db2ba1c)
Signed-off-by: Steve Sakoman &lt;steve@sakoman.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: git.py: Use the correct branch to check if the repository has LFS objects.</title>
<updated>2021-02-05T12:18:38+00:00</updated>
<author>
<name>Mauro Queirós</name>
<email>maurofrqueiros@gmail.com</email>
</author>
<published>2021-02-03T14:22:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=1f4ca119bef0e06b8ed18f6c7878a3704014ec71'/>
<id>urn:sha1:1f4ca119bef0e06b8ed18f6c7878a3704014ec71</id>
<content type='text'>
Function "contains_lfs" was only looking at the master branch when searching for LFS
content. LFS may be configured in specific branches only, so we need to use the
correct branch.

(Bitbake rev: 274f790ac9161187810df3242d3570261e407b11)

Signed-off-by: Mauro Queiros &lt;maurofrqueiros@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
(cherry picked from commit 4fa67c2af830035a1ddedc14592ee25a15ebff22)
Signed-off-by: Steve Sakoman &lt;steve@sakoman.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: git.py: LFS bitbake note should not be printed if need_lfs is not set.</title>
<updated>2021-02-05T12:18:38+00:00</updated>
<author>
<name>Mauro Queirós</name>
<email>maurofrqueiros@gmail.com</email>
</author>
<published>2021-02-03T14:22:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=9e56bfd02ea88c1b9a3b4a944f009c2f401a8e21'/>
<id>urn:sha1:9e56bfd02ea88c1b9a3b4a944f009c2f401a8e21</id>
<content type='text'>
The message "Repository %s has LFS content but it is not being fetched" was
being printed, even when Git-LFS was available and "lfs=1" was set. In those
situations, we want to fetch LFS content, so that message would not make sense.

(Bitbake rev: 2795c6150c0b3218716195c0d10ff2843b1ef695)

Signed-off-by: Mauro Queiros &lt;maurofrqueiros@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
(cherry picked from commit 45028dfda5a29a34ab408cb3f11d72ae17963340)
Signed-off-by: Steve Sakoman &lt;steve@sakoman.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: git.py: skip smudging if lfs=0 is set</title>
<updated>2021-02-05T12:18:38+00:00</updated>
<author>
<name>Mauro Queirós</name>
<email>maurofrqueiros@gmail.com</email>
</author>
<published>2021-02-03T14:22:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=85c616cb8cd90d2a09989526d49b7352722fee33'/>
<id>urn:sha1:85c616cb8cd90d2a09989526d49b7352722fee33</id>
<content type='text'>
Git-LFS objects were being fetched even when lfs=0 was not set.
This patch disables LFS smudging when lfs=0. That way, only the LFS pointers
are downloaded during checkout.

(Bitbake rev: 3d09608cabd404733b95ea92d5b00830ded77834)

Signed-off-by: Mauro Queiros &lt;maurofrqueiros@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
(cherry picked from commit 646d86df7de774255246a3d7051c308e43eb257d)
Signed-off-by: Steve Sakoman &lt;steve@sakoman.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: bitbake: fetch/git: add support for SRC_URI containing spaces in url</title>
<updated>2020-10-13T08:40:10+00:00</updated>
<author>
<name>Charlie Davies</name>
<email>charles.davies@whitetree.xyz</email>
</author>
<published>2020-10-12T15:07:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=52daea2287c868cec6008cb407933b673675e08e'/>
<id>urn:sha1:52daea2287c868cec6008cb407933b673675e08e</id>
<content type='text'>
Microsoft's TFS VCS system allows for spaces in a git repository url.
An example of a valid url is:

ssh://tfs-my-company.org:22/tfs/My Projects/FooBar

This commit adds support for such urls by implementing two changes.
Firstly, when bitbake makes a git command line call the url is
surrounded by quotes so that the url, regardless of spaces, is
treated as one argument. Secondly, additional parsing of various
filepath variables, which are based off of the url, are now
completed with any spaces in the url replaced with underscores.

(Bitbake rev: c4a51b7f4fd8a3c7d63c184675c014ec955d2606)

Signed-off-by: Charlie Davies &lt;charles.davies@whitetree.xyz&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
(cherry picked from commit eb38b6f0935763f7ba19e5618f376fcae1dac41a)
Signed-off-by: Steve Sakoman &lt;steve@sakoman.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
