* [1.18][PATCH 0/3] Stable branch cherry-picks
@ 2013-05-20 15:20 Paul Eggleton
2013-05-20 15:20 ` [1.18][PATCH 1/3] goggle: fix invalid error check Paul Eggleton
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Paul Eggleton @ 2013-05-20 15:20 UTC (permalink / raw)
To: bitbake-devel
The following changes (against poky, but apply cleanly with -p2 against
the 1.18 branch of bitbake) are available in the git repository at:
git://git.yoctoproject.org/poky-contrib paule/dylan-next-bb
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=paule/dylan-next-bb
Laurentiu Palcu (1):
data_smart.py: add some internal bitbake variables to configuration
hash
Martin Donnelly (1):
goggle: fix invalid error check
Richard Purdie (1):
prserv/cooker: Handle PRService errors cleanly
bitbake/lib/bb/cooker.py | 5 ++++-
bitbake/lib/bb/data_smart.py | 10 ++++++++++
bitbake/lib/bb/ui/goggle.py | 2 +-
bitbake/lib/prserv/serv.py | 9 ++++++---
4 files changed, 21 insertions(+), 5 deletions(-)
--
1.8.1.2
^ permalink raw reply [flat|nested] 4+ messages in thread
* [1.18][PATCH 1/3] goggle: fix invalid error check
2013-05-20 15:20 [1.18][PATCH 0/3] Stable branch cherry-picks Paul Eggleton
@ 2013-05-20 15:20 ` Paul Eggleton
2013-05-20 15:20 ` [1.18][PATCH 2/3] prserv/cooker: Handle PRService errors cleanly Paul Eggleton
2013-05-20 15:20 ` [1.18][PATCH 3/3] data_smart.py: add some internal bitbake variables to configuration hash Paul Eggleton
2 siblings, 0 replies; 4+ messages in thread
From: Paul Eggleton @ 2013-05-20 15:20 UTC (permalink / raw)
To: bitbake-devel
From: Martin Donnelly <martin.donnelly@ge.com>
runCommand was returning 'error' but checking for 'err'
resulting in an exception.
(Bitbake master rev: 263aa44ed47e0cb03e1a97e7ed4a50bd9f828c78)
Signed-off-by: Martin Donnelly <martin.donnelly@ge.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
bitbake/lib/bb/ui/goggle.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bitbake/lib/bb/ui/goggle.py b/bitbake/lib/bb/ui/goggle.py
index c0785b7..e8a54ab 100644
--- a/bitbake/lib/bb/ui/goggle.py
+++ b/bitbake/lib/bb/ui/goggle.py
@@ -81,7 +81,7 @@ def main (server, eventHandler):
try:
cmdline, error = server.runCommand(["getCmdLineAction"])
- if err:
+ if error:
print("Error getting bitbake commandline: %s" % error)
return 1
elif not cmdline:
--
1.8.1.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [1.18][PATCH 2/3] prserv/cooker: Handle PRService errors cleanly
2013-05-20 15:20 [1.18][PATCH 0/3] Stable branch cherry-picks Paul Eggleton
2013-05-20 15:20 ` [1.18][PATCH 1/3] goggle: fix invalid error check Paul Eggleton
@ 2013-05-20 15:20 ` Paul Eggleton
2013-05-20 15:20 ` [1.18][PATCH 3/3] data_smart.py: add some internal bitbake variables to configuration hash Paul Eggleton
2 siblings, 0 replies; 4+ messages in thread
From: Paul Eggleton @ 2013-05-20 15:20 UTC (permalink / raw)
To: bitbake-devel
From: Richard Purdie <richard.purdie@linuxfoundation.org>
Current if the PR Service fails to start, bitbake carries on regardless or
hangs with no error message. This adds an exception and then handles it correctly
so the UIs correctly handle the error and exit cleanly.
[YOCTO #4010]
(Bitbake master rev: 949c01228a977c3b92bfc0802f6c71b40d8e05b3)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
bitbake/lib/bb/cooker.py | 5 ++++-
bitbake/lib/prserv/serv.py | 9 ++++++---
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index c7c2ca6..2c54209 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -1486,7 +1486,10 @@ class BBCooker:
# Empty the environment. The environment will be populated as
# necessary from the data store.
#bb.utils.empty_environment()
- prserv.serv.auto_start(self.configuration.data)
+ try:
+ prserv.serv.auto_start(self.configuration.data)
+ except prserv.serv.PRServiceConfigError:
+ bb.event.fire(CookerExit(), self.configuration.event_data)
return
def post_serve(self):
diff --git a/bitbake/lib/prserv/serv.py b/bitbake/lib/prserv/serv.py
index 3489200..6132100 100644
--- a/bitbake/lib/prserv/serv.py
+++ b/bitbake/lib/prserv/serv.py
@@ -263,6 +263,9 @@ def is_local_special(host, port):
else:
return False
+class PRServiceConfigError(Exception):
+ pass
+
def auto_start(d):
global singleton
@@ -273,14 +276,14 @@ def auto_start(d):
if len(host_params) != 2:
logger.critical('\n'.join(['PRSERV_HOST: incorrect format',
'Usage: PRSERV_HOST = "<hostname>:<port>"']))
- return True
+ raise PRServiceConfigError
if is_local_special(host_params[0], int(host_params[1])) and not singleton:
import bb.utils
cachedir = (d.getVar("PERSISTENT_DIR", True) or d.getVar("CACHE", True))
if not cachedir:
logger.critical("Please set the 'PERSISTENT_DIR' or 'CACHE' variable")
- sys.exit(1)
+ raise PRServiceConfigError
bb.utils.mkdirhier(cachedir)
dbfile = os.path.join(cachedir, "prserv.sqlite3")
logfile = os.path.join(cachedir, "prserv.log")
@@ -296,7 +299,7 @@ def auto_start(d):
return PRServerConnection(host,port).ping()
except Exception:
logger.critical("PRservice %s:%d not available" % (host, port))
- return False
+ raise PRServiceConfigError
def auto_shutdown(d=None):
global singleton
--
1.8.1.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [1.18][PATCH 3/3] data_smart.py: add some internal bitbake variables to configuration hash
2013-05-20 15:20 [1.18][PATCH 0/3] Stable branch cherry-picks Paul Eggleton
2013-05-20 15:20 ` [1.18][PATCH 1/3] goggle: fix invalid error check Paul Eggleton
2013-05-20 15:20 ` [1.18][PATCH 2/3] prserv/cooker: Handle PRService errors cleanly Paul Eggleton
@ 2013-05-20 15:20 ` Paul Eggleton
2 siblings, 0 replies; 4+ messages in thread
From: Paul Eggleton @ 2013-05-20 15:20 UTC (permalink / raw)
To: bitbake-devel
From: Laurentiu Palcu <laurentiu.palcu@intel.com>
Take __BBTASKS, __BBHANDLERS and __BBANONFUNCS into account when
computing the configuration hash.
[YOCTO #4447]
(Bitbake master rev: 260ced7452405fc43ce3d9dd6798236aa07cc716)
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
bitbake/lib/bb/data_smart.py | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py
index 5bf11e5..2fd8ccd 100644
--- a/bitbake/lib/bb/data_smart.py
+++ b/bitbake/lib/bb/data_smart.py
@@ -738,5 +738,15 @@ class DataSmart(MutableMapping):
value = d.getVar(key, False) or ""
data.update({key:value})
+ for key in ["__BBTASKS", "__BBANONFUNCS", "__BBHANDLERS"]:
+ bb_list = d.getVar(key, False) or []
+ bb_list.sort()
+ data.update({key:str(bb_list)})
+
+ if key == "__BBANONFUNCS":
+ for i in bb_list:
+ value = d.getVar(i, True) or ""
+ data.update({i:value})
+
data_str = str([(k, data[k]) for k in sorted(data.keys())])
return hashlib.md5(data_str).hexdigest()
--
1.8.1.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-05-20 15:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-20 15:20 [1.18][PATCH 0/3] Stable branch cherry-picks Paul Eggleton
2013-05-20 15:20 ` [1.18][PATCH 1/3] goggle: fix invalid error check Paul Eggleton
2013-05-20 15:20 ` [1.18][PATCH 2/3] prserv/cooker: Handle PRService errors cleanly Paul Eggleton
2013-05-20 15:20 ` [1.18][PATCH 3/3] data_smart.py: add some internal bitbake variables to configuration hash Paul Eggleton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.