diff options
-rw-r--r-- | urpm.pm | 12 | ||||
-rwxr-xr-x | urpmi | 17 | ||||
-rw-r--r-- | urpmi.spec | 7 | ||||
-rwxr-xr-x | urpmq | 15 |
4 files changed, 35 insertions, 16 deletions
@@ -20,7 +20,7 @@ urpm - Mandrake perl tools to handle urpmi database =head1 DESCRIPTION -C<urpm> is used by urpmi executable to manipulate packages and mediums +C<urpm> is used by urpmi executable to manipulate packages and media on a Linux-Mandrake distribution. =head1 SEE ALSO @@ -1499,7 +1499,7 @@ sub filter_packages_to_upgrade { }); unless (exists $provides{$n}) { foreach my $fullname (keys %{$urpm->{params}{provides}{$n} || {}}) { - exists $conflicts{$_}{$fullname} and next; + exists $conflicts{$fullname} and next; my $p = $urpm->{params}{info}{$fullname}; $o and $n eq $p->{name} || next; $v and eval(rpmtools::version_compare($p->{version}, $v) . $o . 0) || next; @@ -1555,7 +1555,7 @@ sub filter_packages_to_upgrade { $v and eval(rpmtools::version_compare($_[0]{version}, $v) . $o . 0) || return; $r && rpmtools::version_compare($_[0]{version}, $v) == 0 and eval(rpmtools::version_compare($_[0]{release}, $r) . $o . 0) || return; - $conflicts{$n}{"$_[0]{name}-$_[0]{version}-$_[0]{release}"} = 1; + $conflicts{"$_[0]{name}-$_[0]{version}-$_[0]{release}"} = 1; $provides{$n} ||= undef; }; rpmtools::db_traverse_tag($db, $n =~ m|^/| ? 'path' : 'whatprovides', [ $n ], @@ -1566,7 +1566,7 @@ sub filter_packages_to_upgrade { $v and eval(rpmtools::version_compare($pkg->{version}, $v) . $o . 0) || next; $r && rpmtools::version_compare($pkg->{version}, $v) == 0 and eval(rpmtools::version_compare($pkg->{release}, $r) . $o . 0) || next; - $conflicts{$n}{"$pkg->{name}-$pkg->{version}-$pkg->{release}"} ||= 0; + $conflicts{"$pkg->{name}-$pkg->{version}-$pkg->{release}"} ||= 0; } } } @@ -1579,7 +1579,7 @@ sub filter_packages_to_upgrade { my (%pre_choices, @pre_choices, @choices, @upgradable_choices, %choices_id); foreach my $fullname (keys %{$urpm->{params}{provides}{$_} || {}}) { - exists $conflicts{$_}{$fullname} and next; + exists $conflicts{$fullname} and next; my $pkg = $urpm->{params}{info}{$fullname}; push @{$pre_choices{$pkg->{name}}}, $pkg; } @@ -1954,7 +1954,7 @@ sub select_packages_to_upgrade { #- the hdlist does not exists and the medium is marked as using a #- synthesis file). my $p = $urpm->{params}{info}{$name} || $urpm->{params}{names}{$name}; - if ($pid == 1 || $p && $p->{$tag}) { + if ($pid == 1 || $p && @{$p->{$tag} || []}) { foreach (@{$p->{$tag} || []}) { $code->($_); } @@ -24,7 +24,7 @@ import urpm _; #- default options. my $update = 0; -my $mediums = 0; +my $media = 0; my $auto = 0; my $allow_medium_change = 0; my $complete = 0; @@ -54,7 +54,7 @@ This is free software and may be redistributed under the terms of the GNU GPL. usage: ") . _(" --help - print this help message. ") . _(" --update - use only update media. -") . _(" --mediums - use only the medium listed by comma. +") . _(" --media - use only the media listed by comma. ") . _(" --auto - automatically select a good package in choices. ") . _(" --auto-select - automatically select packages for upgrading the system. ") . _(" --complete - use parsehdlist server to complete selection. @@ -78,7 +78,8 @@ my @nextargv; for (@ARGV) { /^--help$/ and do { usage; next }; /^--update$/ and do { $update = 1; next }; - /^--mediums$/ and do { push @nextargv, \$mediums; next }; + /^--media$/ and do { push @nextargv, \$media; next }; + /^--mediums$/ and do { push @nextargv, \$media; next }; /^--auto$/ and do { $auto = 1; next }; /^--allow-medium-change$/ and do { $allow_medium_change = 1; next }; /^--auto-select$/ and do { $auto_select = 1; next }; @@ -152,8 +153,14 @@ $sync and $urpm->{sync} = $sync; $verbose or $urpm->{log} = sub {}; $urpm->read_config; -$mediums and $urpm->select_media(split ',', $mediums); -foreach (grep { !$_->{ignore} && (!$update || $_->{update}) && (!$mediums || $_->{modified}) } @{$urpm->{media} || []}) { +if ($media) { + $urpm->select_media(split ',', $media); + foreach (grep { !$_->{modified} } @{$urpm->{media} || []}) { + #- this is only a local ignore that will not be saved. + $_->{ignore} = 1; + } +} +foreach (grep { !$_->{ignore} && (!$update || $_->{update}) } @{$urpm->{media} || []}) { $urpm->parse_synthesis($_); } @@ -2,7 +2,7 @@ Name: urpmi Version: 3.2 -Release: 2mdk +Release: 3mdk License: GPL Source0: %{name}.tar.bz2 Source1: %{name}.logrotate @@ -144,6 +144,11 @@ fi %changelog +* Wed Jan 23 2002 François Pons <fpons@mandrakesoft.com> 3.2-3mdk +- fixed possible conflicts management error. +- fixed --mediums for upload of same package in different media. +- changed --mediums to --media but kept --mediums. + * Thu Jan 17 2002 François Pons <fpons@mandrakesoft.com> 3.2-2mdk - added urpm.3 man pages. - improved urpmi.removemedia (help, added -c flag, noclean headers). @@ -46,7 +46,7 @@ usage: ") . _(" -r - print version and release too with name. ") . _(" -f - print version, release and arch with name. ") . "\n" . _(" --update - use only update media. -") . _(" --mediums - use only the medium listed by comma. +") . _(" --media - use only the media listed by comma. ") . _(" --auto-select - automatically select packages for upgrading the system. ") . _(" --headers - extract headers for package listed from urpmi db to stdout (root only). @@ -62,7 +62,8 @@ my @nextargv; for (@ARGV) { /^--help$/ and do { usage; next }; /^--update$/ and do { $query->{update} = 1; next }; - /^--mediums$/ and do { push @nextargv, \$query->{mediums}; next }; + /^--media$/ and do { push @nextargv, \$query->{media}; next }; + /^--mediums$/ and do { push @nextargv, \$query->{media}; next }; /^--auto-select$/ and do { $query->{auto_select} = 1; next }; /^--headers$/ and do { $query->{headers} = 1; next }; /^--sources$/ and do { $query->{sources} = 1; next }; @@ -94,8 +95,14 @@ my $urpm = new urpm; $query->{verbose} or $urpm->{log} = sub {}; $urpm->read_config(nocheck_access => 1); -$query->{mediums} and $urpm->select_media(split ',', $query->{mediums}); -foreach (grep { !$_->{ignore} && (!$query->{update} || $_->{update}) && (!$query->{mediums} || $_->{modified}) } @{$urpm->{media} || []}) { +if ($query->{media}) { + $urpm->select_media(split ',', $query->{media}); + foreach (grep { !$_->{modified} } @{$urpm->{media} || []}) { + #- this is only a local ignore that will not be saved. + $_->{ignore} = 1; + } +} +foreach (grep { !$_->{ignore} && (!$query->{update} || $_->{update}) } @{$urpm->{media} || []}) { $urpm->parse_synthesis($_); } |