summaryrefslogtreecommitdiff
path: root/bitbake-dev
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-01-19 15:33:31 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2010-01-19 15:34:01 +0000
commitb65e8ec5931afbfcb29482db5a3afb9a752166cf (patch)
tree4eecc2d466e0e7d68e2a73c348c9051a36df9fbd /bitbake-dev
parent43788606bda9bef3e0c796271af8a03e01d9853d (diff)
downloadopenembedded-core-b65e8ec5931afbfcb29482db5a3afb9a752166cf.tar.gz
openembedded-core-b65e8ec5931afbfcb29482db5a3afb9a752166cf.tar.bz2
openembedded-core-b65e8ec5931afbfcb29482db5a3afb9a752166cf.zip
bitbake-dev: Sync again with upstream after fixes from Poky bitbake 1.8 were merged
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake-dev')
-rwxr-xr-xbitbake-dev/bin/bitbake4
-rw-r--r--bitbake-dev/lib/bb/data_smart.py11
-rw-r--r--bitbake-dev/lib/bb/parse/parse_py/BBHandler.py3
-rw-r--r--bitbake-dev/lib/bb/providers.py14
-rw-r--r--bitbake-dev/lib/bb/server/xmlrpc.py6
-rw-r--r--bitbake-dev/lib/bb/taskdata.py2
-rw-r--r--bitbake-dev/lib/bb/utils.py2
7 files changed, 31 insertions, 11 deletions
diff --git a/bitbake-dev/bin/bitbake b/bitbake-dev/bin/bitbake
index 33ae1b96e9..23c9d73ee4 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 c93aea7fef..988d5c3578 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 f34599136c..9b353634ed 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 6c1cf78eb3..8617251ca3 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 b4d69f7be3..3364918c77 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 e3a60b9884..4a88e75f6d 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 5b0aaba4a7..5fc1463e67 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)