]> code.ossystems Code Review - openembedded-core.git/commitdiff
combo-layer: introduce ability to exclude component from mass update
authorAlexander D. Kanevskiy <kad@kad.name>
Fri, 16 Oct 2015 15:49:21 +0000 (18:49 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 16 Nov 2015 11:28:38 +0000 (11:28 +0000)
There is no ability at the moment for situations where users would like
to keep section in combo-layer.conf but don't update it, unless explicitly
specified.

Now, by adding "update = no" to desired section would exclude
that repository from "combo-layer update" command.

It is still possible to explicitly update it by "combo-layer update $section".

By default, all repositories are assumed as "update = yes"

Signed-off-by: Alexander D. Kanevskiy <kad@kad.name>
Signed-off-by: Ross Burton <ross.burton@intel.com>
scripts/combo-layer

index 7435a176bebb8abd1abdb61a7dcc898d6a29564a..92c5cbb813c2e1a760d6694ef5b38b77d3a6dd2c 100755 (executable)
@@ -73,7 +73,7 @@ class Configuration(object):
                 else:
                     # Apply special type transformations for some properties.
                     # Type matches the RawConfigParser.get*() methods.
-                    types = {'signoff': 'boolean'}
+                    types = {'signoff': 'boolean', 'update': 'boolean'}
                     if name in types:
                         value = getattr(parser, 'get' + types[name])(section, name)
                     self.repos[repo][name] = value
@@ -567,7 +567,7 @@ def get_repos(conf, repo_names):
             sys.exit(1)
 
     if not repos:
-        repos = conf.repos
+        repos = [ repo for repo in conf.repos if conf.repos[repo].get("update", True) ]
 
     return repos