[pve-devel] applied: [PATCH installer 1/2] Fix #2009: Recreate hdsize_adj with new hdsize

Thomas Lamprecht t.lamprecht at proxmox.com
Mon Dec 10 10:21:00 CET 2018


On 12/7/18 12:35 PM, Stoiko Ivanov wrote:
> Creating $hdsize_size_adjustment once with a passed hdsize, breaks changing
> the disk to a smaller/larger one, since the installer is stuck with the limits
> set with the initial disk.
> 
> Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
> ---
>  proxinstall | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/proxinstall b/proxinstall
> index 9945dd1..159c727 100755
> --- a/proxinstall
> +++ b/proxinstall
> @@ -2501,11 +2501,13 @@ my $hdsize_entry_buffer;
>  my $get_hdsize_spinbtn = sub {
>      my $hdsize = shift;
>  
> -    if (!defined($hdsize_size_adj)) {
> -	die "called get_hdsize_spinbtn with \$hdsize_size_adj not defined but did not pass hdsize!\n"
> -	    if !defined($hdsize);
> +    $hdsize_entry_buffer //= Gtk3::EntryBuffer->new(undef, 1);
> +
> +    if (defined($hdsize)) {
>  	$hdsize_size_adj = Gtk3::Adjustment->new($config_options->{hdsize} || $hdsize, 0, $hdsize+1, 1, 1, 1);
> -	$hdsize_entry_buffer = Gtk3::EntryBuffer->new(undef, 1);
> +    } else {
> +	die "called get_hdsize_spinbtn with \$hdsize_size_adj not defined but did not pass hdsize!\n"
> +	    if !defined($hdsize_size_adj);
>      }
>  
>      my $spinbutton_hdsize = Gtk3::SpinButton->new($hdsize_size_adj, 1, 1);
> 

applied, thanks!




More information about the pve-devel mailing list