[Mageia-dev] [soft-commits] [4253] reuse code from hd_gtk, fixes display of "Use free space" solution
Thierry Vignaud
thierry.vignaud at gmail.com
Wed May 9 11:38:38 CEST 2012
On 24 April 2012 23:58, <root at mageia.org> wrote:
> Revision 4253 Author pterjan Date 2012-04-24 23:58:30 +0200 (Tue, 24 Apr
> 2012)
>
> Log Message
>
> reuse code from hd_gtk, fixes display of "Use free space" solution
Now upgrading a RAID fails again.
Once you select the RAID in the pull down menu, the partitionning wizard
complains:
"Error: Not an ARRAY reference at (...)diskdrake/hd_gtk.pm line 441"
Only solution is back to custom partitioning...
> Modified: drakx/trunk/perl-install/diskdrake/hd_gtk.pm
> ===================================================================
> --- drakx/trunk/perl-install/diskdrake/hd_gtk.pm 2012-04-24 21:17:30 UTC
> (rev 4252)
> +++ drakx/trunk/perl-install/diskdrake/hd_gtk.pm 2012-04-24 21:58:30 UTC
> (rev 4253)
> @@ -250,13 +250,8 @@
> my ($_in, $kind) = @_;
>
> $_->destroy foreach $kind->{display_box}->get_children;
> -
> - my $v = $kind->{val};
> - my @parts =
> - $kind->{type} eq 'raid' ? grep { $_ } @$v :
> - $kind->{type} eq 'loopback' ? @$v : fs::get::hds_fstab_and_holes($v);
> - my $totalsectors =
> - $kind->{type} =~ /raid|loopback/ ? sum(map { $_->{size} } @parts) :
> $v->{totalsectors};
> + my @parts = kind2parts($kind);
> + my $totalsectors = kind2sectors($kind, @parts);
> create_buttons4partitions($kind, $totalsectors, @parts);
> }
>
> @@ -433,6 +428,21 @@
> }
> }
>
> +sub kind2parts {
> + my ($kind) = @_;
> + my $v = $kind->{val};
> + my @parts =
> + $kind->{type} eq 'raid' ? grep { $_ } @$v :
> + $kind->{type} eq 'loopback' ? @$v : fs::get::hds_fstab_and_holes($v);
> + @parts;
> +}
> +
> +sub kind2sectors {
> + my ($kind, @parts) = @_;
> + my $v = $kind->{val};
> + $kind->{type} =~ /raid|loopback/ ? sum(map { $_->{size} } @parts) :
> $v->{totalsectors};
> +}
> +
>
> ################################################################################
> # lvms: helpers
>
> ################################################################################
>
> Modified: drakx/trunk/perl-install/fs/partitioning_wizard.pm
> ===================================================================
> --- drakx/trunk/perl-install/fs/partitioning_wizard.pm 2012-04-24 21:17:30
> UTC (rev 4252)
> +++ drakx/trunk/perl-install/fs/partitioning_wizard.pm 2012-04-24 21:58:30
> UTC (rev 4253)
> @@ -287,10 +287,9 @@
>
> sub create_display_box {
> my ($kind, $resize, $fill_empty, $button) = @_;
> - # perl_checker: require UNIVERSAL
> - my @parts = fs::get::hds_fstab_and_holes($kind->{val}) if
> UNIVERSAL::can($kind->{val}, 'first_usable_sector,');
>
> - my $totalsectors = $kind->{val}{totalsectors};
> + my @parts = diskdrake::hd_gtk::kind2parts($kind);
> + my $totalsectors = diskdrake::hd_gtk::kind2sectors($kind, @parts);
>
> my $width = 540;
> my $minwidth = 40;
>
> Modified: drakx/trunk/perl-install/install/NEWS
> ===================================================================
> --- drakx/trunk/perl-install/install/NEWS 2012-04-24 21:17:30 UTC (rev 4252)
> +++ drakx/trunk/perl-install/install/NEWS 2012-04-24 21:58:30 UTC (rev 4253)
> @@ -7,6 +7,7 @@
> o systemd support (mga#3253, mga#3740, mga#4910, mga#5122)
> - partitioning wizard:
> o fix removing several notebook pages
> + o reuse code from hd_gtk, fixes display of "Use free space" solution
>
> Version 14.10 - 23 April 2012
>
>
More information about the Mageia-dev
mailing list