summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-12-05 15:21:38 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-12-05 16:27:13 +0000
commitf19546e02d3318ee69fd0c34e21aa97b74c987ec (patch)
tree6aa814c224aa42642f94dc1d8abd819f0b93c9b7 /bitbake
parent4bac6a83b34374a9abc8eac9116302af9f49f427 (diff)
downloadpoky-f19546e02d3318ee69fd0c34e21aa97b74c987ec.tar.gz
bitbake: fetch2/git: Add sanity check to ensure we really did fetch the correct revisions
The fetcher made the rather bold assumption that if it fetched from the upstream, the revisions were present and correct. These checks are fast and ensure that really is the case. The avoids accidental network accessed and missing branch configuration problems. (Bitbake rev: a9112a102a89049cda597dad449e922c9e957a5d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/fetch2/git.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
index a9470e40d8..2b9f8af940 100644
--- a/bitbake/lib/bb/fetch2/git.py
+++ b/bitbake/lib/bb/fetch2/git.py
@@ -213,6 +213,9 @@ class Git(FetchMethod):
213 runfetchcmd("%s prune-packed" % ud.basecmd, d) 213 runfetchcmd("%s prune-packed" % ud.basecmd, d)
214 runfetchcmd("%s pack-redundant --all | xargs -r rm" % ud.basecmd, d) 214 runfetchcmd("%s pack-redundant --all | xargs -r rm" % ud.basecmd, d)
215 ud.repochanged = True 215 ud.repochanged = True
216 for name in ud.names:
217 if not self._contains_ref(ud.revisions[name], ud.branches[name], d):
218 raise bb.fetch2.FetchError("Unable to find revision %s in branch %s even from upstream" % (ud.revisions[name], ud.branches[name]))
216 219
217 def build_mirror_data(self, ud, d): 220 def build_mirror_data(self, ud, d):
218 # Generate a mirror tarball if needed 221 # Generate a mirror tarball if needed