bugfix - extra packges could overflow root fs size

This commit is contained in:
bill-auger 2020-04-07 19:00:24 -04:00
parent fdcb13660f
commit 340dd9a179
No known key found for this signature in database
GPG Key ID: 908710913E8C7778

@ -443,8 +443,8 @@ main() # ( [cli_options] imagefile arch )
# vaidate options and calculate options-dependent vars
(( $RootSizeMb > 0 )) && \
(( $RootSizeMb < $MinRootMb )) && warning "specified root FS size too small - ignoring PkgsOptional"
(( $RootSizeMb < $MinRootMb )) && RootSizeMb=$MinRootMb && PkgsOptional=()
(( $RootSizeMb < $MinRootMb )) && warning "specified root FS size too small - ignoring -c and -p packages"
(( $RootSizeMb < $MinRootMb )) && RootSizeMb=$MinRootMb PkgsCached=() PkgsOptional=()
RootSizeMb=$(( $RootSizeMb + (${#Kernels[@]} * 75) ))
ImgSizeMb=$(( $BootSizeMb + $SwapSizeMb + $RootSizeMb ))
HasSwap=$( (( $SwapSizeMb > 0 )) && echo 1 || echo 0 )