diff options
| -rw-r--r-- | meta/classes/populate_sdk_ext.bbclass | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass index fb38ebc1f1..3bccb142e6 100644 --- a/meta/classes/populate_sdk_ext.bbclass +++ b/meta/classes/populate_sdk_ext.bbclass | |||
| @@ -253,6 +253,8 @@ python copy_buildsystem () { | |||
| 253 | 253 | ||
| 254 | # Create local.conf | 254 | # Create local.conf |
| 255 | builddir = d.getVar('TOPDIR') | 255 | builddir = d.getVar('TOPDIR') |
| 256 | if derivative and os.path.exists(builddir + '/conf/auto.conf'): | ||
| 257 | shutil.copyfile(builddir + '/conf/auto.conf', baseoutpath + '/conf/auto.conf') | ||
| 256 | if derivative: | 258 | if derivative: |
| 257 | shutil.copyfile(builddir + '/conf/local.conf', baseoutpath + '/conf/local.conf') | 259 | shutil.copyfile(builddir + '/conf/local.conf', baseoutpath + '/conf/local.conf') |
| 258 | else: | 260 | else: |
| @@ -267,8 +269,12 @@ python copy_buildsystem () { | |||
| 267 | env_whitelist_values[varname] = origvalue | 269 | env_whitelist_values[varname] = origvalue |
| 268 | return origvalue, op, 0, True | 270 | return origvalue, op, 0, True |
| 269 | varlist = ['[^#=+ ]*'] | 271 | varlist = ['[^#=+ ]*'] |
| 272 | oldlines = [] | ||
| 273 | if os.path.exists(builddir + '/conf/auto.conf'): | ||
| 274 | with open(builddir + '/conf/auto.conf', 'r') as f: | ||
| 275 | oldlines += f.readlines() | ||
| 270 | with open(builddir + '/conf/local.conf', 'r') as f: | 276 | with open(builddir + '/conf/local.conf', 'r') as f: |
| 271 | oldlines = f.readlines() | 277 | oldlines += f.readlines() |
| 272 | (updated, newlines) = bb.utils.edit_metadata(oldlines, varlist, handle_var) | 278 | (updated, newlines) = bb.utils.edit_metadata(oldlines, varlist, handle_var) |
| 273 | 279 | ||
| 274 | with open(baseoutpath + '/conf/local.conf', 'w') as f: | 280 | with open(baseoutpath + '/conf/local.conf', 'w') as f: |
| @@ -332,22 +338,6 @@ python copy_buildsystem () { | |||
| 332 | f.write('require conf/locked-sigs.inc\n') | 338 | f.write('require conf/locked-sigs.inc\n') |
| 333 | f.write('require conf/unlocked-sigs.inc\n') | 339 | f.write('require conf/unlocked-sigs.inc\n') |
| 334 | 340 | ||
| 335 | if os.path.exists(builddir + '/conf/auto.conf'): | ||
| 336 | if derivative: | ||
| 337 | shutil.copyfile(builddir + '/conf/auto.conf', baseoutpath + '/conf/auto.conf') | ||
| 338 | else: | ||
| 339 | with open(builddir + '/conf/auto.conf', 'r') as f: | ||
| 340 | oldlines = f.readlines() | ||
| 341 | (updated, newlines) = bb.utils.edit_metadata(oldlines, varlist, handle_var) | ||
| 342 | with open(baseoutpath + '/conf/auto.conf', 'w') as f: | ||
| 343 | f.write('# WARNING: this configuration has been automatically generated and in\n') | ||
| 344 | f.write('# most cases should not be edited. If you need more flexibility than\n') | ||
| 345 | f.write('# this configuration provides, it is strongly suggested that you set\n') | ||
| 346 | f.write('# up a proper instance of the full build system and use that instead.\n\n') | ||
| 347 | for line in newlines: | ||
| 348 | if line.strip() and not line.startswith('#'): | ||
| 349 | f.write(line) | ||
| 350 | |||
| 351 | # Write a templateconf.cfg | 341 | # Write a templateconf.cfg |
| 352 | with open(baseoutpath + '/conf/templateconf.cfg', 'w') as f: | 342 | with open(baseoutpath + '/conf/templateconf.cfg', 'w') as f: |
| 353 | f.write('meta/conf\n') | 343 | f.write('meta/conf\n') |
