diff options
Diffstat (limited to 'scripts/devtool')
| -rwxr-xr-x | scripts/devtool | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/scripts/devtool b/scripts/devtool index e1198b1369..4780390654 100755 --- a/scripts/devtool +++ b/scripts/devtool | |||
| @@ -125,6 +125,25 @@ def read_workspace(): | |||
| 125 | 'recipefile': recipefile} | 125 | 'recipefile': recipefile} |
| 126 | logger.debug('Found recipe %s' % workspace[pn]) | 126 | logger.debug('Found recipe %s' % workspace[pn]) |
| 127 | 127 | ||
| 128 | def create_unlockedsigs(): | ||
| 129 | """ This function will make unlocked-sigs.inc match the recipes in the | ||
| 130 | workspace. This runs on every run of devtool, but it lets us ensure | ||
| 131 | the unlocked items are in sync with the workspace. """ | ||
| 132 | |||
| 133 | confdir = os.path.join(basepath, 'conf') | ||
| 134 | unlockedsigs = os.path.join(confdir, 'unlocked-sigs.inc') | ||
| 135 | bb.utils.mkdirhier(confdir) | ||
| 136 | with open(os.path.join(confdir, 'unlocked-sigs.inc'), 'w') as f: | ||
| 137 | f.write("# DO NOT MODIFY! YOUR CHANGES WILL BE LOST.\n" + | ||
| 138 | "# This layer was created by the OpenEmbedded devtool" + | ||
| 139 | " utility in order to\n" + | ||
| 140 | "# contain recipes that are unlocked.\n") | ||
| 141 | |||
| 142 | f.write('SIGGEN_UNLOCKED_RECIPES += "\\\n') | ||
| 143 | for pn in workspace: | ||
| 144 | f.write(' ' + pn) | ||
| 145 | f.write('"') | ||
| 146 | |||
| 128 | def create_workspace(args, config, basepath, workspace): | 147 | def create_workspace(args, config, basepath, workspace): |
| 129 | if args.layerpath: | 148 | if args.layerpath: |
| 130 | workspacedir = os.path.abspath(args.layerpath) | 149 | workspacedir = os.path.abspath(args.layerpath) |
| @@ -299,6 +318,7 @@ def main(): | |||
| 299 | 318 | ||
| 300 | if not getattr(args, 'no_workspace', False): | 319 | if not getattr(args, 'no_workspace', False): |
| 301 | read_workspace() | 320 | read_workspace() |
| 321 | create_unlockedsigs() | ||
| 302 | 322 | ||
| 303 | try: | 323 | try: |
| 304 | ret = args.func(args, config, basepath, workspace) | 324 | ret = args.func(args, config, basepath, workspace) |
