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'))
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
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
(return_code, output) = doRemoteCMD(
"rm -rf %s" % PKG_SRC_DIR)
+
if return_code != 0:
action_status = False