mirror of
				https://github.com/ARM-software/workload-automation.git
				synced 2025-10-29 22:24:51 +00:00 
			
		
		
		
	ApkWorkload: only uninstall if package is already installed
Attempting to uninstall an non-existing package will result in an error. So, when replace=True for install_apk(), only attempt to uninstall if the package is already present on the target.
This commit is contained in:
		| @@ -414,7 +414,7 @@ class ApkWorkload(Workload): | ||||
|  | ||||
|     def install_apk(self, context, replace=False): | ||||
|         success = False | ||||
|         if replace: | ||||
|         if replace and self.device.package_is_installed(self.package): | ||||
|             self.device.uninstall(self.package) | ||||
|         output = self.device.install_apk(self.apk_file, timeout=self.install_timeout, | ||||
|                                          replace=replace, allow_downgrade=True) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user