path: root/scripts
diff options
authorPaul Eggleton <>2015-11-22 21:07:57 (GMT)
committerRichard Purdie <>2015-12-01 21:32:03 (GMT)
commitb4d4d2116a90eedfc86dfae5ec0d282b62d1d292 (patch)
tree5d389793298bc34d2fe2da687a5ee7c3bb52f234 /scripts
parent9b7d45cf48dcda53f59a11e0d0cffe7ab226dc26 (diff)
devtool: upgrade: fetch remote repository before checking out new revision
If we're upgrading a recipe that fetches from git, and we've simply fetched a tarball of the repo instead of directly from the upstream repo (this can happen if you have PREMIRRORS set up as in poky with a core recipe, e.g. kernelshark) then we won't have any new revisions, and the checkout will fail with "fatal: reference is not a tree: <hash>". To avoid this, do a "git fetch" before checking out the new revision. (From OE-Core rev: c4daebf3fe797a8063dcbc2ab229be2fbedc8134) Signed-off-by: Paul Eggleton <> Signed-off-by: Ross Burton <> Signed-off-by: Richard Purdie <>
Diffstat (limited to 'scripts')
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/lib/devtool/ b/scripts/lib/devtool/
index 8851a6e..13e3096 100644
--- a/scripts/lib/devtool/
+++ b/scripts/lib/devtool/
@@ -199,6 +199,7 @@ def _extract_new_source(newpv, srctree, no_patch, srcrev, branch, keep_temp, tin
199 if srcrev: 199 if srcrev:
200 rev = srcrev 200 rev = srcrev
201 if uri.startswith('git://'): 201 if uri.startswith('git://'):
202 __run('git fetch')
202 __run('git checkout %s' % rev) 203 __run('git checkout %s' % rev)
203 __run('git tag -f devtool-base-new') 204 __run('git tag -f devtool-base-new')
204 md5 = None 205 md5 = None