diff options
Diffstat (limited to 'bitbake/lib/bb/fetch2/repo.py')
-rw-r--r-- | bitbake/lib/bb/fetch2/repo.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/bitbake/lib/bb/fetch2/repo.py b/bitbake/lib/bb/fetch2/repo.py index c22d9b5578..8c7e81853a 100644 --- a/bitbake/lib/bb/fetch2/repo.py +++ b/bitbake/lib/bb/fetch2/repo.py | |||
@@ -45,6 +45,8 @@ class Repo(FetchMethod): | |||
45 | "master". | 45 | "master". |
46 | """ | 46 | """ |
47 | 47 | ||
48 | ud.basecmd = d.getVar("FETCHCMD_repo") or "/usr/bin/env repo" | ||
49 | |||
48 | ud.proto = ud.parm.get('protocol', 'git') | 50 | ud.proto = ud.parm.get('protocol', 'git') |
49 | ud.branch = ud.parm.get('branch', 'master') | 51 | ud.branch = ud.parm.get('branch', 'master') |
50 | ud.manifest = ud.parm.get('manifest', 'default.xml') | 52 | ud.manifest = ud.parm.get('manifest', 'default.xml') |
@@ -60,8 +62,8 @@ class Repo(FetchMethod): | |||
60 | logger.debug(1, "%s already exists (or was stashed). Skipping repo init / sync.", ud.localpath) | 62 | logger.debug(1, "%s already exists (or was stashed). Skipping repo init / sync.", ud.localpath) |
61 | return | 63 | return |
62 | 64 | ||
65 | repodir = d.getVar("REPODIR") or (d.getVar("DL_DIR") + "/repo") | ||
63 | gitsrcname = "%s%s" % (ud.host, ud.path.replace("/", ".")) | 66 | gitsrcname = "%s%s" % (ud.host, ud.path.replace("/", ".")) |
64 | repodir = d.getVar("REPODIR") or os.path.join(d.getVar("DL_DIR"), "repo") | ||
65 | codir = os.path.join(repodir, gitsrcname, ud.manifest) | 67 | codir = os.path.join(repodir, gitsrcname, ud.manifest) |
66 | 68 | ||
67 | if ud.user: | 69 | if ud.user: |
@@ -72,11 +74,11 @@ class Repo(FetchMethod): | |||
72 | repodir = os.path.join(codir, "repo") | 74 | repodir = os.path.join(codir, "repo") |
73 | bb.utils.mkdirhier(repodir) | 75 | bb.utils.mkdirhier(repodir) |
74 | if not os.path.exists(os.path.join(repodir, ".repo")): | 76 | 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) | 77 | bb.fetch2.check_network_access(d, "%s init -m %s -b %s -u %s://%s%s%s" % (ud.basecmd, 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, workdir=repodir) | 78 | runfetchcmd("%s init -m %s -b %s -u %s://%s%s%s" % (ud.basecmd, ud.manifest, ud.branch, ud.proto, username, ud.host, ud.path), d, workdir=repodir) |
77 | 79 | ||
78 | bb.fetch2.check_network_access(d, "repo sync %s" % ud.url, ud.url) | 80 | bb.fetch2.check_network_access(d, "%s sync %s" % (ud.basecmd, ud.url), ud.url) |
79 | runfetchcmd("repo sync", d, workdir=repodir) | 81 | runfetchcmd("%s sync" % ud.basecmd, d, workdir=repodir) |
80 | 82 | ||
81 | scmdata = ud.parm.get("scmdata", "") | 83 | scmdata = ud.parm.get("scmdata", "") |
82 | if scmdata == "keep": | 84 | if scmdata == "keep": |