bitbake/fetch2/git: Ensure target directory exists when copying files

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie 2011-02-02 17:46:37 +00:00
parent 43addfd01d
commit adfa6c40da
1 changed files with 1 additions and 0 deletions

View File

@ -156,6 +156,7 @@ class Git(Fetch):
runfetchcmd("git clone -s -n %s %s" % (ud.clonedir, destdir), d)
if os.path.exists("%s/.git/refs/remotes/origin" % ud.clonedir):
bb.mkdirhier("%s/.git/refs/remotes/origin/" % destdir)
runfetchcmd("cp -af %s/.git/refs/remotes/origin/* %s/.git/refs/remotes/origin/" %(ud.clonedir, destdir), d)
if os.path.exists("%s/.git/packed-refs" % ud.clonedir):
runfetchcmd("cp -af %s/.git/packed-refs %s/.git/" %(ud.clonedir, destdir), d)