diff options
| -rw-r--r-- | meta/classes/populate_sdk_ext.bbclass | 5 | ||||
| -rwxr-xr-x | scripts/devtool | 20 |
2 files changed, 25 insertions, 0 deletions
diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass index d1977a760a..87518d1767 100644 --- a/meta/classes/populate_sdk_ext.bbclass +++ b/meta/classes/populate_sdk_ext.bbclass | |||
| @@ -140,6 +140,10 @@ python copy_buildsystem () { | |||
| 140 | with open(os.path.join(baseoutpath, 'conf', 'devtool.conf'), 'w') as f: | 140 | with open(os.path.join(baseoutpath, 'conf', 'devtool.conf'), 'w') as f: |
| 141 | config.write(f) | 141 | config.write(f) |
| 142 | 142 | ||
| 143 | unlockedsigs = os.path.join(baseoutpath, 'conf', 'unlocked-sigs.inc') | ||
| 144 | with open(unlockedsigs, 'w') as f: | ||
| 145 | pass | ||
| 146 | |||
| 143 | # Create a layer for new recipes / appends | 147 | # Create a layer for new recipes / appends |
| 144 | bbpath = d.getVar('BBPATH', True) | 148 | bbpath = d.getVar('BBPATH', True) |
| 145 | bb.process.run(['devtool', '--bbpath', bbpath, '--basepath', baseoutpath, 'create-workspace', '--create-only', os.path.join(baseoutpath, 'workspace')]) | 149 | bb.process.run(['devtool', '--bbpath', bbpath, '--basepath', baseoutpath, 'create-workspace', '--create-only', os.path.join(baseoutpath, 'workspace')]) |
| @@ -238,6 +242,7 @@ python copy_buildsystem () { | |||
| 238 | f.write(line.strip() + '\n') | 242 | f.write(line.strip() + '\n') |
| 239 | 243 | ||
| 240 | f.write('require conf/locked-sigs.inc\n') | 244 | f.write('require conf/locked-sigs.inc\n') |
| 245 | f.write('require conf/unlocked-sigs.inc\n') | ||
| 241 | 246 | ||
| 242 | if os.path.exists(builddir + '/conf/auto.conf'): | 247 | if os.path.exists(builddir + '/conf/auto.conf'): |
| 243 | if derivative: | 248 | if derivative: |
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) |
