diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-03-30 09:39:00 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-03-30 09:39:00 +0000 |
commit | 2836de6057e58e1e0bf265234b0ab162100c0644 (patch) | |
tree | 0d4715263c35d31b4aaf4803b704386dd10af603 /urpm | |
parent | ff3f52e7ce547e83075a5dfd4405730a8cf0e12e (diff) | |
download | urpmi-2836de6057e58e1e0bf265234b0ab162100c0644.tar urpmi-2836de6057e58e1e0bf265234b0ab162100c0644.tar.gz urpmi-2836de6057e58e1e0bf265234b0ab162100c0644.tar.bz2 urpmi-2836de6057e58e1e0bf265234b0ab162100c0644.tar.xz urpmi-2836de6057e58e1e0bf265234b0ab162100c0644.zip |
Don't try to find ISO mountpoints if an ISO image is already mounted
Diffstat (limited to 'urpm')
-rw-r--r-- | urpm/sys.pm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/urpm/sys.pm b/urpm/sys.pm index 3b542eec..11c7604f 100644 --- a/urpm/sys.pm +++ b/urpm/sys.pm @@ -103,6 +103,12 @@ sub first_free_loopdev () { sub trim_until_d { my ($dir) = @_; + open my $mounts, '/proc/mounts' or do { warn "Can't read /proc/mounts: $!\n"; return $dir }; + local *_; + while (<$mounts>) { + #- fail if an iso is already mounted + m!^/dev/loop! and return $dir; + } while ($dir && !-d $dir) { $dir =~ s,/[^/]*$,, } $dir; } |