diff options
-rwxr-xr-x | bitbake-dev/bin/bitbake | 4 | ||||
-rw-r--r-- | bitbake-dev/lib/bb/data_smart.py | 11 | ||||
-rw-r--r-- | bitbake-dev/lib/bb/parse/parse_py/BBHandler.py | 3 | ||||
-rw-r--r-- | bitbake-dev/lib/bb/providers.py | 14 | ||||
-rw-r--r-- | bitbake-dev/lib/bb/server/xmlrpc.py | 6 | ||||
-rw-r--r-- | bitbake-dev/lib/bb/taskdata.py | 2 | ||||
-rw-r--r-- | bitbake-dev/lib/bb/utils.py | 2 |
7 files changed, 31 insertions, 11 deletions
diff --git a/bitbake-dev/bin/bitbake b/bitbake-dev/bin/bitbake index 33ae1b96e..23c9d73ee 100755 --- a/bitbake-dev/bin/bitbake +++ b/bitbake-dev/bin/bitbake @@ -31,8 +31,8 @@ from bb import ui __version__ = "1.9.0" -if sys.hexversion < 0x020600F0: - print "Sorry, python 2.6 or later is required for this version of bitbake" +if sys.hexversion < 0x020500F0: + print "Sorry, python 2.5 or later is required for this version of bitbake" sys.exit(1) #============================================================================# diff --git a/bitbake-dev/lib/bb/data_smart.py b/bitbake-dev/lib/bb/data_smart.py index c93aea7fe..988d5c357 100644 --- a/bitbake-dev/lib/bb/data_smart.py +++ b/bitbake-dev/lib/bb/data_smart.py @@ -171,14 +171,15 @@ class DataSmart: Rename the variable key to newkey """ val = self.getVar(key, 0) - if val is None: - return - - self.setVar(newkey, val) + if val is not None: + self.setVar(newkey, val) for i in ('_append', '_prepend'): + src = self.getVarFlag(key, i) + if src is None: + continue + dest = self.getVarFlag(newkey, i) or [] - src = self.getVarFlag(key, i) or [] dest.extend(src) self.setVarFlag(newkey, i, dest) diff --git a/bitbake-dev/lib/bb/parse/parse_py/BBHandler.py b/bitbake-dev/lib/bb/parse/parse_py/BBHandler.py index f34599136..9b353634e 100644 --- a/bitbake-dev/lib/bb/parse/parse_py/BBHandler.py +++ b/bitbake-dev/lib/bb/parse/parse_py/BBHandler.py @@ -329,7 +329,8 @@ def feeder(lineno, s, fn, root, d): after = m.group("after") if func is None: return - var = "do_" + func + if func[:3] != "do_": + var = "do_" + func data.setVarFlag(var, "task", 1, d) diff --git a/bitbake-dev/lib/bb/providers.py b/bitbake-dev/lib/bb/providers.py index 6c1cf78eb..8617251ca 100644 --- a/bitbake-dev/lib/bb/providers.py +++ b/bitbake-dev/lib/bb/providers.py @@ -63,6 +63,18 @@ def sortPriorities(pn, dataCache, pkg_pn = None): return tmp_pn +def preferredVersionMatch(pe, pv, pr, preferred_e, preferred_v, preferred_r): + """ + Check if the version pe,pv,pr is the preferred one. + If there is preferred version defined and ends with '%', then pv has to start with that version after removing the '%' + """ + if (pr == preferred_r or preferred_r == None): + if (pe == preferred_e or preferred_e == None): + if preferred_v == pv: + return True + if preferred_v != None and preferred_v.endswith('%') and pv.startswith(preferred_v[:len(preferred_v)-1]): + return True + return False def findPreferredProvider(pn, cfgData, dataCache, pkg_pn = None, item = None): """ @@ -96,7 +108,7 @@ def findPreferredProvider(pn, cfgData, dataCache, pkg_pn = None, item = None): for file_set in pkg_pn: for f in file_set: pe,pv,pr = dataCache.pkg_pepvpr[f] - if preferred_v == pv and (preferred_r == pr or preferred_r == None) and (preferred_e == pe or preferred_e == None): + if preferredVersionMatch(pe, pv, pr, preferred_e, preferred_v, preferred_r): preferred_file = f preferred_ver = (pe, pv, pr) break diff --git a/bitbake-dev/lib/bb/server/xmlrpc.py b/bitbake-dev/lib/bb/server/xmlrpc.py index b4d69f7be..3364918c7 100644 --- a/bitbake-dev/lib/bb/server/xmlrpc.py +++ b/bitbake-dev/lib/bb/server/xmlrpc.py @@ -32,7 +32,7 @@ """ import bb -import xmlrpclib +import xmlrpclib, sys from bb import daemonize from bb.ui import uievent @@ -41,6 +41,10 @@ DEBUG = False from SimpleXMLRPCServer import SimpleXMLRPCServer, SimpleXMLRPCRequestHandler import inspect, select +if sys.hexversion < 0x020600F0: + print "Sorry, python 2.6 or later is required for bitbake's XMLRPC mode" + sys.exit(1) + class BitBakeServerCommands(): def __init__(self, server, cooker): self.cooker = cooker diff --git a/bitbake-dev/lib/bb/taskdata.py b/bitbake-dev/lib/bb/taskdata.py index e3a60b988..4a88e75f6 100644 --- a/bitbake-dev/lib/bb/taskdata.py +++ b/bitbake-dev/lib/bb/taskdata.py @@ -173,6 +173,8 @@ class TaskData: ids = [] for dep in task_deps['depends'][task].split(): if dep: + if ":" not in dep: + bb.msg.fatal(bb.msg.domain.TaskData, "Error, dependency %s does not contain ':' character\n. Task 'depends' should be specified in the form 'packagename:task'" % (depend, fn)) ids.append(((self.getbuild_id(dep.split(":")[0])), dep.split(":")[1])) self.tasks_idepends[taskid].extend(ids) diff --git a/bitbake-dev/lib/bb/utils.py b/bitbake-dev/lib/bb/utils.py index 5b0aaba4a..5fc1463e6 100644 --- a/bitbake-dev/lib/bb/utils.py +++ b/bitbake-dev/lib/bb/utils.py @@ -389,7 +389,7 @@ def clean_environment(): def empty_environment(): """ - Remove all variable from the environment. + Remove all variables from the environment. """ for s in os.environ.keys(): os.unsetenv(s) |