diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-04-14 13:44:25 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-04-14 13:44:25 +0000 |
commit | 135537b6b01675eff80176c6f5d546d20a598d06 (patch) | |
tree | 86db94c22e6d01a6172084322967d687f54ec3bc | |
parent | 823d906c0cd4470db45431f9fb4ba9e5071cab56 (diff) | |
download | urpmi-135537b6b01675eff80176c6f5d546d20a598d06.tar urpmi-135537b6b01675eff80176c6f5d546d20a598d06.tar.gz urpmi-135537b6b01675eff80176c6f5d546d20a598d06.tar.bz2 urpmi-135537b6b01675eff80176c6f5d546d20a598d06.tar.xz urpmi-135537b6b01675eff80176c6f5d546d20a598d06.zip |
Add a new option, --no-install, to urpmi, to only download rpms and
not install them (by Michael Scherer)
-rw-r--r-- | man/C/urpmi.8 | 3 | ||||
-rw-r--r-- | urpm/args.pm | 1 | ||||
-rwxr-xr-x | urpmi | 4 | ||||
-rw-r--r-- | urpmi.bash-completion | 2 |
4 files changed, 9 insertions, 1 deletions
diff --git a/man/C/urpmi.8 b/man/C/urpmi.8 index bfda8390..d6c52620 100644 --- a/man/C/urpmi.8 +++ b/man/C/urpmi.8 @@ -59,6 +59,9 @@ Install all required dependencies without asking. .IP "\fB\--auto-select\fP" Automatically select all packages that have to be upgraded, according to already installed packages and packages listed in various registered media. +.IP "\fB\--no-install\fP" +Only download packages, don't install them. You'll find them in +/var/cache/urpmi/rpms. .IP "\fB\--no-uninstall\fP" Never ask to uninstall a package but prefer aborting instead. This can be safer in auto mode. diff --git a/urpm/args.pm b/urpm/args.pm index 9cbc8073..042d27f9 100644 --- a/urpm/args.pm +++ b/urpm/args.pm @@ -61,6 +61,7 @@ my %options_spec = ( 'gui' => \$::gui, 'auto-select' => \$::auto_select, 'no-remove|no-uninstall' => \$::no_remove, + 'no-install' => \$::no_install, keep => sub { $urpm->{options}{keep} = 1 }, 'split-level=s' => sub { $urpm->{options}{'split-level'} = $_[1] }, 'split-length=s' => sub { $urpm->{options}{'split-length'} = $_[1] }, @@ -37,6 +37,7 @@ our $sortmedia = ''; our $synthesis = ''; our $allow_medium_change = 0; our $auto_select = 0; +our $no_install = 0; our $no_remove = 0; our $src = 0; our $install_src = 0; @@ -83,6 +84,7 @@ usage: ") . N(" --auto - automatically select a package in choices. ") . N(" --auto-select - automatically select packages to upgrade the system. ") . N(" --no-uninstall - never ask to uninstall a package, abort the installation. +") . N(" --no-install - don't install packages (only download) ") . N(" --keep - keep existing packages if possible, reject requested packages that lead to removals. ") . N(" --split-level - split in small transaction if more than given packages @@ -580,6 +582,8 @@ foreach my $set (@{$state->{transaction} || []}) { next; } + next if $no_install; + #- clean to remove any src package now. foreach (\%transaction_sources_install, \%transaction_sources) { foreach my $id (keys %$_) { diff --git a/urpmi.bash-completion b/urpmi.bash-completion index ab282982..6f9fa906 100644 --- a/urpmi.bash-completion +++ b/urpmi.bash-completion @@ -90,7 +90,7 @@ _urpmi() --split-length --fuzzy --src --install-src --clean \ --noclean --force --allow-nodeps --allow-force --parallel \ --wget --curl --limit-rate --proxy --proxy-user --bug \ - --env --verify-rpm --no-verify-rpm \ + --env --verify-rpm --no-verify-rpm --no-install \ --test --excludepath --excludedocs --root --norebuild \ --searchmedia' -- $cur ) ) else |