summaryrefslogtreecommitdiffstats
path: root/urpmi.update
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2002-11-28 21:48:30 +0000
committerFrancois Pons <fpons@mandriva.com>2002-11-28 21:48:30 +0000
commit1867eece3140beb368fa945f69aa01bb3d93fbae (patch)
treeef62d20b164e8b56a474d5f12d78ae1c7db4795a /urpmi.update
parent4f55bbf9b56d7ae438345dc4ac1fbbf260fd4b91 (diff)
downloadurpmi-1867eece3140beb368fa945f69aa01bb3d93fbae.tar
urpmi-1867eece3140beb368fa945f69aa01bb3d93fbae.tar.gz
urpmi-1867eece3140beb368fa945f69aa01bb3d93fbae.tar.bz2
urpmi-1867eece3140beb368fa945f69aa01bb3d93fbae.tar.xz
urpmi-1867eece3140beb368fa945f69aa01bb3d93fbae.zip
4.1-3mdk
Diffstat (limited to 'urpmi.update')
-rwxr-xr-xurpmi.update18
1 files changed, 12 insertions, 6 deletions
diff --git a/urpmi.update b/urpmi.update
index 06373277..3325552f 100755
--- a/urpmi.update
+++ b/urpmi.update
@@ -35,11 +35,12 @@ sub main {
/^--?c/ and $options{noclean} = 0, next;
/^--?d/ and $options{depslist} = 1, next;
/^--?f/ and ++$options{force}, next;
- /^--wget/ and $urpm->{sync} = sub { my $options = shift @_;
- if (ref $options) { $options->{prefer} = 'wget' }
- else { $options = { dir => $options, prefer => 'wget' } }
- urpm::sync_webfetch($options, @_) }, next;
- /^--curl/ and $urpm->{sync} = \&urpm::sync_webfetch, next;
+ /^--update$/ and $options{update} = 1, next;
+ /^--wget$/ and $urpm->{sync} = sub { my $options = shift @_;
+ if (ref $options) { $options->{prefer} = 'wget' }
+ else { $options = { dir => $options, prefer => 'wget' } }
+ urpm::sync_webfetch($options, @_) }, next;
+ /^--curl$/ and $urpm->{sync} = \&urpm::sync_webfetch, next;
/^--proxy$/ and do {
my ($proxy, $port) = ($_ = shift @_) =~ m,^(?:http://)?([^:]+(:\d+)?)/*$, or
die _("bad proxy declaration on command line\n");
@@ -64,6 +65,7 @@ where <name> is a medium name to update.
to be 1080 by default (format is <proxyhost[:port]>).
") . _(" --proxy-user - specify user and password to use for proxy
authentication (format is <user:password>).
+") . _(" --update - update only update media.
") . _(" -a - select all non-removable media.
") . _(" -c - clean headers cache directory.
") . _(" -d - force complete computation of depslist.ordered file.
@@ -78,13 +80,17 @@ where <name> is a medium name to update.
if ($options{all}) {
@entries == 0 and die _("nothing to update (use urpmi.addmedia to add a media)\n");
} else {
- @toupdates == 0 and die _("the entry to update is missing\n(one of %s)\n", join(", ", @entries));
$urpm->select_media(@toupdates);
#- force ignored media to be returned alive.
+ my $something_todo = 0;
foreach (@{$urpm->{media}}) {
+ $options{update} && $_->{update} and $_->{modified} = 1;
$_->{modified} and delete $_->{ignore};
+ $_->{modified} and ++$something_todo;
}
+
+ $something_todo or die _("the entry to update is missing\n(one of %s)\n", join(", ", @entries));
}
$urpm->update_media(%options);