[TIC-CORE] fix the default package selection 07/117607/1
authorChulwoo Shin <cw1.shin@samsung.com>
Tue, 7 Mar 2017 00:47:54 +0000 (09:47 +0900)
committerChulwoo Shin <cw1.shin@samsung.com>
Tue, 7 Mar 2017 00:47:54 +0000 (09:47 +0900)
fix the default package selection
If the defulat package does not exist, ignore it.

Change-Id: I73891f7778c6bc2846c50654460be41656d51ebf
Signed-off-by: Chulwoo Shin <cw1.shin@samsung.com>
tic/dependency.py

index 09af564..3219b1c 100644 (file)
@@ -415,11 +415,14 @@ def get_installed_packages(recipe, repoinfo, pkg_group):
         progress['status'] = True
         pkg_info = pkg_dict.get(pkg_name)
         
-        # TODO: temporary code (Define capability in group)
         if not pkg_info:
-            pro = provides.get(pkg_name)[0]
-            pkg_info = pkg_dict.get(pro['name'])
-            
+            if provides.get(pkg_name):
+                pro = provides.get(pkg_name)[0]
+                pkg_info = pkg_dict.get(pro['name'])
+            else:
+                logger.info('the default package(%s) does not exist.' % pkg_name)
+                continue 
+
         pkg_info['selfChecked'] = True
         if selected[pkg_info['id']] == 0:
             dep_set = _analyze_dep(pkg_info)
@@ -429,4 +432,4 @@ def get_installed_packages(recipe, repoinfo, pkg_group):
                 # delete forward/backward reference
                 group_visited = {} 
                 _remove_reference(None, pkg_info)
-    return list(install_rpm)
\ No newline at end of file
+    return list(install_rpm)