summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2015-03-09 13:50:11 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-03-20 11:21:22 +0000
commit58c5bb28b525afb1ed1959305adee65ae7f5dba0 (patch)
tree90a087fa4153679d7c85a64f964fc32f1e6059b1 /scripts
parentb1408ba706a9b3f597381078aa4d88d879635362 (diff)
downloadpoky-58c5bb28b525afb1ed1959305adee65ae7f5dba0.tar.gz
combo-layer: make Signed-off-by optional
It depends on the diligence of the person running the combo-layer tool whether the Signed-off-by line added to each commit actually indicates that the person was involved in validating the change. When the import is purely automatic, it is better to not add the line, because the history is more useful without it (searching for the person really only lists changes he or she was involved with) and it would be a false statement. The 'signoff' property can be set per repository, like every other property. But setting it in the special [DEFAULT] section is more useful, so that is what the example shows. (From OE-Core rev: dba34e5a6f0a4c726266654dc5f26e0f7f13db0f) 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>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/combo-layer7
-rw-r--r--scripts/combo-layer.conf.example10
2 files changed, 16 insertions, 1 deletions
diff --git a/scripts/combo-layer b/scripts/combo-layer
index 71fa7b127c..62f2cf8fa3 100755
--- a/scripts/combo-layer
+++ b/scripts/combo-layer
@@ -68,6 +68,11 @@ class Configuration(object):
68 if value.startswith("@"): 68 if value.startswith("@"):
69 self.repos[repo][name] = eval(value.strip("@")) 69 self.repos[repo][name] = eval(value.strip("@"))
70 else: 70 else:
71 # Apply special type transformations for some properties.
72 # Type matches the RawConfigParser.get*() methods.
73 types = {'signoff': 'boolean'}
74 if name in types:
75 value = getattr(parser, 'get' + types[name])(section, name)
71 self.repos[repo][name] = value 76 self.repos[repo][name] = value
72 77
73 logger.debug("Loading config file %s" % self.conffile) 78 logger.debug("Loading config file %s" % self.conffile)
@@ -482,7 +487,7 @@ def apply_patchlist(conf, repos):
482 if os.path.getsize(patchfile) == 0: 487 if os.path.getsize(patchfile) == 0:
483 logger.info("(skipping %d/%d %s - no changes)" % (i, linecount, patchdisp)) 488 logger.info("(skipping %d/%d %s - no changes)" % (i, linecount, patchdisp))
484 else: 489 else:
485 cmd = "git am --keep-cr -s -p1 %s" % patchfile 490 cmd = "git am --keep-cr %s-p1 %s" % ('-s ' if repo.get('signoff', True) else '', patchfile)
486 logger.info("Applying %d/%d: %s" % (i, linecount, patchdisp)) 491 logger.info("Applying %d/%d: %s" % (i, linecount, patchdisp))
487 try: 492 try:
488 runcmd(cmd) 493 runcmd(cmd)
diff --git a/scripts/combo-layer.conf.example b/scripts/combo-layer.conf.example
index 010a692350..427c1b399f 100644
--- a/scripts/combo-layer.conf.example
+++ b/scripts/combo-layer.conf.example
@@ -1,7 +1,17 @@
1# combo-layer example configuration file 1# combo-layer example configuration file
2 2
3# Default values for all sections.
4[DEFAULT]
5
6# Add 'Signed-off-by' to all commits that get imported automatically.
7signoff = True
8
3# component name 9# component name
4[bitbake] 10[bitbake]
11
12# Override signedoff default above (not very useful, but possible).
13signoff = False
14
5# mandatory options 15# mandatory options
6# git upstream uri 16# git upstream uri
7src_uri = git://git.openembedded.org/bitbake 17src_uri = git://git.openembedded.org/bitbake