diff options
author | Thierry Vignaud <tv@mandriva.org> | 2008-03-03 15:08:40 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2008-03-03 15:08:40 +0000 |
commit | 6ecb1b70b2b7410995a52b4f7fd010f5be0da525 (patch) | |
tree | f6ae56b4ec8a42c6ba676c64c21f4a7dc158d38a /urpm/args.pm | |
parent | 05ca1f54f8aea97462a1265f3d151a792b838296 (diff) | |
download | urpmi-6ecb1b70b2b7410995a52b4f7fd010f5be0da525.tar urpmi-6ecb1b70b2b7410995a52b4f7fd010f5be0da525.tar.gz urpmi-6ecb1b70b2b7410995a52b4f7fd010f5be0da525.tar.bz2 urpmi-6ecb1b70b2b7410995a52b4f7fd010f5be0da525.tar.xz urpmi-6ecb1b70b2b7410995a52b4f7fd010f5be0da525.zip |
(gurpmi::parse_command_line) reuse common shared code of urpm::args,
thus fixing --root option
Diffstat (limited to 'urpm/args.pm')
-rw-r--r-- | urpm/args.pm | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/urpm/args.pm b/urpm/args.pm index e5aeec01..759db946 100644 --- a/urpm/args.pm +++ b/urpm/args.pm @@ -59,6 +59,16 @@ my %options_spec_all = ( my %options_spec = ( + gurpmi => { + auto => sub { $urpm->{options}{auto} = 1 }, + 'auto-select' => sub { $urpm->{options}{auto_select} = 1 }, + 'media|mediums=s' => sub { $urpm->{options}{media} = 1 }, + "help|h" => sub { gurpmi::usage() }, + 'root=s' => sub { set_root($urpm, $_[1]) }, + 'searchmedia|search-media=s' => sub { $urpm->{options}{searchmedia} = 1 }, + 'verify-rpm!' => sub { $urpm->{options}{'verify-rpm'} = $_[1] }, + }, + urpmi => { "version" => sub { require urpm; print "$tool $urpm::VERSION\n"; exit(0) }, "help|h" => sub { @@ -338,6 +348,9 @@ my %options_spec = ( ); +$options_spec{gurpmi2} = $options_spec{gurpmi}; + + # generate urpmf options callbacks sub add_urpmf_cmdline_tags { foreach my $k (@_) { |