[elbe-devel] [PATCH] dump: Change log level for archive validation
Olivier Dion
dion at linutronix.de
Tue Mar 24 19:49:53 CET 2020
Elbe will detect when a file, coming from an archive, is truncated.
However, this leads to false positive errors when the user is
expecting to have this file truncated. For example, the user could
run a script, part of the archive, and then delete it in the
finetuning section.
Since the validation file is quite small, it's easy to the eyes to see
if there was an error. Hence, instead of generating errors and thus
failing the build, Elbe will emit warnings. Consequently, it's the
user responsibility to ensure that the warnings in the validation file
are in accordance with their usage of the finetuning section.
In the future, sub-tags could be added to the 'archive' tag in order
to keep the build fail on error. Those sub-tags would give a way for
the user to cherry-pick which files to expect to have been truncated.
Signed-off-by: Olivier Dion <dion at linutronix.de>
---
elbepack/dump.py | 19 ++++++-------------
1 file changed, 6 insertions(+), 13 deletions(-)
diff --git a/elbepack/dump.py b/elbepack/dump.py
index cb59d747..cde805a7 100644
--- a/elbepack/dump.py
+++ b/elbepack/dump.py
@@ -307,19 +307,12 @@ def elbe_report(xml, buildenv, cache, targetfs):
validation.info("------------------")
validation.info("")
- errors = 0
-
for fpath in list(mt_index_postarch.keys()):
- if fpath not in mt_index or \
- mt_index_postarch[fpath] != mt_index[fpath]:
+ if (fpath not in mt_index or
+ mt_index_postarch[fpath] != mt_index[fpath]):
if fpath not in mt_index_post_fine:
- validation.error("Archive file %s deleted in finetuning",
- fpath)
- errors += 1
+ validation.warning("Archive file %s deleted in finetuning",
+ fpath)
elif mt_index_post_fine[fpath] != mt_index_postarch[fpath]:
- validation.error("Archive file %s modified in finetuning",
- fpath)
- errors += 1
-
- if errors == 0:
- validation.info("No Errors found")
+ validation.warning("Archive file %s modified in finetuning",
+ fpath)
--
2.25.1
More information about the elbe-devel
mailing list