public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH 1/2] isar-sstate lint: strip variable value
@ 2022-08-09 14:07 Felix Moessbauer
  2022-08-09 14:07 ` [PATCH 2/2] improve cachability of isar-bootstrap Felix Moessbauer
  0 siblings, 1 reply; 4+ messages in thread
From: Felix Moessbauer @ 2022-08-09 14:07 UTC (permalink / raw)
  To: isar-users; +Cc: adriaan.schmidt, Felix Moessbauer

By stripping any leading whitespaces, the script now also detects
cachability problems in variables that are just appended to.

Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
 scripts/isar-sstate | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/scripts/isar-sstate b/scripts/isar-sstate
index 3a1945e7..5972144d 100755
--- a/scripts/isar-sstate
+++ b/scripts/isar-sstate
@@ -824,9 +824,12 @@ def sstate_lint(target, verbose, sources_dir, build_dir, exit_code, **kwargs):
                    sigdata['taskwhitelist'] and name in sigdata['taskwhitelist'] or \
                    name in ADDITIONAL_IGNORED_VARNAMES:
                     continue
-                if not val or not val[0] == '/':
+                if not val:
+                    continue
+                # remove leading whitespaces possibly added by appending
+                val = val.lstrip()
+                if not val[0] == '/':
                     continue
-                task = sigdata['task']
                 if val.startswith(build_dir):
                     pn_issues.append(f'\033[0;31m-> path in build-dir:   {name} = "{val}"\033[0m')
                     hits_builddir += 1
-- 
2.30.2


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-08-12  8:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-09 14:07 [PATCH 1/2] isar-sstate lint: strip variable value Felix Moessbauer
2022-08-09 14:07 ` [PATCH 2/2] improve cachability of isar-bootstrap Felix Moessbauer
2022-08-12  7:30   ` Anton Mikanovich
2022-08-12  8:03     ` Moessbauer, Felix

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox