diff options
author | Andre McCurdy <armccurdy@gmail.com> | 2018-06-05 12:13:50 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-06-15 17:57:30 +0100 |
commit | 783829427157b82dd021be345fe00afdf4d84a68 (patch) | |
tree | 46f95f4f37aabbcb5dc6101f222469cd25c914b6 /bitbake/lib/bb/fetch2/cvs.py | |
parent | b054015357b2b03f308af00a41b29c649cbca171 (diff) | |
download | poky-783829427157b82dd021be345fe00afdf4d84a68.tar.gz |
bitbake: fetch2: unify the way fetchers determine DL_DIR and FETCHCMD
Currently there is quite some variation between the fetchers in terms
of how they determine the subdirectory within DL_DIR and the base
fetch command to run. Some rely on variables being set externally
(e.g. from bitbake.conf in oe-core), some respect these external
variables but provide fallback defaults and some use only hardcoded
internal values. Try to unify the approach used across the various
fetchers.
(Bitbake rev: efd5e35af4b08501c67e8b30f30d9457f6fdf610)
Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2/cvs.py')
-rw-r--r-- | bitbake/lib/bb/fetch2/cvs.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bitbake/lib/bb/fetch2/cvs.py b/bitbake/lib/bb/fetch2/cvs.py index 490c954718..0e0a3196f8 100644 --- a/bitbake/lib/bb/fetch2/cvs.py +++ b/bitbake/lib/bb/fetch2/cvs.py | |||
@@ -110,7 +110,7 @@ class Cvs(FetchMethod): | |||
110 | if ud.tag: | 110 | if ud.tag: |
111 | options.append("-r %s" % ud.tag) | 111 | options.append("-r %s" % ud.tag) |
112 | 112 | ||
113 | cvsbasecmd = d.getVar("FETCHCMD_cvs") | 113 | cvsbasecmd = d.getVar("FETCHCMD_cvs") or "/usr/bin/env cvs" |
114 | cvscmd = cvsbasecmd + " '-d" + cvsroot + "' co " + " ".join(options) + " " + ud.module | 114 | cvscmd = cvsbasecmd + " '-d" + cvsroot + "' co " + " ".join(options) + " " + ud.module |
115 | cvsupdatecmd = cvsbasecmd + " '-d" + cvsroot + "' update -d -P " + " ".join(options) | 115 | cvsupdatecmd = cvsbasecmd + " '-d" + cvsroot + "' update -d -P " + " ".join(options) |
116 | 116 | ||
@@ -121,7 +121,8 @@ class Cvs(FetchMethod): | |||
121 | # create module directory | 121 | # create module directory |
122 | logger.debug(2, "Fetch: checking for module directory") | 122 | logger.debug(2, "Fetch: checking for module directory") |
123 | pkg = d.getVar('PN') | 123 | pkg = d.getVar('PN') |
124 | pkgdir = os.path.join(d.getVar('CVSDIR'), pkg) | 124 | cvsdir = d.getVar("CVSDIR") or (d.getVar("DL_DIR") + "/cvs") |
125 | pkgdir = os.path.join(cvsdir, pkg) | ||
125 | moddir = os.path.join(pkgdir, localdir) | 126 | moddir = os.path.join(pkgdir, localdir) |
126 | workdir = None | 127 | workdir = None |
127 | if os.access(os.path.join(moddir, 'CVS'), os.R_OK): | 128 | if os.access(os.path.join(moddir, 'CVS'), os.R_OK): |