mirror of
https://git.yoctoproject.org/poky
synced 2026-01-29 21:08:42 +01:00
bitbake: fetch2/git: ignore comments in .gitattributes when detecting LFS
Fixes [YOCTO 15917] When fetching a git repository the .gitattributes file is scanned, checking if LFS support is required for the repository. This scan checks if the word "lfs" is present in the file, however the used regex doesn't account for comments, which makes some repositories[1] be to misidentified as requiring LFS support (which fails fetching, in case lfs support isn't installed on the build host). To avoid it, change the used regex to ignore lines starting with "#". [1]: e.g. https://github.com/MicrochipTech/cryptoauthlib (Bitbake rev: 7917a758fc328747116c7899e689171bd0efc883) Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
731b1f50c8
commit
5bdce86cde
@@ -829,7 +829,7 @@ class Git(FetchMethod):
|
||||
"""
|
||||
Check if the repository has 'lfs' (large file) content
|
||||
"""
|
||||
cmd = "%s grep lfs %s:.gitattributes | wc -l" % (
|
||||
cmd = "%s grep '^[^#].*lfs' %s:.gitattributes | wc -l" % (
|
||||
ud.basecmd, ud.revision)
|
||||
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user