diff options
Diffstat (limited to 'bitbake/lib/bb/fetch/svn.py')
| -rw-r--r-- | bitbake/lib/bb/fetch/svn.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/bitbake/lib/bb/fetch/svn.py b/bitbake/lib/bb/fetch/svn.py index 375e8df055..34f8132257 100644 --- a/bitbake/lib/bb/fetch/svn.py +++ b/bitbake/lib/bb/fetch/svn.py | |||
| @@ -25,12 +25,14 @@ BitBake 'Fetch' implementation for svn. | |||
| 25 | 25 | ||
| 26 | import os | 26 | import os |
| 27 | import sys | 27 | import sys |
| 28 | import logging | ||
| 28 | import bb | 29 | import bb |
| 29 | from bb import data | 30 | from bb import data |
| 30 | from bb.fetch import Fetch | 31 | from bb.fetch import Fetch |
| 31 | from bb.fetch import FetchError | 32 | from bb.fetch import FetchError |
| 32 | from bb.fetch import MissingParameterError | 33 | from bb.fetch import MissingParameterError |
| 33 | from bb.fetch import runfetchcmd | 34 | from bb.fetch import runfetchcmd |
| 35 | from bb.fetch import logger | ||
| 34 | 36 | ||
| 35 | class Svn(Fetch): | 37 | class Svn(Fetch): |
| 36 | """Class to fetch a module or modules from svn repositories""" | 38 | """Class to fetch a module or modules from svn repositories""" |
| @@ -136,22 +138,22 @@ class Svn(Fetch): | |||
| 136 | def go(self, loc, ud, d): | 138 | def go(self, loc, ud, d): |
| 137 | """Fetch url""" | 139 | """Fetch url""" |
| 138 | 140 | ||
| 139 | bb.msg.debug(2, bb.msg.domain.Fetcher, "Fetch: checking for module directory '" + ud.moddir + "'") | 141 | logger.debug(2, "Fetch: checking for module directory '" + ud.moddir + "'") |
| 140 | 142 | ||
| 141 | if os.access(os.path.join(ud.moddir, '.svn'), os.R_OK): | 143 | if os.access(os.path.join(ud.moddir, '.svn'), os.R_OK): |
| 142 | svnupdatecmd = self._buildsvncommand(ud, d, "update") | 144 | svnupdatecmd = self._buildsvncommand(ud, d, "update") |
| 143 | bb.msg.note(1, bb.msg.domain.Fetcher, "Update " + loc) | 145 | logger.info("Update " + loc) |
| 144 | # update sources there | 146 | # update sources there |
| 145 | os.chdir(ud.moddir) | 147 | os.chdir(ud.moddir) |
| 146 | bb.msg.debug(1, bb.msg.domain.Fetcher, "Running %s" % svnupdatecmd) | 148 | logger.debug(1, "Running %s", svnupdatecmd) |
| 147 | runfetchcmd(svnupdatecmd, d) | 149 | runfetchcmd(svnupdatecmd, d) |
| 148 | else: | 150 | else: |
| 149 | svnfetchcmd = self._buildsvncommand(ud, d, "fetch") | 151 | svnfetchcmd = self._buildsvncommand(ud, d, "fetch") |
| 150 | bb.msg.note(1, bb.msg.domain.Fetcher, "Fetch " + loc) | 152 | logger.info("Fetch " + loc) |
| 151 | # check out sources there | 153 | # check out sources there |
| 152 | bb.mkdirhier(ud.pkgdir) | 154 | bb.mkdirhier(ud.pkgdir) |
| 153 | os.chdir(ud.pkgdir) | 155 | os.chdir(ud.pkgdir) |
| 154 | bb.msg.debug(1, bb.msg.domain.Fetcher, "Running %s" % svnfetchcmd) | 156 | logger.debug(1, "Running %s", svnfetchcmd) |
| 155 | runfetchcmd(svnfetchcmd, d) | 157 | runfetchcmd(svnfetchcmd, d) |
| 156 | 158 | ||
| 157 | os.chdir(ud.pkgdir) | 159 | os.chdir(ud.pkgdir) |
| @@ -179,7 +181,7 @@ class Svn(Fetch): | |||
| 179 | """ | 181 | """ |
| 180 | Return the latest upstream revision number | 182 | Return the latest upstream revision number |
| 181 | """ | 183 | """ |
| 182 | bb.msg.debug(2, bb.msg.domain.Fetcher, "SVN fetcher hitting network for %s" % url) | 184 | logger.debug(2, "SVN fetcher hitting network for %s", url) |
| 183 | 185 | ||
| 184 | output = runfetchcmd("LANG=C LC_ALL=C " + self._buildsvncommand(ud, d, "info"), d, True) | 186 | output = runfetchcmd("LANG=C LC_ALL=C " + self._buildsvncommand(ud, d, "info"), d, True) |
| 185 | 187 | ||
