* [PATCH] fetch2/git: Add sanity check to ensure we really did fetch the correct revisions
@ 2013-12-05 15:21 Richard Purdie
0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2013-12-05 15:21 UTC (permalink / raw)
To: bitbake-devel; +Cc: Gary Thomas
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.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
index a9470e4..2b9f8af 100644
--- a/bitbake/lib/bb/fetch2/git.py
+++ b/bitbake/lib/bb/fetch2/git.py
@@ -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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-12-05 15:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-05 15:21 [PATCH] fetch2/git: Add sanity check to ensure we really did fetch the correct revisions Richard Purdie
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.