diff options
| -rwxr-xr-x | scripts/combo-layer | 7 | ||||
| -rw-r--r-- | scripts/combo-layer.conf.example | 10 |
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. | ||
| 7 | signoff = True | ||
| 8 | |||
| 3 | # component name | 9 | # component name |
| 4 | [bitbake] | 10 | [bitbake] |
| 11 | |||
| 12 | # Override signedoff default above (not very useful, but possible). | ||
| 13 | signoff = False | ||
| 14 | |||
| 5 | # mandatory options | 15 | # mandatory options |
| 6 | # git upstream uri | 16 | # git upstream uri |
| 7 | src_uri = git://git.openembedded.org/bitbake | 17 | src_uri = git://git.openembedded.org/bitbake |
