Commit ae9326c9 authored by Christophe Dufaza's avatar Christophe Dufaza Committed by Fabio Baltieri
Browse files

west: blobs: prefer constants to literals for blob status



Replace blob status literals with the corresponding
constants defined in zephyr_module.

Signed-off-by: default avatarChristophe Dufaza <chris@openmarl.org>
parent 043aa837
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -122,7 +122,7 @@ class Blobs(WestCommand):
    def fetch(self, args):
        blobs = self.get_blobs(args)
        for blob in blobs:
            if blob['status'] == 'A':
            if blob['status'] == zephyr_module.BLOB_PRESENT:
                log.dbg('Blob {module}: {abspath} is up to date'.format(**blob))
                continue
            log.inf('Fetching blob {module}: {abspath}'.format(**blob))
@@ -131,7 +131,7 @@ class Blobs(WestCommand):
    def clean(self, args):
        blobs = self.get_blobs(args)
        for blob in blobs:
            if blob['status'] == 'D':
            if blob['status'] == zephyr_module.BLOB_NOT_PRESENT:
                log.dbg('Blob {module}: {abspath} not in filesystem'.format(**blob))
                continue
            log.inf('Deleting blob {module}: {status} {abspath}'.format(**blob))
+1 −1
Original line number Diff line number Diff line
@@ -345,7 +345,7 @@ def kconfig_snippet(meta, path, kconfig_file=None, blobs=False, sysbuild=False):

def process_kconfig(module, meta):
    blobs = process_blobs(module, meta)
    taint_blobs = len(tuple(filter(lambda b: b['status'] != 'D', blobs))) != 0
    taint_blobs = any(b['status'] != BLOB_NOT_PRESENT for b in blobs)
    section = meta.get('build', dict())
    module_path = PurePath(module)
    module_yml = module_path.joinpath('zephyr/module.yml')