diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-11-19 14:32:08 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-11-22 12:03:02 +0000 |
commit | 9d7f8e2a206f8266fd0766b6161dbd1bf6b787a7 (patch) | |
tree | 2002648fd17558c7d895d672aa65fa46f4b82250 /bitbake/lib/bb/fetch2/cvs.py | |
parent | 4acc7322a2ada941b803e1aee23d84351888eef0 (diff) | |
download | poky-9d7f8e2a206f8266fd0766b6161dbd1bf6b787a7.tar.gz |
bitbake: fetch2: Stop passing around the pointless url parameter
There is no good reason to keep passing around the url parameter when
its contained within urldata (ud). This is left around due to
legacy reasons, some functions take it, some don't and its time
to cleanup.
This is fetcher internal API, there are a tiny number of external users
of the internal API (buildhistory and distrodata) which can be fixed up
after this change.
(Bitbake rev: 6a48474de9505a3700863f31839a7c53c5e18a8d)
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 | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bitbake/lib/bb/fetch2/cvs.py b/bitbake/lib/bb/fetch2/cvs.py index 0a672a33ef..d27d96f68c 100644 --- a/bitbake/lib/bb/fetch2/cvs.py +++ b/bitbake/lib/bb/fetch2/cvs.py | |||
@@ -36,7 +36,7 @@ class Cvs(FetchMethod): | |||
36 | """ | 36 | """ |
37 | Class to fetch a module or modules from cvs repositories | 37 | Class to fetch a module or modules from cvs repositories |
38 | """ | 38 | """ |
39 | def supports(self, url, ud, d): | 39 | def supports(self, ud, d): |
40 | """ | 40 | """ |
41 | Check to see if a given url can be fetched with cvs. | 41 | Check to see if a given url can be fetched with cvs. |
42 | """ | 42 | """ |
@@ -65,14 +65,14 @@ class Cvs(FetchMethod): | |||
65 | 65 | ||
66 | ud.localfile = bb.data.expand('%s_%s_%s_%s%s%s.tar.gz' % (ud.module.replace('/', '.'), ud.host, ud.tag, ud.date, norecurse, fullpath), d) | 66 | ud.localfile = bb.data.expand('%s_%s_%s_%s%s%s.tar.gz' % (ud.module.replace('/', '.'), ud.host, ud.tag, ud.date, norecurse, fullpath), d) |
67 | 67 | ||
68 | def need_update(self, url, ud, d): | 68 | def need_update(self, ud, d): |
69 | if (ud.date == "now"): | 69 | if (ud.date == "now"): |
70 | return True | 70 | return True |
71 | if not os.path.exists(ud.localpath): | 71 | if not os.path.exists(ud.localpath): |
72 | return True | 72 | return True |
73 | return False | 73 | return False |
74 | 74 | ||
75 | def download(self, loc, ud, d): | 75 | def download(self, ud, d): |
76 | 76 | ||
77 | method = ud.parm.get('method', 'pserver') | 77 | method = ud.parm.get('method', 'pserver') |
78 | localdir = ud.parm.get('localdir', ud.module) | 78 | localdir = ud.parm.get('localdir', ud.module) |
@@ -124,13 +124,13 @@ class Cvs(FetchMethod): | |||
124 | pkgdir = os.path.join(d.getVar('CVSDIR', True), pkg) | 124 | pkgdir = os.path.join(d.getVar('CVSDIR', True), pkg) |
125 | moddir = os.path.join(pkgdir, localdir) | 125 | moddir = os.path.join(pkgdir, localdir) |
126 | if os.access(os.path.join(moddir, 'CVS'), os.R_OK): | 126 | if os.access(os.path.join(moddir, 'CVS'), os.R_OK): |
127 | logger.info("Update " + loc) | 127 | logger.info("Update " + ud.url) |
128 | bb.fetch2.check_network_access(d, cvsupdatecmd, ud.url) | 128 | bb.fetch2.check_network_access(d, cvsupdatecmd, ud.url) |
129 | # update sources there | 129 | # update sources there |
130 | os.chdir(moddir) | 130 | os.chdir(moddir) |
131 | cmd = cvsupdatecmd | 131 | cmd = cvsupdatecmd |
132 | else: | 132 | else: |
133 | logger.info("Fetch " + loc) | 133 | logger.info("Fetch " + ud.url) |
134 | # check out sources there | 134 | # check out sources there |
135 | bb.utils.mkdirhier(pkgdir) | 135 | bb.utils.mkdirhier(pkgdir) |
136 | os.chdir(pkgdir) | 136 | os.chdir(pkgdir) |