summaryrefslogtreecommitdiffstats
path: root/urpmq
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2001-06-28 15:43:36 +0000
committerFrancois Pons <fpons@mandriva.com>2001-06-28 15:43:36 +0000
commit83fc051839272a44d81337b5944467d765e428a2 (patch)
treef0aa07300de06346575c60033f2f2411e41cf2a2 /urpmq
parenta9e532cd4c8f29cf2a12e2caa64ee543ecb706ca (diff)
downloadurpmi-83fc051839272a44d81337b5944467d765e428a2.tar
urpmi-83fc051839272a44d81337b5944467d765e428a2.tar.gz
urpmi-83fc051839272a44d81337b5944467d765e428a2.tar.bz2
urpmi-83fc051839272a44d81337b5944467d765e428a2.tar.xz
urpmi-83fc051839272a44d81337b5944467d765e428a2.zip
update flag and -M fixes with serial.
Diffstat (limited to 'urpmq')
-rwxr-xr-xurpmq13
1 files changed, 10 insertions, 3 deletions
diff --git a/urpmq b/urpmq
index ef79be91..ccfc5a8d 100755
--- a/urpmq
+++ b/urpmq
@@ -50,6 +50,7 @@ usage:
-g - print groups too with name.
-r - print version and release too with name.
+ --update - use only update media.
--auto-select - automatically select packages for upgrading the system.
--headers - extract headers for package listed from urpmi db to
stdout (root only).
@@ -65,6 +66,7 @@ usage:
my @nextargv;
for (@ARGV) {
/^--help$/ and do { usage; next };
+ /^--update$/ and do { $query->{update} = 1; next };
/^--auto-select$/ and do { $query->{auto_select} = 1; next };
/^--headers$/ and do { $query->{headers} = 1; next };
/^--sources$/ and do { $query->{sources} = 1; next };
@@ -107,13 +109,18 @@ if (@files) {
}
#- reparse whole internal depslist to match against newer packages only.
-$urpm->relocate_depslist();
+if ($query->{update}) {
+ $urpm->read_config(nocheck_access => 1);
+ $urpm->filter_active_media(use_update => 1);
+}
+$urpm->relocate_depslist(use_active => $query->{update});
#- search the packages according the selection given by the user,
#- basesystem is added to the list so if it need to be upgraded, all its dependancy
#- will be updated too.
my %packages;
-$urpm->search_packages(\%packages, [ @names ], use_provides => $query->{use_provides}) or $query->{force} or exit 1;
+$urpm->search_packages(\%packages, [ @names ], use_provides => $query->{use_provides}, use_active => $query->{update})
+ or $query->{force} or exit 1;
#- auto select package for upgrading the distribution.
if ($query->{auto_select}) {
@@ -129,7 +136,7 @@ if ($query->{auto_select}) {
#- filter to add in packages selected required packages.
if ($query->{minimal}) {
$urpm->read_provides;
- $urpm->read_config(nocheck_access => 1);
+ $query->{update} or $urpm->read_config(nocheck_access => 1);
$urpm->filter_minimal_packages_to_upgrade(\%packages, undef);
} else {
$query->{deps} && !$query->{upgrade} and $urpm->compute_closure(\%packages);