livemedia-creator: Fix off by 1024 error (#1353140)
commit4699c88109changed 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 commit6798f7c5ec)
This commit is contained in:
parent
4a2d28553e
commit
9bf1a846da
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user