From a95127717661a0f7ff28d80651070a9bae328b7f Mon Sep 17 00:00:00 2001 From: Sanghoon Lee Date: Wed, 18 Jul 2018 11:40:58 +0900 Subject: [PATCH] [Inst][Non-ACR][Updated inst.py] Change-Id: If5ceff9f1aad313daa89305093edabd27055cfdc --- tool/script/template/inst.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tool/script/template/inst.py b/tool/script/template/inst.py index 31d04b7..d59a531 100755 --- a/tool/script/template/inst.py +++ b/tool/script/template/inst.py @@ -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 -- 2.7.4