From e0da9b987b9b286d91687a15741a963a25d181d9 Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Thu, 17 Oct 2019 10:17:14 -0700 Subject: [PATCH] composer: Add the yum cache archive size to the size estimate anaconda moves the yum cache to the disk once it is partitioned, so the downloaded rpms also consume space until the installation is finished. Take this into account when estimating the size. Thanks to Christophe Besson for spotting this. Related: rhbz#1761337 --- src/pylorax/api/projects.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pylorax/api/projects.py b/src/pylorax/api/projects.py index 03a9ae14..51512056 100644 --- a/src/pylorax/api/projects.py +++ b/src/pylorax/api/projects.py @@ -363,6 +363,8 @@ def estimate_size(packages, block_size=4096): for p in packages: installed_size += len(p.po.filelist) * block_size installed_size += p.po.installedsize + # also count the RPM package size (yum cache) + installed_size += ((p.po.size / block_size) + 1) * block_size return installed_size def projects_depsolve_with_size(yb, projects, groups, with_core=True):