summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/devtool/sdk.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/scripts/lib/devtool/sdk.py b/scripts/lib/devtool/sdk.py
index 331c236bd1..f15a6a9ed7 100644
--- a/scripts/lib/devtool/sdk.py
+++ b/scripts/lib/devtool/sdk.py
@@ -40,14 +40,9 @@ def generate_update_dict(sigfile_new, sigfile_old):
40 continue 40 continue
41 return update_dict 41 return update_dict
42 42
43def get_sstate_objects(update_dict, newsdk_path): 43def get_sstate_objects(update_dict, sstate_dir):
44 """Return a list containing sstate objects which are to be installed""" 44 """Return a list containing sstate objects which are to be installed"""
45 sstate_objects = [] 45 sstate_objects = []
46 # Ensure newsdk_path points to an extensible SDK
47 sstate_dir = os.path.join(newsdk_path, 'sstate-cache')
48 if not os.path.exists(sstate_dir):
49 logger.error("sstate-cache directory not found under %s" % newsdk_path)
50 raise
51 for k in update_dict: 46 for k in update_dict:
52 files = set() 47 files = set()
53 hashval = update_dict[k] 48 hashval = update_dict[k]
@@ -116,7 +111,11 @@ def sdk_update(args, config, basepath, workspace):
116 logger.debug("Found conf/locked-sigs.inc in %s" % updateserver) 111 logger.debug("Found conf/locked-sigs.inc in %s" % updateserver)
117 update_dict = generate_update_dict(new_locked_sig_file_path, old_locked_sig_file_path) 112 update_dict = generate_update_dict(new_locked_sig_file_path, old_locked_sig_file_path)
118 logger.debug("update_dict = %s" % update_dict) 113 logger.debug("update_dict = %s" % update_dict)
119 sstate_objects = get_sstate_objects(update_dict, updateserver) 114 sstate_dir = os.path.join(newsdk_path, 'sstate-cache')
115 if not os.path.exists(sstate_dir):
116 logger.error("sstate-cache directory not found under %s" % newsdk_path)
117 return 1
118 sstate_objects = get_sstate_objects(update_dict, sstate_dir)
120 logger.debug("sstate_objects = %s" % sstate_objects) 119 logger.debug("sstate_objects = %s" % sstate_objects)
121 if len(sstate_objects) == 0: 120 if len(sstate_objects) == 0:
122 logger.info("No need to update.") 121 logger.info("No need to update.")