From f688f6b566f455eb55d6e5491c80b88c493e158b Mon Sep 17 00:00:00 2001 From: Alexandru DAMIAN Date: Tue, 1 Apr 2014 12:24:49 +0100 Subject: bitbake: bitbake: cooker: mark setFeatures command as read-only This patch makes sure that the setFeatures command is marked as read-only and that it can only run if the cooker is in the initial state. Additionally, remove logging from the XMLRPC module in favor of sending the exception to the client for easy processing. [YOCTO #6089] (Bitbake rev: f0a1a3e24757f7658d272035620465f92a3e4c3c) Signed-off-by: Alexandru DAMIAN Signed-off-by: Richard Purdie --- bitbake/lib/bb/command.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'bitbake/lib/bb/command.py') diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py index 3788207122..84fcdf9433 100644 --- a/bitbake/lib/bb/command.py +++ b/bitbake/lib/bb/command.py @@ -264,6 +264,10 @@ class CommandsSync: features = params[0] command.cooker.setFeatures(features) + # although we change the internal state of the cooker, this is transparent since + # we always take and leave the cooker in state.initial + setFeatures.readonly = True + class CommandsAsync: """ A class of asynchronous commands -- cgit 1.2.3-korg