diff options
Diffstat (limited to 'bitbake/lib/bb/fetch/cvs.py')
| -rw-r--r-- | bitbake/lib/bb/fetch/cvs.py | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/bitbake/lib/bb/fetch/cvs.py b/bitbake/lib/bb/fetch/cvs.py index 461a2f50f9..10ec700dc9 100644 --- a/bitbake/lib/bb/fetch/cvs.py +++ b/bitbake/lib/bb/fetch/cvs.py | |||
| @@ -133,21 +133,9 @@ class Cvs(Fetch): | |||
| 133 | bb.debug(1, "%s already exists, skipping cvs checkout." % tarfn) | 133 | bb.debug(1, "%s already exists, skipping cvs checkout." % tarfn) |
| 134 | continue | 134 | continue |
| 135 | 135 | ||
| 136 | pn = data.getVar('PN', d, 1) | 136 | # try to use the tarball stash |
| 137 | cvs_tarball_stash = None | 137 | if Fetch.try_mirror(d, tarfn): |
| 138 | if pn: | 138 | continue |
| 139 | cvs_tarball_stash = data.getVar('CVS_TARBALL_STASH_%s' % pn, d, 1) | ||
| 140 | if cvs_tarball_stash == None: | ||
| 141 | cvs_tarball_stash = data.getVar('CVS_TARBALL_STASH', d, 1) | ||
| 142 | if cvs_tarball_stash: | ||
| 143 | fetchcmd = data.getVar("FETCHCOMMAND_wget", d, 1) | ||
| 144 | uri = cvs_tarball_stash + tarfn | ||
| 145 | bb.note("fetch " + uri) | ||
| 146 | fetchcmd = fetchcmd.replace("${URI}", uri) | ||
| 147 | ret = os.system(fetchcmd) | ||
| 148 | if ret == 0: | ||
| 149 | bb.note("Fetched %s from tarball stash, skipping checkout" % tarfn) | ||
| 150 | continue | ||
| 151 | 139 | ||
| 152 | if date: | 140 | if date: |
| 153 | options.append("-D %s" % date) | 141 | options.append("-D %s" % date) |
| @@ -194,7 +182,7 @@ class Cvs(Fetch): | |||
| 194 | bb.debug(1, "Running %s" % cvscmd) | 182 | bb.debug(1, "Running %s" % cvscmd) |
| 195 | myret = os.system(cvscmd) | 183 | myret = os.system(cvscmd) |
| 196 | 184 | ||
| 197 | if myret != 0: | 185 | if myret != 0 or not os.access(moddir, os.R_OK): |
| 198 | try: | 186 | try: |
| 199 | os.rmdir(moddir) | 187 | os.rmdir(moddir) |
| 200 | except OSError: | 188 | except OSError: |
