diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2004-08-10 10:05:04 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2004-08-10 10:05:04 +0000 |
commit | cdf1741197fb5c0376400362e5200838493ad14f (patch) | |
tree | 607e29655f0caaf25b38f4f028ff745e73e19d3a /perl-install/fs | |
parent | 23c2f66bb9e8862ef38c90a811fe9b00825111c4 (diff) | |
download | drakx-cdf1741197fb5c0376400362e5200838493ad14f.tar drakx-cdf1741197fb5c0376400362e5200838493ad14f.tar.gz drakx-cdf1741197fb5c0376400362e5200838493ad14f.tar.bz2 drakx-cdf1741197fb5c0376400362e5200838493ad14f.tar.xz drakx-cdf1741197fb5c0376400362e5200838493ad14f.zip |
when there is no {pt_type}, favour the one fs_type2pt_type favours
Diffstat (limited to 'perl-install/fs')
-rw-r--r-- | perl-install/fs/type.pm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/perl-install/fs/type.pm b/perl-install/fs/type.pm index e2b484647..6eb7e6c12 100644 --- a/perl-install/fs/type.pm +++ b/perl-install/fs/type.pm @@ -193,13 +193,13 @@ sub type_name2subpart { sub part2type_name { my ($part) = @_; my @names = keys %type_name2fs_type; - if (exists $part->{pt_type}) { - @names = grep { $part->{pt_type} eq $type_name2pt_type{$_} } @names; + + if (my $pt_type = $part->{pt_type} || $part->{fs_type} && $fs_type2pt_type{$part->{fs_type}}) { + @names = grep { $pt_type eq $type_name2pt_type{$_} } @names; } - if ($part->{fs_type}) { - @names = grep { $part->{fs_type} eq $type_name2fs_type{$_} } @names; + if (my $fs_type = $part->{fs_type} || $part->{pt_type} && $pt_type2fs_type{$part->{pt_type}}) { + @names = grep { $fs_type eq $type_name2fs_type{$_} } @names; } - if (@names > 1) { log::l("ERROR: (part2type_name) multiple match for $part->{pt_type} $part->{fs_type}"); } |