summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-09-21 10:37:03 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-09-21 10:37:03 +0000
commit6ed92702112c76f41ab8725f15ae101b3f9033ed (patch)
treedfbb690cf416912cbf3188072a73c9106b684848
parentd7673c40f27c83f90e3ca5dbdd2fbd80f9c1eff2 (diff)
downloadurpmi-6ed92702112c76f41ab8725f15ae101b3f9033ed.tar
urpmi-6ed92702112c76f41ab8725f15ae101b3f9033ed.tar.gz
urpmi-6ed92702112c76f41ab8725f15ae101b3f9033ed.tar.bz2
urpmi-6ed92702112c76f41ab8725f15ae101b3f9033ed.tar.xz
urpmi-6ed92702112c76f41ab8725f15ae101b3f9033ed.zip
* urpmi.addmedia: try to mount the directory if file contains
/mnt, mainly for /mnt/nfs (it can't hurt) * urpmi.addmedia (update): no args now means '-a'
-rw-r--r--ChangeLog7
-rwxr-xr-xurpmi.addmedia10
2 files changed, 13 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 5f0755b4..71e80c2a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2000-09-21 Pixel <pixel@mandrakesoft.com>
+
+ * urpmi.addmedia: try to mount the directory if file contains
+ /mnt, mainly for /mnt/nfs (it can't hurt)
+
+ * urpmi.addmedia (update): no args now means '-a'
+
2000-06-29 Pixel <pixel@mandrakesoft.com>
* urpmi.addmedia, urpmf, autoirpm.update: nice fixes from diablero
diff --git a/urpmi.addmedia b/urpmi.addmedia
index 1561c19e..3fa058a8 100755
--- a/urpmi.addmedia
+++ b/urpmi.addmedia
@@ -30,10 +30,9 @@ if ($0 =~ /removemedia/) {
system("urpmi.update");
exit 0;
} elsif ($0 =~ /update/) {
- if (local ($_) = @ARGV) {
- my $regexp = /^--?a/ ? '[^#]\S*' : join('|', @ARGV);
- system("urpmi.addmedia --noupdate $_") foreach grep { /^$regexp\s/ } `cat $CFG`;
- }
+ my $regexp = !@ARGV || $ARGV[0] =~ /^--?a/ ? '[^#]\S*' : join('|', @ARGV);
+ system("urpmi.addmedia --noupdate $_") foreach grep { /^$regexp\s/ } `cat $CFG`;
+
my @hdlists = glob("$DIR/hdlist.*");
if (@hdlists) {
system("genbasefiles $DIR ". join (' ', @hdlists));
@@ -86,6 +85,9 @@ my $RPMLIST = "$DIR/list.$name";
!-e $HDLIST || unlink $HDLIST or die "can't remove $HDLIST";
if (my ($prefix, $dir) = $url =~ m,^(removable_.*?|file):/(.*),) {
+ if (!-e $dir && $dir =~ m|^(/mnt/.*?)|) {
+ $try2mount{$1} or $try2mount{$1} = 1, `mount $1 2>/dev/null`;
+ }
my $f;
if ($dir =~ /RPMS(.*)$/) {
$f = "$dir/Mandrake/base/hdlist$1.$EXT";