mirror of
https://git.yoctoproject.org/poky
synced 2026-04-21 03:32:12 +02:00
bitbake/fetch2/git: Ensure target directory exists when copying files
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user