summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/build.py7
-rw-r--r--bitbake/lib/bb/fetch/local.py3
-rw-r--r--bitbake/lib/bb/fetch/wget.py5
-rw-r--r--bitbake/lib/bb/persist_data.py3
4 files changed, 11 insertions, 7 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py
index 1882733a5f..3d71013998 100644
--- a/bitbake/lib/bb/build.py
+++ b/bitbake/lib/bb/build.py
@@ -27,6 +27,7 @@
27 27
28from bb import data, event, mkdirhier, utils 28from bb import data, event, mkdirhier, utils
29import bb, os, sys 29import bb, os, sys
30import bb.utils
30 31
31# When we execute a python function we'd like certain things 32# When we execute a python function we'd like certain things
32# in all namespaces, hence we add them to __builtins__ 33# in all namespaces, hence we add them to __builtins__
@@ -107,7 +108,7 @@ def exec_func(func, d, dirs = None):
107 else: 108 else:
108 dirs = (data.expand(flags['dirs'], d) or "").split() 109 dirs = (data.expand(flags['dirs'], d) or "").split()
109 for adir in dirs: 110 for adir in dirs:
110 mkdirhier(adir) 111 bb.utils.mkdirhier(adir)
111 112
112 if len(dirs) > 0: 113 if len(dirs) > 0:
113 adir = dirs[-1] 114 adir = dirs[-1]
@@ -124,7 +125,7 @@ def exec_func(func, d, dirs = None):
124 t = data.getVar('T', d, 1) 125 t = data.getVar('T', d, 1)
125 if not t: 126 if not t:
126 bb.msg.fatal(bb.msg.domain.Build, "T not set") 127 bb.msg.fatal(bb.msg.domain.Build, "T not set")
127 mkdirhier(t) 128 bb.utils.mkdirhier(t)
128 logfile = "%s/log.%s.%s" % (t, func, str(os.getpid())) 129 logfile = "%s/log.%s.%s" % (t, func, str(os.getpid()))
129 runfile = "%s/run.%s.%s" % (t, func, str(os.getpid())) 130 runfile = "%s/run.%s.%s" % (t, func, str(os.getpid()))
130 131
@@ -320,7 +321,7 @@ def stamp_internal(task, d, file_name):
320 if not stamp: 321 if not stamp:
321 return 322 return
322 stamp = "%s.%s" % (stamp, task) 323 stamp = "%s.%s" % (stamp, task)
323 mkdirhier(os.path.dirname(stamp)) 324 bb.utils.mkdirhier(os.path.dirname(stamp))
324 # Remove the file and recreate to force timestamp 325 # Remove the file and recreate to force timestamp
325 # change on broken NFS filesystems 326 # change on broken NFS filesystems
326 if os.access(stamp, os.F_OK): 327 if os.access(stamp, os.F_OK):
diff --git a/bitbake/lib/bb/fetch/local.py b/bitbake/lib/bb/fetch/local.py
index a2abc8639c..882a2c4602 100644
--- a/bitbake/lib/bb/fetch/local.py
+++ b/bitbake/lib/bb/fetch/local.py
@@ -27,6 +27,7 @@ BitBake build tools.
27 27
28import os 28import os
29import bb 29import bb
30import bb.utils
30from bb import data 31from bb import data
31from bb.fetch import Fetch 32from bb.fetch import Fetch
32 33
@@ -47,7 +48,7 @@ class Local(Fetch):
47 if path[0] != "/": 48 if path[0] != "/":
48 filespath = data.getVar('FILESPATH', d, 1) 49 filespath = data.getVar('FILESPATH', d, 1)
49 if filespath: 50 if filespath:
50 newpath = bb.which(filespath, path) 51 newpath = bb.utils.which(filespath, path)
51 if not newpath: 52 if not newpath:
52 filesdir = data.getVar('FILESDIR', d, 1) 53 filesdir = data.getVar('FILESDIR', d, 1)
53 if filesdir: 54 if filesdir:
diff --git a/bitbake/lib/bb/fetch/wget.py b/bitbake/lib/bb/fetch/wget.py
index ae1c6ad136..8b687372a4 100644
--- a/bitbake/lib/bb/fetch/wget.py
+++ b/bitbake/lib/bb/fetch/wget.py
@@ -30,6 +30,7 @@ import bb
30from bb import data 30from bb import data
31from bb.fetch import Fetch 31from bb.fetch import Fetch
32from bb.fetch import FetchError 32from bb.fetch import FetchError
33from bb.fetch import encodeurl, decodeurl
33 34
34class Wget(Fetch): 35class Wget(Fetch):
35 """Class to fetch urls via 'wget'""" 36 """Class to fetch urls via 'wget'"""
@@ -41,7 +42,7 @@ class Wget(Fetch):
41 42
42 def localpath(self, url, ud, d): 43 def localpath(self, url, ud, d):
43 44
44 url = bb.encodeurl([ud.type, ud.host, ud.path, ud.user, ud.pswd, {}]) 45 url = encodeurl([ud.type, ud.host, ud.path, ud.user, ud.pswd, {}])
45 ud.basename = os.path.basename(ud.path) 46 ud.basename = os.path.basename(ud.path)
46 ud.localfile = data.expand(os.path.basename(url), d) 47 ud.localfile = data.expand(os.path.basename(url), d)
47 48
@@ -60,7 +61,7 @@ class Wget(Fetch):
60 fetchcmd = data.getVar("FETCHCOMMAND", d, 1) 61 fetchcmd = data.getVar("FETCHCOMMAND", d, 1)
61 62
62 uri = uri.split(";")[0] 63 uri = uri.split(";")[0]
63 uri_decoded = list(bb.decodeurl(uri)) 64 uri_decoded = list(decodeurl(uri))
64 uri_type = uri_decoded[0] 65 uri_type = uri_decoded[0]
65 uri_host = uri_decoded[1] 66 uri_host = uri_decoded[1]
66 67
diff --git a/bitbake/lib/bb/persist_data.py b/bitbake/lib/bb/persist_data.py
index e2bbbe54f7..a26244510a 100644
--- a/bitbake/lib/bb/persist_data.py
+++ b/bitbake/lib/bb/persist_data.py
@@ -16,6 +16,7 @@
16# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 16# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 17
18import bb, os 18import bb, os
19import bb.utils
19 20
20try: 21try:
21 import sqlite3 22 import sqlite3
@@ -49,7 +50,7 @@ class PersistData:
49 try: 50 try:
50 os.stat(self.cachedir) 51 os.stat(self.cachedir)
51 except OSError: 52 except OSError:
52 bb.mkdirhier(self.cachedir) 53 bb.utils.mkdirhier(self.cachedir)
53 54
54 self.cachefile = os.path.join(self.cachedir,"bb_persist_data.sqlite3") 55 self.cachefile = os.path.join(self.cachedir,"bb_persist_data.sqlite3")
55 bb.msg.debug(1, bb.msg.domain.PersistData, "Using '%s' as the persistent data cache" % self.cachefile) 56 bb.msg.debug(1, bb.msg.domain.PersistData, "Using '%s' as the persistent data cache" % self.cachefile)