diff options
Diffstat (limited to 'bitbake/lib/bb/fetch2/repo.py')
-rw-r--r-- | bitbake/lib/bb/fetch2/repo.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/bitbake/lib/bb/fetch2/repo.py b/bitbake/lib/bb/fetch2/repo.py index fd64b7e626..ecc6e68e97 100644 --- a/bitbake/lib/bb/fetch2/repo.py +++ b/bitbake/lib/bb/fetch2/repo.py | |||
@@ -69,15 +69,14 @@ class Repo(FetchMethod): | |||
69 | else: | 69 | else: |
70 | username = "" | 70 | username = "" |
71 | 71 | ||
72 | bb.utils.mkdirhier(os.path.join(codir, "repo")) | 72 | repodir = os.path.join(codir, "repo") |
73 | os.chdir(os.path.join(codir, "repo")) | 73 | bb.utils.mkdirhier(repodir) |
74 | if not os.path.exists(os.path.join(codir, "repo", ".repo")): | 74 | if not os.path.exists(os.path.join(repodir, ".repo")): |
75 | bb.fetch2.check_network_access(d, "repo init -m %s -b %s -u %s://%s%s%s" % (ud.manifest, ud.branch, ud.proto, username, ud.host, ud.path), ud.url) | 75 | bb.fetch2.check_network_access(d, "repo init -m %s -b %s -u %s://%s%s%s" % (ud.manifest, ud.branch, ud.proto, username, ud.host, ud.path), ud.url) |
76 | runfetchcmd("repo init -m %s -b %s -u %s://%s%s%s" % (ud.manifest, ud.branch, ud.proto, username, ud.host, ud.path), d) | 76 | runfetchcmd("repo init -m %s -b %s -u %s://%s%s%s" % (ud.manifest, ud.branch, ud.proto, username, ud.host, ud.path), d, workdir=repodir) |
77 | 77 | ||
78 | bb.fetch2.check_network_access(d, "repo sync %s" % ud.url, ud.url) | 78 | bb.fetch2.check_network_access(d, "repo sync %s" % ud.url, ud.url) |
79 | runfetchcmd("repo sync", d) | 79 | runfetchcmd("repo sync", d, workdir=repodir) |
80 | os.chdir(codir) | ||
81 | 80 | ||
82 | scmdata = ud.parm.get("scmdata", "") | 81 | scmdata = ud.parm.get("scmdata", "") |
83 | if scmdata == "keep": | 82 | if scmdata == "keep": |
@@ -86,7 +85,7 @@ class Repo(FetchMethod): | |||
86 | tar_flags = "--exclude='.repo' --exclude='.git'" | 85 | tar_flags = "--exclude='.repo' --exclude='.git'" |
87 | 86 | ||
88 | # Create a cache | 87 | # Create a cache |
89 | runfetchcmd("tar %s -czf %s %s" % (tar_flags, ud.localpath, os.path.join(".", "*") ), d) | 88 | runfetchcmd("tar %s -czf %s %s" % (tar_flags, ud.localpath, os.path.join(".", "*") ), d, workdir=codir) |
90 | 89 | ||
91 | def supports_srcrev(self): | 90 | def supports_srcrev(self): |
92 | return False | 91 | return False |