diff options
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/fetch2/git.py | 7 | ||||
-rw-r--r-- | bitbake/lib/bb/tests/fetch.py | 8 |
2 files changed, 7 insertions, 8 deletions
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py index 490d57fbbf..df9538a60d 100644 --- a/bitbake/lib/bb/fetch2/git.py +++ b/bitbake/lib/bb/fetch2/git.py | |||
@@ -220,7 +220,12 @@ class Git(FetchMethod): | |||
220 | ud.shallow = False | 220 | ud.shallow = False |
221 | 221 | ||
222 | if ud.usehead: | 222 | if ud.usehead: |
223 | ud.unresolvedrev['default'] = 'HEAD' | 223 | # When usehead is set let's associate 'HEAD' with the unresolved |
224 | # rev of this repository. This will get resolved into a revision | ||
225 | # later. If an actual revision happens to have also been provided | ||
226 | # then this setting will be overridden. | ||
227 | for name in ud.names: | ||
228 | ud.unresolvedrev[name] = 'HEAD' | ||
224 | 229 | ||
225 | ud.basecmd = d.getVar("FETCHCMD_git") or "git -c core.fsyncobjectfiles=0" | 230 | ud.basecmd = d.getVar("FETCHCMD_git") or "git -c core.fsyncobjectfiles=0" |
226 | 231 | ||
diff --git a/bitbake/lib/bb/tests/fetch.py b/bitbake/lib/bb/tests/fetch.py index 64cc9fa76b..1452d76151 100644 --- a/bitbake/lib/bb/tests/fetch.py +++ b/bitbake/lib/bb/tests/fetch.py | |||
@@ -698,13 +698,7 @@ class FetcherLocalTest(FetcherTest): | |||
698 | # Fetch and check revision | 698 | # Fetch and check revision |
699 | self.d.setVar("SRCREV", "AUTOINC") | 699 | self.d.setVar("SRCREV", "AUTOINC") |
700 | url = "git://" + src_dir + ";protocol=file;usehead=1;name=newName" | 700 | url = "git://" + src_dir + ";protocol=file;usehead=1;name=newName" |
701 | try: | 701 | fetcher = bb.fetch.Fetch([url], self.d) |
702 | fetcher = bb.fetch.Fetch([url], self.d) | ||
703 | except Exception: | ||
704 | # TODO: We currently expect this test to fail. Drop the try and | ||
705 | # assert when usehead has been fixed. | ||
706 | return | ||
707 | self.assertEqual(1, 0) | ||
708 | fetcher.download() | 702 | fetcher.download() |
709 | fetcher.unpack(self.unpackdir) | 703 | fetcher.unpack(self.unpackdir) |
710 | stdout = bb.process.run("git rev-parse HEAD", | 704 | stdout = bb.process.run("git rev-parse HEAD", |