summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-02-02 17:46:37 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-02-10 23:36:49 +0000
commite8878a7d97fcb186a9c5166bc77a87daaba8ca3d (patch)
treea473573c8267bed788d849410ec6f604c7efc474 /lib
parent7b7a4517c60025c075dc8da973ceb2860d4c1e06 (diff)
downloadbitbake-e8878a7d97fcb186a9c5166bc77a87daaba8ca3d.tar.gz
bitbake/fetch2/git: Ensure target directory exists when copying files
(From Poky rev: adfa6c40dadebb18bfd457859300d8c093b007f7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/bb/fetch2/git.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/bb/fetch2/git.py b/lib/bb/fetch2/git.py
index c54d826a0..d396d2458 100644
--- a/lib/bb/fetch2/git.py
+++ b/lib/bb/fetch2/git.py
@@ -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)