summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2009-11-12 18:37:59 +0000
committerOlivier Blin <oblin@mandriva.com>2009-11-12 18:37:59 +0000
commit6cc8574a6e37cb33949cac3395c220d63836472a (patch)
treeb4627a7338391d4ff2183fd6dbbc1b531df982a0 /perl-install
parentf2303d52b00d8f0b4813902cd9fa72aab6a61264 (diff)
downloaddrakx-6cc8574a6e37cb33949cac3395c220d63836472a.tar
drakx-6cc8574a6e37cb33949cac3395c220d63836472a.tar.gz
drakx-6cc8574a6e37cb33949cac3395c220d63836472a.tar.bz2
drakx-6cc8574a6e37cb33949cac3395c220d63836472a.tar.xz
drakx-6cc8574a6e37cb33949cac3395c220d63836472a.zip
fix detecting hidden partitions as recovery (broken in commit 257797)
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/NEWS1
-rw-r--r--perl-install/fs/type.pm2
-rw-r--r--perl-install/install/NEWS1
-rw-r--r--perl-install/install/pkgs.pm7
4 files changed, 9 insertions, 2 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index 270811ab2..e01889383 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -8,6 +8,7 @@
- drakboot
o rework UI layout to account for CONSOLE_LOGO support removal
- display_help: handle window.close() events (#55099)
+- fix detecting hidden partitions as recovery
Version 12.77 - 30 October 2009
diff --git a/perl-install/fs/type.pm b/perl-install/fs/type.pm
index 80176f15a..42a11f9c6 100644
--- a/perl-install/fs/type.pm
+++ b/perl-install/fs/type.pm
@@ -326,7 +326,7 @@ sub isFat_or_NTFS { member($_[0]{fs_type}, 'vfat', 'ntfs', 'ntfs-3g') }
sub isApple { $_[0]{pt_type} == 0x401 && defined $_[0]{isDriver} }
sub isAppleBootstrap { $_[0]{pt_type} == 0x401 && defined $_[0]{isBoot} }
sub isRecovery {
- isFat_or_NTFS($_[0]) && ($_[0]{type_name} eq 'Hidden' ||
+ isFat_or_NTFS($_[0]) && ($_[0]{type_name} =~ /^Hidden/ ||
member($_[0]{device_LABEL} ,
# Extracted from /usr/share/hal/fdi/policy/10osvendor/20-storage-methods.fdi
# Hopefuly we'll ask to hal/udev someday
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS
index 3c5959119..b284ac32c 100644
--- a/perl-install/install/NEWS
+++ b/perl-install/install/NEWS
@@ -1,4 +1,5 @@
- do not offer to upgrade/install in restore mode
+- fix detecting hidden partitions as recovery
Version 12.77 - 30 October 2009
diff --git a/perl-install/install/pkgs.pm b/perl-install/install/pkgs.pm
index 6e01f37e8..02d125b4a 100644
--- a/perl-install/install/pkgs.pm
+++ b/perl-install/install/pkgs.pm
@@ -81,12 +81,17 @@ sub size2time {
}
}
+sub packageProviding {
+ my ($packages, $name) = @_;
+ grep { $_->is_arch_compat && $_->name eq $name } URPM::packages_providing($packages, $name);
+}
+
#- search package with given name and compatible with current architecture.
#- take the best one found (most up-to-date).
sub packageByName {
my ($packages, $name) = @_;
- my @l = grep { $_->is_arch_compat && $_->name eq $name } URPM::packages_providing($packages, $name);
+ my @l = packageProviding($packages, $name);
my $best;
foreach (@l) {