summaryrefslogtreecommitdiffstats
path: root/lib/bb/fetch2
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-02-07 09:34:24 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-02-10 23:37:09 +0000
commit5ef9b378f5c15d1c90d443ba513703471ffd0649 (patch)
tree3d06619daef605b8ac2ff5d2695ebca7461ab84a /lib/bb/fetch2
parentac8982c2e004525e00785e64a6215b41c75546b3 (diff)
downloadbitbake-5ef9b378f5c15d1c90d443ba513703471ffd0649.tar.gz
bitbake/fetch2/git.py: Ensure that forcefetch operates in the correct directory for calling _contains_ref()
(From Poky rev: 330886826770ff6ec1449dc375cb4c3604b2736b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/fetch2')
-rw-r--r--lib/bb/fetch2/git.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/bb/fetch2/git.py b/lib/bb/fetch2/git.py
index 8386ecca0..a78e4519e 100644
--- a/lib/bb/fetch2/git.py
+++ b/lib/bb/fetch2/git.py
@@ -81,6 +81,9 @@ class Git(FetchMethod):
return ud.clonedir
def forcefetch(self, url, ud, d):
+ if not os.path.exists(ud.clonedir):
+ return True
+ os.chdir(ud.clonedir)
for name in ud.names:
if not self._contains_ref(ud.revisions[name], d):
return True