[Inst][Non-ACR][Updated inst.py] 19/184419/1
authorSanghoon Lee <shooney.lee@samsung.com>
Wed, 18 Jul 2018 02:40:58 +0000 (11:40 +0900)
committerSanghoon Lee <shooney.lee@samsung.com>
Wed, 18 Jul 2018 02:40:58 +0000 (11:40 +0900)
Change-Id: If5ceff9f1aad313daa89305093edabd27055cfdc

tool/script/template/inst.py

index 31d04b7..d59a531 100755 (executable)
@@ -63,6 +63,13 @@ def getUSERID():
 
 
 def getPKGID(pkg_name=None):
+
+    if pkg_name.endswith("-1.0.0"):
+        pkg_name = pkg_name.replace("-1.0.0","")
+    elif pkg_name.endswith("-1.0.0-arm"):
+        pkg_name = pkg_name.replace("-1.0.0-arm","")
+
+
     if PARAMETERS.mode == "SDB":
         cmd = "sdb -s %s shell %s" % (
             PARAMETERS.device, updateCMD('pkgcmd -l'))
@@ -112,10 +119,14 @@ def uninstPKGs():
     action_status = True
     doRemoteCMD("sh /home/owner/share/res/copy_res.sh -u")
     doRemoteCMD("rm -rf /home/owner/share/res")
+
     for root, dirs, files in os.walk(SCRIPT_DIR):
+        print "uninstPKGs ################################"
         for file in files:
+            print ("file : " + file)
             if file.endswith(".wgt"):
                 pkg_id = getPKGID(os.path.basename(os.path.splitext(file)[0]))
+                print ("pkg_id wgt : " + pkg_id)
                 if not pkg_id:
                     action_status = False
                     continue
@@ -127,6 +138,7 @@ def uninstPKGs():
                         break
             elif file.endswith(".tpk"):
                 pkg_id = getPKGID(os.path.basename(os.path.splitext(file)[0]))
+                print ("tpk pkg_id : " + pkg_id)
                 if not pkg_id:
                     action_status = False
                     continue
@@ -139,6 +151,7 @@ def uninstPKGs():
 
     (return_code, output) = doRemoteCMD(
         "rm -rf %s" % PKG_SRC_DIR)
+
     if return_code != 0:
         action_status = False