mirror of
https://git.yoctoproject.org/poky
synced 2026-05-02 18:32:15 +02:00
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>
This commit is contained in:
@@ -213,6 +213,9 @@ class Git(FetchMethod):
|
||||
runfetchcmd("%s prune-packed" % ud.basecmd, d)
|
||||
runfetchcmd("%s pack-redundant --all | xargs -r rm" % ud.basecmd, d)
|
||||
ud.repochanged = True
|
||||
for name in ud.names:
|
||||
if not self._contains_ref(ud.revisions[name], ud.branches[name], d):
|
||||
raise bb.fetch2.FetchError("Unable to find revision %s in branch %s even from upstream" % (ud.revisions[name], ud.branches[name]))
|
||||
|
||||
def build_mirror_data(self, ud, d):
|
||||
# Generate a mirror tarball if needed
|
||||
|
||||
Reference in New Issue
Block a user