diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2007-12-12 11:17:16 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2007-12-12 11:17:16 +0000 |
commit | df23d1acfe8752f339f9f69d212cfa240f578796 (patch) | |
tree | 104a01fc795255b3434f1adb915aa621f116d612 /urpm.pm | |
parent | 15c0d5414fbeb5b6e2fa65e30cbe99e33b00df20 (diff) | |
download | urpmi-df23d1acfe8752f339f9f69d212cfa240f578796.tar urpmi-df23d1acfe8752f339f9f69d212cfa240f578796.tar.gz urpmi-df23d1acfe8752f339f9f69d212cfa240f578796.tar.bz2 urpmi-df23d1acfe8752f339f9f69d212cfa240f578796.tar.xz urpmi-df23d1acfe8752f339f9f69d212cfa240f578796.zip |
create urpm->new_parse_cmdline and use it
(it may be a little stricter for urpmi since we exit(1) on parse_cmdline error)
Diffstat (limited to 'urpm.pm')
-rw-r--r-- | urpm.pm | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -61,6 +61,13 @@ sub new { $self; } +sub new_parse_cmdline { + my ($class) = @_; + my $urpm = $class->new; + urpm::args::parse_cmdline(urpm => $urpm); + $urpm; +} + sub prefer_rooted { my ($root, $file) = @_; -e "$root$file" ? "$root$file" : $file; |