diff options
-rw-r--r-- | man/C/urpmi.addmedia.8 | 4 | ||||
-rwxr-xr-x | urpmi.addmedia | 20 |
2 files changed, 14 insertions, 10 deletions
diff --git a/man/C/urpmi.addmedia.8 b/man/C/urpmi.addmedia.8 index 52f3b7f2..8d1a8c02 100644 --- a/man/C/urpmi.addmedia.8 +++ b/man/C/urpmi.addmedia.8 @@ -100,10 +100,10 @@ Use specified \fIurl\fP for list of mirrors, the default from MandrakeSoft is installed which make \fBurpmi.addmedia\fP look at its mirror configuration file. .IP "\fB\--version\fP \fIversion\fP" Use specified version when using \fB--distrib-XXX\fP, the default is version of -\fBmandrake-release\fP package installed. +\fBmandrakelinux-release\fP package installed. .IP "\fB\--arch\fP \fIarch\fP" Use specified architecture when using \fB--distrib-XXX\fP, the default is -architecture of \fBmandrake-release\fP package installed. +architecture of \fBmandrakelinux-release\fP package installed. .IP "\fB\--virtual\fP" Create a virtual medium, this only works for file:// and removable:// protocol and no files will be created in /var/lib/urpmi. The medium is always up-to-date diff --git a/urpmi.addmedia b/urpmi.addmedia index 7efd2a6e..735879c9 100755 --- a/urpmi.addmedia +++ b/urpmi.addmedia @@ -66,9 +66,9 @@ and [options] are from %s ", $mirrors) . N(" --version - use specified distribution version, the default is taken from the version of the distribution told by the - installed mandrake-release package. + installed mandrakelinux-release package. ") . N(" --arch - use specified architecture, the default is arch of - mandrake-release package installed. + mandrakelinux-release package installed. ") . N(" --virtual - create virtual media wich are always up-to-date, only file:// protocol is allowed. ") . N(" --no-md5sum - disable MD5SUM file checking. @@ -118,12 +118,16 @@ sub main { #- get default value unless already provided. unless ($options{version} && $options{arch}) { my $db = URPM::DB::open; - $db->traverse_tag('name', [ qw(mandrake-release basesystem) ], sub { - my ($pkg) = @_; - $pkg->release =~ /0\./ and $options{version} ||= 'cooker'; - $options{version} ||= $pkg->version; - $pkg->arch ne 'noarch' and $options{arch} ||= $pkg->arch; - }); + $db->traverse_tag( + 'name', + [ qw(mandrakelinux-release basesystem) ], + sub { + my ($pkg) = @_; + $pkg->release =~ /0\./ and $options{version} ||= 'cooker'; + $options{version} ||= $pkg->version; + $pkg->arch ne 'noarch' and $options{arch} ||= $pkg->arch; + }, + ); } #- sanity checks... $options{distrib} eq 'updates' && $options{version} eq 'cooker' and |