diff options
Diffstat (limited to 'bitbake/lib/bb/fetch2/svn.py')
| -rw-r--r-- | bitbake/lib/bb/fetch2/svn.py | 18 | 
1 files changed, 9 insertions, 9 deletions
| diff --git a/bitbake/lib/bb/fetch2/svn.py b/bitbake/lib/bb/fetch2/svn.py index 123aa136eb..8847461913 100644 --- a/bitbake/lib/bb/fetch2/svn.py +++ b/bitbake/lib/bb/fetch2/svn.py | |||
| @@ -37,7 +37,7 @@ from bb.fetch2 import logger | |||
| 37 | 37 | ||
| 38 | class Svn(FetchMethod): | 38 | class Svn(FetchMethod): | 
| 39 | """Class to fetch a module or modules from svn repositories""" | 39 | """Class to fetch a module or modules from svn repositories""" | 
| 40 | def supports(self, url, ud, d): | 40 | def supports(self, ud, d): | 
| 41 | """ | 41 | """ | 
| 42 | Check to see if a given url can be fetched with svn. | 42 | Check to see if a given url can be fetched with svn. | 
| 43 | """ | 43 | """ | 
| @@ -112,14 +112,14 @@ class Svn(FetchMethod): | |||
| 112 | 112 | ||
| 113 | return svncmd | 113 | return svncmd | 
| 114 | 114 | ||
| 115 | def download(self, loc, ud, d): | 115 | def download(self, ud, d): | 
| 116 | """Fetch url""" | 116 | """Fetch url""" | 
| 117 | 117 | ||
| 118 | logger.debug(2, "Fetch: checking for module directory '" + ud.moddir + "'") | 118 | logger.debug(2, "Fetch: checking for module directory '" + ud.moddir + "'") | 
| 119 | 119 | ||
| 120 | if os.access(os.path.join(ud.moddir, '.svn'), os.R_OK): | 120 | if os.access(os.path.join(ud.moddir, '.svn'), os.R_OK): | 
| 121 | svnupdatecmd = self._buildsvncommand(ud, d, "update") | 121 | svnupdatecmd = self._buildsvncommand(ud, d, "update") | 
| 122 | logger.info("Update " + loc) | 122 | logger.info("Update " + ud.url) | 
| 123 | # update sources there | 123 | # update sources there | 
| 124 | os.chdir(ud.moddir) | 124 | os.chdir(ud.moddir) | 
| 125 | # We need to attempt to run svn upgrade first in case its an older working format | 125 | # We need to attempt to run svn upgrade first in case its an older working format | 
| @@ -132,7 +132,7 @@ class Svn(FetchMethod): | |||
| 132 | runfetchcmd(svnupdatecmd, d) | 132 | runfetchcmd(svnupdatecmd, d) | 
| 133 | else: | 133 | else: | 
| 134 | svnfetchcmd = self._buildsvncommand(ud, d, "fetch") | 134 | svnfetchcmd = self._buildsvncommand(ud, d, "fetch") | 
| 135 | logger.info("Fetch " + loc) | 135 | logger.info("Fetch " + ud.url) | 
| 136 | # check out sources there | 136 | # check out sources there | 
| 137 | bb.utils.mkdirhier(ud.pkgdir) | 137 | bb.utils.mkdirhier(ud.pkgdir) | 
| 138 | os.chdir(ud.pkgdir) | 138 | os.chdir(ud.pkgdir) | 
| @@ -160,13 +160,13 @@ class Svn(FetchMethod): | |||
| 160 | def supports_srcrev(self): | 160 | def supports_srcrev(self): | 
| 161 | return True | 161 | return True | 
| 162 | 162 | ||
| 163 | def _revision_key(self, url, ud, d, name): | 163 | def _revision_key(self, ud, d, name): | 
| 164 | """ | 164 | """ | 
| 165 | Return a unique key for the url | 165 | Return a unique key for the url | 
| 166 | """ | 166 | """ | 
| 167 | return "svn:" + ud.moddir | 167 | return "svn:" + ud.moddir | 
| 168 | 168 | ||
| 169 | def _latest_revision(self, url, ud, d, name): | 169 | def _latest_revision(self, ud, d, name): | 
| 170 | """ | 170 | """ | 
| 171 | Return the latest upstream revision number | 171 | Return the latest upstream revision number | 
| 172 | """ | 172 | """ | 
| @@ -180,12 +180,12 @@ class Svn(FetchMethod): | |||
| 180 | 180 | ||
| 181 | return revision | 181 | return revision | 
| 182 | 182 | ||
| 183 | def sortable_revision(self, url, ud, d, name): | 183 | def sortable_revision(self, ud, d, name): | 
| 184 | """ | 184 | """ | 
| 185 | Return a sortable revision number which in our case is the revision number | 185 | Return a sortable revision number which in our case is the revision number | 
| 186 | """ | 186 | """ | 
| 187 | 187 | ||
| 188 | return False, self._build_revision(url, ud, d) | 188 | return False, self._build_revision(ud, d) | 
| 189 | 189 | ||
| 190 | def _build_revision(self, url, ud, d): | 190 | def _build_revision(self, ud, d): | 
| 191 | return ud.revision | 191 | return ud.revision | 
