From 9bf1a846da955090b5c133b1d6b98cbbfd0527ae Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Mon, 21 Mar 2016 12:14:28 -0700 Subject: [PATCH] livemedia-creator: Fix off by 1024 error (#1353140) commit 4699c881090b55de12bfe6b8548b3bfe30207ba8 changed how the disk size is estimated and not all users took into account that the return value is in MiB. This would result in qemu based iso installations having a rootfs.img that was 1024x too large. (cherry picked from commit 6798f7c5ecd5a92f43dde1ab1e206ee3c124e916) --- src/sbin/livemedia-creator | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/sbin/livemedia-creator b/src/sbin/livemedia-creator index 6e65880c..194ca539 100755 --- a/src/sbin/livemedia-creator +++ b/src/sbin/livemedia-creator @@ -978,6 +978,8 @@ def calculate_disk_size(opts, ks): :param opts: options passed to livemedia-creator :type opts: argparse options :param str ks: Path to the kickstart to use for the installation + :returns: Disk size in MiB + :rtype: int Use virt-install or anaconda to install to a disk image. """ @@ -1486,7 +1488,7 @@ def main(): disk_img = opts.disk_image or disk_img with PartitionMount(disk_img) as img_mount: if img_mount and img_mount.mount_dir: - make_runtime(opts, img_mount.mount_dir, work_dir, calculate_disk_size(opts, ks)) + make_runtime(opts, img_mount.mount_dir, work_dir, calculate_disk_size(opts, ks)/1024.0) result_dir = make_livecd(opts, img_mount.mount_dir, work_dir) # --iso-only removes the extra build artifacts, keeping only the boot.iso