bitbake/fetch2/git.py: Ensure that forcefetch operates in the correct directory for calling _contains_ref()

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie 2011-02-07 09:34:24 +00:00
parent 32dbc70e86
commit 3308868267
1 changed files with 3 additions and 0 deletions

View File

@ -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