summaryrefslogtreecommitdiffstats
path: root/urpmi.addmedia
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2001-04-03 12:50:35 +0000
committerFrancois Pons <fpons@mandriva.com>2001-04-03 12:50:35 +0000
commit471cbdf53eb00c292cb426b3f6978a513ae18989 (patch)
tree7d7a6e187afd96de4948b8e381f59db12f680146 /urpmi.addmedia
parent95219b3451a5a6365849eaf7a6c4610c21ef9e4a (diff)
downloadurpmi-471cbdf53eb00c292cb426b3f6978a513ae18989.tar
urpmi-471cbdf53eb00c292cb426b3f6978a513ae18989.tar.gz
urpmi-471cbdf53eb00c292cb426b3f6978a513ae18989.tar.bz2
urpmi-471cbdf53eb00c292cb426b3f6978a513ae18989.tar.xz
urpmi-471cbdf53eb00c292cb426b3f6978a513ae18989.zip
*** empty log message ***
Diffstat (limited to 'urpmi.addmedia')
-rwxr-xr-xurpmi.addmedia7
1 files changed, 6 insertions, 1 deletions
diff --git a/urpmi.addmedia b/urpmi.addmedia
index 8917a945..8ad65c3e 100755
--- a/urpmi.addmedia
+++ b/urpmi.addmedia
@@ -48,7 +48,7 @@ where <url> is one of
$dev && -e "/dev/$dev" or die(sprintf _("%s\ndevice `%s' do not exist\n"), $usage, $dev);
} elsif ($with eq "with") {
$relative_hdlist or die(sprintf _("%s\n<relative path of hdlist> missing\n"), $usage);
- } elsif ($with) {
+ } elsif ($ftp) {
$with eq "with" or die(sprintf _("%s\n`with' missing for ftp media\n"), $usage);
}
@@ -57,6 +57,11 @@ where <url> is one of
$urpm->read_config;
$urpm->add_medium($name, $url, $relative_hdlist);
$urpm->update_media;
+
+ #- check creation of media (during update has been successfull)
+ my ($medium) = grep { $_->{name} eq $name } @{$urpm->{media}};
+ $medium or die(sprintf _("unable to create medium \"%s\"\n"), $name);
+ $medium->{modified} and die(sprintf _("unable to update medium \"%s\"\n"), $name);
}
main(@ARGV);