summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-09-19 12:28:41 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-09-19 12:28:41 +0000
commitccab815627e5ad56367a204cc78a7e3ce0b26e37 (patch)
tree7883566b8b4930b446794b66f101b1b462e5356e /perl-install
parent8a3601d1eb4d6a747dce5cee462c2f1353f4e439 (diff)
downloaddrakx-ccab815627e5ad56367a204cc78a7e3ce0b26e37.tar
drakx-ccab815627e5ad56367a204cc78a7e3ce0b26e37.tar.gz
drakx-ccab815627e5ad56367a204cc78a7e3ce0b26e37.tar.bz2
drakx-ccab815627e5ad56367a204cc78a7e3ce0b26e37.tar.xz
drakx-ccab815627e5ad56367a204cc78a7e3ce0b26e37.zip
- fix getting UUID on mdmadm (eg: md0) devices
the fix is to stop doing UUID_from_magic and LABEL_from_magic, and correctly set device_UUID and device_LABEL in the type_subpart returned by type_subpart_from_magic()
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/NEWS2
-rw-r--r--perl-install/fs/format.pm5
-rw-r--r--perl-install/fs/type.pm5
-rw-r--r--perl-install/fsedit.pm10
4 files changed, 8 insertions, 14 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index bfb76865b..c568a5c7a 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -1,3 +1,5 @@
+- fix getting UUID on mdmadm (eg: md0) devices
+
Version 10.4.202 - 17 September 2007, by Thierry Vignaud
- localedrake menu entries (#32941):
diff --git a/perl-install/fs/format.pm b/perl-install/fs/format.pm
index 157d24701..91b470964 100644
--- a/perl-install/fs/format.pm
+++ b/perl-install/fs/format.pm
@@ -128,9 +128,8 @@ sub part_raw {
disable_forced_fsck($dev);
}
- delete $part->{UUID_from_magic};
- fs::type::type_subpart_from_magic($part);
- $part->{device_UUID} = $part->{UUID_from_magic};
+ my $p = fs::type::type_subpart_from_magic($part);
+ $part->{device_UUID} = $p && $p->{device_UUID};
set_isFormatted($part, 1);
}
diff --git a/perl-install/fs/type.pm b/perl-install/fs/type.pm
index 71995af77..c0f89266d 100644
--- a/perl-install/fs/type.pm
+++ b/perl-install/fs/type.pm
@@ -279,9 +279,6 @@ sub type_subpart_from_magic {
my ($part) = @_;
my $ids = call_vol_id($part);
- $part->{LABEL_from_magic} = $ids->{ID_FS_LABEL} if $ids->{ID_FS_LABEL};
- $part->{UUID_from_magic} = $ids->{ID_FS_UUID} if $ids->{ID_FS_UUID};
-
my $p;
if ($ids->{ID_FS_USAGE} eq 'raid') {
my $name = {
@@ -297,6 +294,8 @@ sub type_subpart_from_magic {
if ($p) {
$part->{fs_type_from_magic} = $p->{fs_type};
+ $p->{device_LABEL} = $ids->{ID_FS_LABEL} if $ids->{ID_FS_LABEL};
+ $p->{device_UUID} = $ids->{ID_FS_UUID} if $ids->{ID_FS_UUID};
}
$p;
}
diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm
index adfc22f9d..1dc809ac4 100644
--- a/perl-install/fsedit.pm
+++ b/perl-install/fsedit.pm
@@ -245,17 +245,11 @@ Do you agree to lose all the partitions?
# checking the magic of the filesystem, do not rely on pt_type
foreach (@parts) {
if (my $type = fs::type::type_subpart_from_magic($_)) {
- if ($type->{fs_type}) {
- #- keep {pt_type}
- $_->{fs_type} = $type->{fs_type};
- } else {
- put_in_hash($_, $type);
- }
+ $type->{pt_type} = $_->{pt_type}; #- keep {pt_type}
+ put_in_hash($_, $type);
} else {
$_->{bad_fs_type_magic} = 1;
}
- $_->{device_LABEL} = $_->{LABEL_from_magic} if $_->{LABEL_from_magic};
- $_->{device_UUID} = $_->{UUID_from_magic} if $_->{UUID_from_magic};
}
if ($hd->{usb_media_type}) {