X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?p=src%2Fxds%2Fxds-server.git;a=blobdiff_plain;f=scripts%2Fsdks%2Fagl%2Fdb-dump;h=ec2b1d8ac7adb1672e50e888426de28c29e78a5f;hp=027fdcfc0ef2c30ca9c8c0732f802e619f282f28;hb=a93832c2e3058c55e183c487dde595bd42238bb0;hpb=7f3c55f02aa6b35b3530883a6c1f71ddd1f92eb4 diff --git a/scripts/sdks/agl/db-dump b/scripts/sdks/agl/db-dump index 027fdcf..ec2b1d8 100755 --- a/scripts/sdks/agl/db-dump +++ b/scripts/sdks/agl/db-dump @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -#/************************************************************************** +# /************************************************************************** # * Copyright 2017-2018 IoT.bzh # * # * author: Romain Forlot @@ -46,7 +46,7 @@ SCRIPT_PATH = os.path.dirname(os.path.abspath( ENV = subprocess.check_output( [os.path.join(SCRIPT_PATH, './_env-init.sh'), '-print']).splitlines() -SDK_ROOT_DIR=None +SDK_ROOT_DIR = None for elt in ENV: k, v = elt.decode().split('=', 1) if k == 'SDK_ROOT_DIR': @@ -71,6 +71,7 @@ SDK_DB_JSON = json.load(open(SDK_DB_FILEPATH, 'r')) for one_sdk in SDK_DB_JSON: one_sdk['status'] = 'Not Installed' + one_sdk['uuid'] = '' INSTALLED_SDK = [] for root, dirs, files in os.walk(SDK_ROOT_DIR): @@ -106,6 +107,8 @@ for one_sdk in INSTALLED_SDK: logging.debug('Path not compliant, skipping') continue + UUID = os.path.basename(os.path.normpath(DIR)) + SDK_DATE = '' for line in open(one_sdk['VERSION_FILE']).readlines(): if line.startswith('Timestamp'): @@ -126,6 +129,7 @@ for one_sdk in INSTALLED_SDK: sdk['date'] = SDK_DATE sdk['setupFile'] = one_sdk['ENV_FILE'] sdk['path'] = DIR + sdk['uuid'] = UUID break if not found: @@ -133,6 +137,7 @@ for one_sdk in INSTALLED_SDK: PROFILE + '-' + ARCH + '-' + VERSION) NEW_SDK = { 'name': PROFILE + '-' + ARCH + '-' + VERSION, + 'uuid': UUID, 'description': 'AGL SDK ' + ARCH + ' (version ' + VERSION + ')', 'profile': PROFILE, 'version': VERSION,