diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-08-31 17:07:24 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-08-31 17:35:09 +0100 |
commit | 638d366234fad78f283d3a13a12b07cb0ccbe914 (patch) | |
tree | d83546da91aa4e643dd6ad0f9cf388d1cf3b44fd /lib/bb/cooker.py | |
parent | 9dc7f384db0479569ff93a76a623d5395fecaf47 (diff) | |
download | bitbake-638d366234fad78f283d3a13a12b07cb0ccbe914.tar.gz |
cooker: Change to consistent prefile/postfile handling
Currently the original prefile and postfile passed when starting bitbake
server are 'sticky'. With the new memory resident model this doesn't make
sense as the server the system is started with isn't special.
This patch changes the code so the prefile/postfile are used if specified
on the commandline and not used otherwise. This makes the behaviour much
more predictable and expected and as an added bonus simplifies the code.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/cooker.py')
-rw-r--r-- | lib/bb/cooker.py | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py index ad08c473a..5ee1c0ac8 100644 --- a/lib/bb/cooker.py +++ b/lib/bb/cooker.py @@ -416,19 +416,16 @@ class BBCooker: clean = True for o in options: if o in ['prefile', 'postfile']: - server_val = getattr(self.configuration, "%s_server" % o, None) - if not options[o] and server_val: - # restore value provided on server start - logger.debug(1, "Restoring server value for option '%s'" % o) - setattr(self.configuration, o, server_val) - clean = False - continue - if getattr(self.configuration, o) == options[o]: - # Value is the same, no need to mark dirty - continue - else: - logger.debug(1, "Marking as dirty due to '%s' option change to '%s'" % (o, options[o])) - clean = False + # Only these options may require a reparse + try: + if getattr(self.configuration, o) == options[o]: + # Value is the same, no need to mark dirty + continue + except AttributeError: + pass + logger.debug(1, "Marking as dirty due to '%s' option change to '%s'" % (o, options[o])) + print("Marking as dirty due to '%s' option change to '%s'" % (o, options[o])) + clean = False setattr(self.configuration, o, options[o]) for k in bb.utils.approved_variables(): if k in environment and k not in self.configuration.env: |