diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2015-02-05 12:05:40 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-02-23 18:00:20 +0000 |
commit | 1bb00223844bfabe1f6d75c8179d4cbbd4fb5466 (patch) | |
tree | 9f0b455cb813a866a99538a31bcff0088b7a8584 /meta/classes | |
parent | a509e276b26cf0cfa495e835392ff3e709ed1317 (diff) | |
download | poky-1bb00223844bfabe1f6d75c8179d4cbbd4fb5466.tar.gz |
classes/sanity: avoid bblayers version issue when switching between poky and other DISTRO values
If you create a build directory with poky, or set DISTRO to "poky" and
run bitbake, you'll get a bblayers.conf file with LCONF_VERSION set to
6. If you then set DISTRO to any other value where the new distro config
doesn't pull in poky's config, e.g. "nodistro", you would then get a
bblayers.conf version error which didn't immediately make sense. (The
layer versions have been out-of-step ever since meta-yocto-bsp was
split out of meta-yocto several years ago).
This is just painful and we'd rather users didn't have to deal with
it. Obviously it isn't an OE-Core problem per se, but a simple way to
resolve it for everyone is to bump OE-Core's version to 6 with an
automatic no-op upgrade. Also ensure that multiple upgrade functions
(such as the poky one) have a chance to execute by not breaking out of
the loop as we were before.
Fixes [YOCTO #6139].
(From OE-Core rev: 2fdeee2fad69445b0d97148826c7b027820be63a)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/sanity.bbclass | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass index 2f75558104..31b99d4bc8 100644 --- a/meta/classes/sanity.bbclass +++ b/meta/classes/sanity.bbclass | |||
@@ -70,6 +70,12 @@ python oecore_update_bblayers() { | |||
70 | sanity_conf_update(bblayers_fn, lines, 'LCONF_VERSION', current_lconf) | 70 | sanity_conf_update(bblayers_fn, lines, 'LCONF_VERSION', current_lconf) |
71 | return | 71 | return |
72 | 72 | ||
73 | elif current_lconf == 5 and lconf_version > 5: | ||
74 | # Null update, to avoid issues with people switching between poky and other distros | ||
75 | current_lconf = 6 | ||
76 | sanity_conf_update(bblayers_fn, lines, 'LCONF_VERSION', current_lconf) | ||
77 | return | ||
78 | |||
73 | sys.exit() | 79 | sys.exit() |
74 | } | 80 | } |
75 | 81 | ||
@@ -470,7 +476,6 @@ def sanity_check_conffiles(status, d): | |||
470 | if success: | 476 | if success: |
471 | bb.note("Your conf/bblayers.conf has been automatically updated.") | 477 | bb.note("Your conf/bblayers.conf has been automatically updated.") |
472 | status.reparse = True | 478 | status.reparse = True |
473 | break | ||
474 | if not status.reparse: | 479 | if not status.reparse: |
475 | status.addresult("Your version of bblayers.conf has the wrong LCONF_VERSION (has %s, expecting %s).\nPlease compare the your file against bblayers.conf.sample and merge any changes before continuing.\n\"meld conf/bblayers.conf ${COREBASE}/meta*/conf/bblayers.conf.sample\" is a good way to visualise the changes.\n" % (current_lconf, lconf_version)) | 480 | status.addresult("Your version of bblayers.conf has the wrong LCONF_VERSION (has %s, expecting %s).\nPlease compare the your file against bblayers.conf.sample and merge any changes before continuing.\n\"meld conf/bblayers.conf ${COREBASE}/meta*/conf/bblayers.conf.sample\" is a good way to visualise the changes.\n" % (current_lconf, lconf_version)) |
476 | 481 | ||