summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2003-05-21 14:30:24 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2003-05-21 14:30:24 +0000
commit0d70c8f8622c7cb47963b8b8aa2aefc3a658cf69 (patch)
tree01c403f44cbe716cd630840cf910cdf4a5087559 /perl-install
parent6d601df6422fe2c25bce17152884bc6239c6b14a (diff)
downloaddrakx-0d70c8f8622c7cb47963b8b8aa2aefc3a658cf69.tar
drakx-0d70c8f8622c7cb47963b8b8aa2aefc3a658cf69.tar.gz
drakx-0d70c8f8622c7cb47963b8b8aa2aefc3a658cf69.tar.bz2
drakx-0d70c8f8622c7cb47963b8b8aa2aefc3a658cf69.tar.xz
drakx-0d70c8f8622c7cb47963b8b8aa2aefc3a658cf69.zip
(gtktext_append) fix gtktext_insert() call
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/ugtk2.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm
index 975e72f75..9026f4aff 100644
--- a/perl-install/ugtk2.pm
+++ b/perl-install/ugtk2.pm
@@ -515,7 +515,7 @@ sub gtkcreate_pixbuf {
return Gtk2::Gdk::Pixbuf->new_from_file(_find_imgfile(@_));
}
-sub gtktext_append { gtktext_insert(@_, { 'append' => 1 }) }
+sub gtktext_append { gtktext_insert(@_, ( 'append' => 1)) }
# choose one of the two styles:
# - gtktext_insert($textview, "My text..");
5ce05d02a0123c74ae88114d24'>perl-install/diskdrake/interactive.pm
@@ -105,6 +105,7 @@ struct hd {
string info # name of the hd, eg: 'QUANTUM ATLAS IV 9 WLS'
bool readonly # is it allowed to modify the partition table
+ bool getting_rid_of_readonly_allowed # is it forbidden to write because the partition table is badly handled, or is it because we MUST not change the partition table
bool isDirty # does it need to be written to the disk
bool needKernelReread # must we tell the kernel to reread the partition table
bool hasBeenDirty # for undo
@@ -264,7 +265,11 @@ sub Done {
################################################################################
sub hd_possible_actions {
my ($in, $hd, $all_hds) = @_;
- __("Clear all"), if_($::isInstall && !$hd->{readonly}, __("Auto allocate")), __("More");
+ (
+ if_(!$hd->{readonly} || $hd->{getting_rid_of_readonly_allowed}, __("Clear all")),
+ if_(!$hd->{readonly} && $::isInstall, __("Auto allocate")),
+ __("More"),
+ );
}
sub hd_possible_actions_interactive {
my ($in, $hd, $all_hds) = @_;
@@ -282,7 +287,8 @@ sub Clear_all {
if (isLVM($hd)) {
lvm::lv_delete($hd, $_) foreach @parts
} else {
- $hd->{readonly} = 0; #- give a way out of readonly-ness. Dangerous!
+ $hd->{readonly} = 0; #- give a way out of readonly-ness. only allowed when getting_rid_of_readonly_allowed
+ $hd->{getting_rid_of_readonly_allowed} = 0;
partition_table::raw::zero_MBR_and_dirty($hd);
}
}
diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm
index 4c2c43316..c262bcd59 100644
--- a/perl-install/fsedit.pm
+++ b/perl-install/fsedit.pm
@@ -792,6 +792,7 @@ sub use_proc_partitions {
log::l("using /proc/partitions since diskdrake failed :(");
partition_table::raw::zero_MBR($hd);
$hd->{readonly} = 1;
+ $hd->{getting_rid_of_readonly_allowed} = 1;
$hd->{primary} = { normal => [ grep { $_->{rootDevice} eq $hd->{device} } read_proc_partitions([$hd]) ] };
}