From: Yeongil Jang Date: Thu, 22 Jan 2015 06:01:47 +0000 (+0900) Subject: Don't check disk size during rpm transaction when creating multiple partitions X-Git-Tag: accepted/tizen/devbase/tools/20190927.044807~92^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F15%2F41815%2F1;p=tools%2Fmic.git Don't check disk size during rpm transaction when creating multiple partitions rpm check only "/" partition size before installing packages Change-Id: Ic00e937530f926f58ee4099f7a079c640fc721a5 Signed-off-by: Yeongil Jang --- diff --git a/mic/imager/baseimager.py b/mic/imager/baseimager.py index 20254db..38a72db 100644 --- a/mic/imager/baseimager.py +++ b/mic/imager/baseimager.py @@ -86,6 +86,7 @@ class BaseImageCreator(object): self._local_pkgs_path = None self.pack_to = None self.repourl = {} + self.multiple_partitions = False # If the kernel is save to the destdir when copy_kernel cmd is called. self._need_copy_kernel = False @@ -151,6 +152,8 @@ class BaseImageCreator(object): if part.fstype and part.fstype == "btrfs": self._dep_checks.append("mkfs.btrfs") break + if len(self.ks.handler.partition.partitions) > 1: + self.multiple_partitions = True if self.target_arch: if self.target_arch.startswith("arm"): @@ -1072,6 +1075,11 @@ class BaseImageCreator(object): checksize -= BOOT_SAFEGUARD if self.target_arch: pkg_manager._add_prob_flags(rpm.RPMPROB_FILTER_IGNOREARCH) + + # If we have multiple partitions, don't check diskspace when rpm run transaction + # because rpm check '/' partition only. + if self.multiple_partitions: + pkg_manager._add_prob_flags(rpm.RPMPROB_FILTER_DISKSPACE) pkg_manager.runInstall(checksize) except CreatorError, e: raise