summaryrefslogtreecommitdiffstats
path: root/perl-install/install_any.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-11-09 03:02:37 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-11-09 03:02:37 +0000
commit950fe7395621dc21885ac3e1280e007248646608 (patch)
treee3016a95189ee4c75a05b816d91dd22f071bd2c0 /perl-install/install_any.pm
parentc7df31b71335c18d60cdb8a7f5fee24d56cca4b8 (diff)
downloaddrakx-950fe7395621dc21885ac3e1280e007248646608.tar
drakx-950fe7395621dc21885ac3e1280e007248646608.tar.gz
drakx-950fe7395621dc21885ac3e1280e007248646608.tar.bz2
drakx-950fe7395621dc21885ac3e1280e007248646608.tar.xz
drakx-950fe7395621dc21885ac3e1280e007248646608.zip
no_comment
Diffstat (limited to 'perl-install/install_any.pm')
-rw-r--r--perl-install/install_any.pm10
1 files changed, 6 insertions, 4 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index 2326edaa1..d02a80608 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -172,9 +172,11 @@ sub getHds {
getHds:
$o->{hds} = catch_cdie { fsedit::hds(\@drives, $o->{partitioning}) }
sub {
- $o->ask_warn(_("Error"),
-_("I can't read your partition table, it's too corrupted for me :(
-I'll try to go on blanking bad partitions")) unless $o->{partitioning}{readonly};
+ my ($err) = $@ =~ /(.*) at /;
+ $@ =~ /overlapping/ and $o->ask_warn('', $@), return 1;
+ $o->ask_okcancel(_("Error"),
+[_("I can't read your partition table, it's too corrupted for me :(
+I'll try to go on blanking bad partitions"), $err]) unless $o->{partitioning}{readonly};
$ok = 0; 1
};
@@ -339,7 +341,7 @@ sub unlockCdroms() {
foreach detect_devices::cdroms();
}
sub ejectCdrom() {
- ioctl detect_devices::tryOpen($_), c::CDROMEJECT(), 1
+ eval { ioctl detect_devices::tryOpen($_), c::CDROMEJECT(), 1 }
foreach map { first split } grep { m|/tmp/rhimage| } cat_("/proc/mounts");
}
span>; } } elsif ($_->arch ne 'src') { #- the package is removed, make it invisible (remove id). my $id = $_->set_id; #- the architecture is not compatible, this means the package is dropped. #- we have to remove its reference in provides. foreach ($_->provides) { delete $urpm->{provides}{$_}{$id}; } } } #- relocate id used in depslist array, delete id if the package #- should NOT be used. #- if no entries have been relocated, we can safely avoid this computation. if ($relocated_entries) { foreach (@{$urpm->{depslist}}) { my $p = $urpm->{names}{$_->name} or next; $_->set_id($p->id); } } $relocated_entries; } sub traverse { my ($urpm, $callback) = @_; if ($callback) { foreach (@{$urpm->{depslist} || []}) { $callback->($_); } } scalar @{$urpm->{depslist} || []}; } sub traverse_tag { my ($urpm, $tag, $names, $callback) = @_; my ($count, %names) = (0); if (@{$names || []}) { @names{@$names} = (); if ($tag eq 'name') { foreach (@{$urpm->{depslist} || []}) { if (exists $names{$_->name}) { $callback and $callback->($_); ++$count; } } } elsif ($tag eq 'whatprovides') { foreach (@$names) { foreach (keys %{$urpm->{provides}{$_} || {}}) { $callback and $callback->($urpm->{depslist}[$_]); ++$count; } } } elsif ($tag eq 'whatrequires') { foreach (@{$urpm->{depslist} || []}) { if (grep { /^([^ \[]*)/ && exists $names{$1} } $_->requires) { $callback and $callback->($_); ++$count; } } } elsif ($tag eq 'group') { foreach (@{$urpm->{depslist} || []}) { if (exists $names{$_->group}) { $callback and $callback->($_); ++$count; } } } elsif ($tag eq 'triggeredby' || $tag eq 'path') { foreach (@{$urpm->{depslist} || []}) { if (grep { exists $names{$_} } $_->files) { $callback and $callback->($_); ++$count; } } } else { die "unknown tag"; } } $count; }