diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2006-11-29 14:25:01 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2006-11-29 14:25:01 +0000 |
commit | d5358dfaa2c196e595693b09dee13da02578b5d7 (patch) | |
tree | 5fe43e592dc10d859a614a09adfb57be1f3b80d7 /urpm/args.pm | |
parent | 2099cfcd9085af67d9416d8bc8aad67668860129 (diff) | |
download | urpmi-d5358dfaa2c196e595693b09dee13da02578b5d7.tar urpmi-d5358dfaa2c196e595693b09dee13da02578b5d7.tar.gz urpmi-d5358dfaa2c196e595693b09dee13da02578b5d7.tar.bz2 urpmi-d5358dfaa2c196e595693b09dee13da02578b5d7.tar.xz urpmi-d5358dfaa2c196e595693b09dee13da02578b5d7.zip |
urpmi.removemedia now use urpm::args, and some cleanup
Diffstat (limited to 'urpm/args.pm')
-rw-r--r-- | urpm/args.pm | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/urpm/args.pm b/urpm/args.pm index 200f39fb..a8260803 100644 --- a/urpm/args.pm +++ b/urpm/args.pm @@ -303,7 +303,7 @@ my %options_spec = ( if ($p =~ /^--?(.+)/) { # unrecognized option die "Unknown option: $1\n"; } - push @::toupdates, $p; + push @::cmdline, $p; }, }, @@ -318,13 +318,6 @@ my %options_spec = ( 'q|quiet' => sub { --$options{verbose} }, 'v|verbose' => sub { ++$options{verbose} }, raw => \$options{raw}, - '<>' => sub { - my ($p) = @_; - if ($p =~ /^--?(.+)/) { # unrecognized option - die "Unknown option: $1\n"; - } - push @::cmdline, $p; - }, }, 'urpmi.recover' => { @@ -390,11 +383,18 @@ foreach my $k ("help|h", "version", "wget", "curl", "prozilla", "proxy=s", "prox foreach my $k ("help|h", "wget", "curl", "prozilla", "proxy=s", "proxy-user=s", "c", "f", "z", "limit-rate=s", "no-md5sum", "update", "norebuild!", - "wget-options=s", "curl-options=s", "rsync-options=s", "prozilla-options=s") + "wget-options=s", "curl-options=s", "rsync-options=s", "prozilla-options=s", '<>') { $options_spec{'urpmi.addmedia'}{$k} = $options_spec{'urpmi.update'}{$k}; } +foreach my $k ("a", "c", 'v|verbose', 'q|quiet', '<>') { + $options_spec{'urpmi.removemedia'}{$k} = $options_spec{'urpmi.update'}{$k}; +} +foreach my $k ("y") { + $options_spec{'urpmi.removemedia'}{$k} = $options_spec{urpmi}{$k}; +} + foreach my $k ("probe-synthesis", "probe-hdlist") { $options_spec{'urpmi.addmedia'}{$k} = @@ -403,7 +403,8 @@ foreach my $k ("probe-synthesis", "probe-hdlist") } foreach my $k ("help|h", "version") { - $options_spec{'urpmi.recover'}{$k} = $options_spec{urpmi}{$k}; + $options_spec{'urpmi.removemedia'}{$k} = + $options_spec{'urpmi.recover'}{$k} = $options_spec{urpmi}{$k}; } sub parse_cmdline { |