summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYeongil Jang <yg0577.jang@samsung.com>2015-01-22 15:01:47 +0900
committeradmin <yuhuan.yang@samsung.com>2016-02-04 18:33:27 +0800
commitb916dde214cdab3919c85e49a0c45f5319cad244 (patch)
tree8f4290709dca99f2789c9e20cc655a0028b5157e
parent29c610feb29f45eb1b2fdb59c2836f5b0b6e3508 (diff)
downloadmic-b916dde214cdab3919c85e49a0c45f5319cad244.tar.gz
mic-b916dde214cdab3919c85e49a0c45f5319cad244.tar.bz2
mic-b916dde214cdab3919c85e49a0c45f5319cad244.zip
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 <yg0577.jang@samsung.com>
-rw-r--r--mic/imager/baseimager.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/mic/imager/baseimager.py b/mic/imager/baseimager.py
index 10c433f..81ce9f4 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 and self.target_arch.startswith("arm"):
for dep in self._dep_checks:
@@ -1052,6 +1055,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