From 6798f7c5ecd5a92f43dde1ab1e206ee3c124e916 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 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. --- src/sbin/livemedia-creator | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/sbin/livemedia-creator b/src/sbin/livemedia-creator index f526e37a..971b48a3 100755 --- a/src/sbin/livemedia-creator +++ b/src/sbin/livemedia-creator @@ -989,7 +989,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 """ # Disk size for a filesystem image should only be the size of / # to prevent surprises when using the same kickstart for different installations. @@ -1480,7 +1481,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