combo-layer: let user choose where properties get updated

When updating a property (at the moment, only 'last_revision'),
first check whether the user already added it to the main config.
If so, update there even if there is a local config.

This way, 'last_revision' can be shared between developers
as part of the repository while still configuring per-developer
repo paths outside of the git repository in a local config.

An example of a repository which is set up like that is tizen-distro,
with instructions for such a collaborative maintenance found here:
https://review.tizen.org/git/?p=scm/bb/tizen-distro.git;a=blob;f=README;hb=refs/heads/tizen-ivi

(From OE-Core rev: a3b246ee928d2ec59c8b6a775d9309f5be33ecc7)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Patrick Ohly 2015-01-08 07:23:52 -08:00 committed by Richard Purdie
parent fd2823d13b
commit b1408ba706
1 changed files with 3 additions and 1 deletions

View File

@ -109,7 +109,9 @@ class Configuration(object):
readsection(self.localparser, section, repo)
def update(self, repo, option, value, initmode=False):
if self.localparser:
# If the main config has the option already, that is what we
# are expected to modify.
if self.localparser and not self.parser.has_option(repo, option):
parser = self.localparser
section = "%s|%s" % (repo, self.combobranch)
conffile = self.localconffile