diff options
Diffstat (limited to 'meta/classes/sanity.bbclass')
-rw-r--r-- | meta/classes/sanity.bbclass | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass index e72a007078..029c6e4fbe 100644 --- a/meta/classes/sanity.bbclass +++ b/meta/classes/sanity.bbclass | |||
@@ -20,7 +20,7 @@ def sanity_conf_find_line(pattern, lines): | |||
20 | if re.search(pattern, line)), (None, None)) | 20 | if re.search(pattern, line)), (None, None)) |
21 | 21 | ||
22 | def sanity_conf_update(fn, lines, version_var_name, new_version): | 22 | def sanity_conf_update(fn, lines, version_var_name, new_version): |
23 | index, line = sanity_conf_find_line(version_var_name, lines) | 23 | index, line = sanity_conf_find_line(r"^%s" % version_var_name, lines) |
24 | lines[index] = '%s = "%d"\n' % (version_var_name, new_version) | 24 | lines[index] = '%s = "%d"\n' % (version_var_name, new_version) |
25 | with open(fn, "w") as f: | 25 | with open(fn, "w") as f: |
26 | f.write(''.join(lines)) | 26 | f.write(''.join(lines)) |
@@ -125,12 +125,14 @@ is a good way to visualise the changes.""" | |||
125 | 125 | ||
126 | current_lconf += 1 | 126 | current_lconf += 1 |
127 | sanity_conf_update(bblayers_fn, lines, 'LCONF_VERSION', current_lconf) | 127 | sanity_conf_update(bblayers_fn, lines, 'LCONF_VERSION', current_lconf) |
128 | bb.note("Your conf/bblayers.conf has been automatically updated.") | ||
128 | return | 129 | return |
129 | 130 | ||
130 | elif current_lconf == 5 and lconf_version > 5: | 131 | elif current_lconf == 5 and lconf_version > 5: |
131 | # Null update, to avoid issues with people switching between poky and other distros | 132 | # Null update, to avoid issues with people switching between poky and other distros |
132 | current_lconf = 6 | 133 | current_lconf = 6 |
133 | sanity_conf_update(bblayers_fn, lines, 'LCONF_VERSION', current_lconf) | 134 | sanity_conf_update(bblayers_fn, lines, 'LCONF_VERSION', current_lconf) |
135 | bb.note("Your conf/bblayers.conf has been automatically updated.") | ||
134 | return | 136 | return |
135 | 137 | ||
136 | if not status.reparse: | 138 | if not status.reparse: |
@@ -141,7 +143,7 @@ is a good way to visualise the changes.""" | |||
141 | # This marks the start of separate version numbers but code is needed in OE-Core | 143 | # This marks the start of separate version numbers but code is needed in OE-Core |
142 | # for the migration, one last time. | 144 | # for the migration, one last time. |
143 | layers = d.getVar('BBLAYERS', True).split() | 145 | layers = d.getVar('BBLAYERS', True).split() |
144 | layers = [ os.path.basename(path) for path in layers ] | 146 | layers = [ os.path.basename(path) for path in layers ] |
145 | if 'meta-yocto' in layers: | 147 | if 'meta-yocto' in layers: |
146 | found = False | 148 | found = False |
147 | while True: | 149 | while True: |
@@ -160,9 +162,11 @@ is a good way to visualise the changes.""" | |||
160 | raise NotImplementedError(failmsg) | 162 | raise NotImplementedError(failmsg) |
161 | with open(bblayers_fn, "w") as f: | 163 | with open(bblayers_fn, "w") as f: |
162 | f.write(''.join(lines)) | 164 | f.write(''.join(lines)) |
165 | bb.note("Your conf/bblayers.conf has been automatically updated.") | ||
163 | return | 166 | return |
164 | current_lconf += 1 | 167 | current_lconf += 1 |
165 | sanity_conf_update(bblayers_fn, lines, 'LCONF_VERSION', current_lconf) | 168 | sanity_conf_update(bblayers_fn, lines, 'LCONF_VERSION', current_lconf) |
169 | bb.note("Your conf/bblayers.conf has been automatically updated.") | ||
166 | return | 170 | return |
167 | 171 | ||
168 | raise NotImplementedError(failmsg) | 172 | raise NotImplementedError(failmsg) |
@@ -564,7 +568,6 @@ def sanity_check_conffiles(status, d): | |||
564 | success = False | 568 | success = False |
565 | status.addresult(e.msg) | 569 | status.addresult(e.msg) |
566 | if success: | 570 | if success: |
567 | bb.note("Your %s file has been automatically updated." % conffile) | ||
568 | status.reparse = True | 571 | status.reparse = True |
569 | 572 | ||
570 | def sanity_handle_abichanges(status, d): | 573 | def sanity_handle_abichanges(status, d): |