summaryrefslogtreecommitdiffstats
path: root/urpm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-02-26 21:42:07 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-02-26 21:42:07 +0000
commit1eadf2538df62a9a2b476b2734d4dac8c238b42d (patch)
tree63f126bca33013e820268e5661d20bfe6e41f3d0 /urpm
parent4e70971c3741b3311e27dbf009d12719e0ce09f1 (diff)
downloadurpmi-1eadf2538df62a9a2b476b2734d4dac8c238b42d.tar
urpmi-1eadf2538df62a9a2b476b2734d4dac8c238b42d.tar.gz
urpmi-1eadf2538df62a9a2b476b2734d4dac8c238b42d.tar.bz2
urpmi-1eadf2538df62a9a2b476b2734d4dac8c238b42d.tar.xz
urpmi-1eadf2538df62a9a2b476b2734d4dac8c238b42d.zip
remove not useful %fstab
Diffstat (limited to 'urpm')
-rw-r--r--urpm/sys.pm6
1 files changed, 2 insertions, 4 deletions
diff --git a/urpm/sys.pm b/urpm/sys.pm
index aafe7b64..f0359521 100644
--- a/urpm/sys.pm
+++ b/urpm/sys.pm
@@ -43,18 +43,16 @@ sub _read_fstab_or_mtab {
#- filtering according the next operation (mount or umount).
sub find_mntpoints {
my ($dir, $infos) = @_;
- my (%fstab, @mntpoints);
#- read /etc/fstab and check for existing mount point.
foreach (_read_fstab_or_mtab("/etc/fstab")) {
- $fstab{$_->{mntpoint}} = 0;
$infos->{$_->{mntpoint}} = { mounted => 0, %$_ };
}
foreach (_read_fstab_or_mtab("/etc/mtab")) {
- $fstab{$_->{mntpoint}} = 1;
$infos->{$_->{mntpoint}} = { mounted => 1, %$_ };
}
+ my (@mntpoints);
#- try to follow symlink, too complex symlink graph may not be seen.
#- check the possible mount point.
my @paths = split '/', $dir;
@@ -64,7 +62,7 @@ sub find_mntpoints {
length($_) or next;
$pdir .= "/$_";
$pdir =~ s,/+,/,g; $pdir =~ s,/$,,;
- if (exists($fstab{$pdir})) {
+ if (exists($infos->{$pdir})) {
push @mntpoints, $pdir;
#- following symlinks may be useless or dangerous for supermounted devices.
#- this means it is assumed no symlink inside a removable device