diff options
author | Mauro Queirós <maurofrqueiros@gmail.com> | 2021-02-03 04:22:08 -1000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-02-05 12:18:38 +0000 |
commit | 1f4ca119bef0e06b8ed18f6c7878a3704014ec71 (patch) | |
tree | c2375c322507b7870fc30e9bc12730b3367954bb /bitbake/lib | |
parent | 9e56bfd02ea88c1b9a3b4a944f009c2f401a8e21 (diff) | |
download | poky-1f4ca119bef0e06b8ed18f6c7878a3704014ec71.tar.gz |
bitbake: git.py: Use the correct branch to check if the repository has LFS objects.
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 <maurofrqueiros@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 4fa67c2af830035a1ddedc14592ee25a15ebff22)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r-- | bitbake/lib/bb/fetch2/git.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py index bdbfe5c00f..07064c694f 100644 --- a/bitbake/lib/bb/fetch2/git.py +++ b/bitbake/lib/bb/fetch2/git.py | |||
@@ -566,8 +566,15 @@ class Git(FetchMethod): | |||
566 | """ | 566 | """ |
567 | Check if the repository has 'lfs' (large file) content | 567 | Check if the repository has 'lfs' (large file) content |
568 | """ | 568 | """ |
569 | cmd = "%s grep lfs HEAD:.gitattributes | wc -l" % ( | 569 | |
570 | ud.basecmd) | 570 | if not ud.nobranch: |
571 | branchname = ud.branches[ud.names[0]] | ||
572 | else: | ||
573 | branchname = "master" | ||
574 | |||
575 | cmd = "%s grep lfs origin/%s:.gitattributes | wc -l" % ( | ||
576 | ud.basecmd, ud.branches[ud.names[0]]) | ||
577 | |||
571 | try: | 578 | try: |
572 | output = runfetchcmd(cmd, d, quiet=True, workdir=wd) | 579 | output = runfetchcmd(cmd, d, quiet=True, workdir=wd) |
573 | if int(output) > 0: | 580 | if int(output) > 0: |