]> code.ossystems Code Review - openembedded-core.git/commitdiff
combo-layer: let user choose where properties get updated
authorPatrick Ohly <patrick.ohly@intel.com>
Thu, 8 Jan 2015 15:23:52 +0000 (07:23 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 20 Mar 2015 11:03:08 +0000 (11:03 +0000)
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

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
scripts/combo-layer

index 851003d855a9e4d58c1c859218d6361b83fd5e64..71fa7b127c0ab7386fdafe2b94aaff925ad2b43b 100755 (executable)
@@ -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