summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/fetch')
-rw-r--r--bitbake/lib/bb/fetch/cvs.py4
-rw-r--r--bitbake/lib/bb/fetch/perforce.py26
-rw-r--r--bitbake/lib/bb/fetch/wget.py2
3 files changed, 16 insertions, 16 deletions
diff --git a/bitbake/lib/bb/fetch/cvs.py b/bitbake/lib/bb/fetch/cvs.py
index c0d43618f9..61976f7ef4 100644
--- a/bitbake/lib/bb/fetch/cvs.py
+++ b/bitbake/lib/bb/fetch/cvs.py
@@ -139,8 +139,8 @@ class Cvs(Fetch):
139 bb.msg.debug(2, bb.msg.domain.Fetcher, "Fetch: checking for module directory") 139 bb.msg.debug(2, bb.msg.domain.Fetcher, "Fetch: checking for module directory")
140 pkg = data.expand('${PN}', d) 140 pkg = data.expand('${PN}', d)
141 pkgdir = os.path.join(data.expand('${CVSDIR}', localdata), pkg) 141 pkgdir = os.path.join(data.expand('${CVSDIR}', localdata), pkg)
142 moddir = os.path.join(pkgdir,localdir) 142 moddir = os.path.join(pkgdir, localdir)
143 if os.access(os.path.join(moddir,'CVS'), os.R_OK): 143 if os.access(os.path.join(moddir, 'CVS'), os.R_OK):
144 bb.msg.note(1, bb.msg.domain.Fetcher, "Update " + loc) 144 bb.msg.note(1, bb.msg.domain.Fetcher, "Update " + loc)
145 # update sources there 145 # update sources there
146 os.chdir(moddir) 146 os.chdir(moddir)
diff --git a/bitbake/lib/bb/fetch/perforce.py b/bitbake/lib/bb/fetch/perforce.py
index 67de6f59fa..5b6c601876 100644
--- a/bitbake/lib/bb/fetch/perforce.py
+++ b/bitbake/lib/bb/fetch/perforce.py
@@ -35,15 +35,15 @@ class Perforce(Fetch):
35 def supports(self, url, ud, d): 35 def supports(self, url, ud, d):
36 return ud.type in ['p4'] 36 return ud.type in ['p4']
37 37
38 def doparse(url,d): 38 def doparse(url, d):
39 parm = {} 39 parm = {}
40 path = url.split("://")[1] 40 path = url.split("://")[1]
41 delim = path.find("@"); 41 delim = path.find("@");
42 if delim != -1: 42 if delim != -1:
43 (user,pswd,host,port) = path.split('@')[0].split(":") 43 (user, pswd, host, port) = path.split('@')[0].split(":")
44 path = path.split('@')[1] 44 path = path.split('@')[1]
45 else: 45 else:
46 (host,port) = data.getVar('P4PORT', d).split(':') 46 (host, port) = data.getVar('P4PORT', d).split(':')
47 user = "" 47 user = ""
48 pswd = "" 48 pswd = ""
49 49
@@ -53,19 +53,19 @@ class Perforce(Fetch):
53 plist = path.split(';') 53 plist = path.split(';')
54 for item in plist: 54 for item in plist:
55 if item.count('='): 55 if item.count('='):
56 (key,value) = item.split('=') 56 (key, value) = item.split('=')
57 keys.append(key) 57 keys.append(key)
58 values.append(value) 58 values.append(value)
59 59
60 parm = dict(zip(keys,values)) 60 parm = dict(zip(keys, values))
61 path = "//" + path.split(';')[0] 61 path = "//" + path.split(';')[0]
62 host += ":%s" % (port) 62 host += ":%s" % (port)
63 parm["cset"] = Perforce.getcset(d, path, host, user, pswd, parm) 63 parm["cset"] = Perforce.getcset(d, path, host, user, pswd, parm)
64 64
65 return host,path,user,pswd,parm 65 return host, path, user, pswd, parm
66 doparse = staticmethod(doparse) 66 doparse = staticmethod(doparse)
67 67
68 def getcset(d, depot,host,user,pswd,parm): 68 def getcset(d, depot, host, user, pswd, parm):
69 p4opt = "" 69 p4opt = ""
70 if "cset" in parm: 70 if "cset" in parm:
71 return parm["cset"]; 71 return parm["cset"];
@@ -97,7 +97,7 @@ class Perforce(Fetch):
97 97
98 def localpath(self, url, ud, d): 98 def localpath(self, url, ud, d):
99 99
100 (host,path,user,pswd,parm) = Perforce.doparse(url,d) 100 (host, path, user, pswd, parm) = Perforce.doparse(url, d)
101 101
102 # If a label is specified, we use that as our filename 102 # If a label is specified, we use that as our filename
103 103
@@ -115,7 +115,7 @@ class Perforce(Fetch):
115 115
116 cset = Perforce.getcset(d, path, host, user, pswd, parm) 116 cset = Perforce.getcset(d, path, host, user, pswd, parm)
117 117
118 ud.localfile = data.expand('%s+%s+%s.tar.gz' % (host,base.replace('/', '.'), cset), d) 118 ud.localfile = data.expand('%s+%s+%s.tar.gz' % (host, base.replace('/', '.'), cset), d)
119 119
120 return os.path.join(data.getVar("DL_DIR", d, 1), ud.localfile) 120 return os.path.join(data.getVar("DL_DIR", d, 1), ud.localfile)
121 121
@@ -124,7 +124,7 @@ class Perforce(Fetch):
124 Fetch urls 124 Fetch urls
125 """ 125 """
126 126
127 (host,depot,user,pswd,parm) = Perforce.doparse(loc, d) 127 (host, depot, user, pswd, parm) = Perforce.doparse(loc, d)
128 128
129 if depot.find('/...') != -1: 129 if depot.find('/...') != -1:
130 path = depot[:depot.find('/...')] 130 path = depot[:depot.find('/...')]
@@ -164,10 +164,10 @@ class Perforce(Fetch):
164 raise FetchError(module) 164 raise FetchError(module)
165 165
166 if "label" in parm: 166 if "label" in parm:
167 depot = "%s@%s" % (depot,parm["label"]) 167 depot = "%s@%s" % (depot, parm["label"])
168 else: 168 else:
169 cset = Perforce.getcset(d, depot, host, user, pswd, parm) 169 cset = Perforce.getcset(d, depot, host, user, pswd, parm)
170 depot = "%s@%s" % (depot,cset) 170 depot = "%s@%s" % (depot, cset)
171 171
172 os.chdir(tmpfile) 172 os.chdir(tmpfile)
173 bb.msg.note(1, bb.msg.domain.Fetcher, "Fetch " + loc) 173 bb.msg.note(1, bb.msg.domain.Fetcher, "Fetch " + loc)
@@ -189,7 +189,7 @@ class Perforce(Fetch):
189 dest = list[0][len(path)+1:] 189 dest = list[0][len(path)+1:]
190 where = dest.find("#") 190 where = dest.find("#")
191 191
192 os.system("%s%s print -o %s/%s %s" % (p4cmd, p4opt, module,dest[:where],list[0])) 192 os.system("%s%s print -o %s/%s %s" % (p4cmd, p4opt, module, dest[:where], list[0]))
193 count = count + 1 193 count = count + 1
194 194
195 if count == 0: 195 if count == 0:
diff --git a/bitbake/lib/bb/fetch/wget.py b/bitbake/lib/bb/fetch/wget.py
index 8b687372a4..581362038a 100644
--- a/bitbake/lib/bb/fetch/wget.py
+++ b/bitbake/lib/bb/fetch/wget.py
@@ -38,7 +38,7 @@ class Wget(Fetch):
38 """ 38 """
39 Check to see if a given url can be fetched with wget. 39 Check to see if a given url can be fetched with wget.
40 """ 40 """
41 return ud.type in ['http','https','ftp'] 41 return ud.type in ['http', 'https', 'ftp']
42 42
43 def localpath(self, url, ud, d): 43 def localpath(self, url, ud, d):
44 44