diff options
author | Francois Pons <fpons@mandriva.com> | 2001-11-21 15:33:18 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2001-11-21 15:33:18 +0000 |
commit | df1bbab41f0bd42e82b3670b9d2e9a15ee4139f3 (patch) | |
tree | bdb25d7436cab31cd5735fce194b747002d7d9b1 | |
parent | f855ead59ddb8728b9af87a6a7f400871b70d224 (diff) | |
download | urpmi-df1bbab41f0bd42e82b3670b9d2e9a15ee4139f3.tar urpmi-df1bbab41f0bd42e82b3670b9d2e9a15ee4139f3.tar.gz urpmi-df1bbab41f0bd42e82b3670b9d2e9a15ee4139f3.tar.bz2 urpmi-df1bbab41f0bd42e82b3670b9d2e9a15ee4139f3.tar.xz urpmi-df1bbab41f0bd42e82b3670b9d2e9a15ee4139f3.zip |
small fixes.
-rwxr-xr-x | urpmi | 15 | ||||
-rw-r--r-- | urpmi.spec | 7 | ||||
-rwxr-xr-x | urpmq | 3 |
3 files changed, 19 insertions, 6 deletions
@@ -210,6 +210,7 @@ my $ask_choice = sub { if ($auto_select) { my (%to_remove, %keep_files); + $update or $urpm->read_config; $urpm->select_packages_to_upgrade('', \%packages, \%to_remove, \%keep_files); if (keys(%to_remove) > 0) { @@ -219,7 +220,7 @@ if ($auto_select) { if ($minimal) { $use_provides || @files or $urpm->read_provides; - $update or $urpm->read_config; + $update || $auto_select or $urpm->read_config; $urpm->filter_minimal_packages_to_upgrade(\%packages, $ask_choice); } else { $urpm->filter_packages_to_upgrade(\%packages, $ask_choice, complete => $complete); @@ -292,8 +293,14 @@ my %sources = $urpm->upload_source_packages($local_sources, $list, ($X ? '' : 'f my @rpms_install = grep { $_ !~ /\.src.\.rpm/ } values %{$urpm->extract_packages_to_install(\%sources) || {}}; my @rpms_upgrade = grep { $_ !~ /\.src.\.rpm/ } values %sources; if (@rpms_install || @rpms_upgrade) { - printf SAVEOUT _("installing %s\n", join(' ', @l)); + printf SAVEOUT _("installing %s\n", join(' ', @rpms_install, @rpms_upgrade)); log_it(scalar localtime, " @_\n"); + #- check for local files. + foreach (@rpms_install, @rpms_upgrade) { + m|^/| && ! -e $_ or next; + message(_("Installation failed, some files are missing.\nYou may want to update your urpmi database")); + exit 2; + } $urpm->{log}("starting installing packages"); if ($X) { system("grpmi", $WID ? ("--WID=$WID") : (), map { ("-noupgrade", $_) } @rpms_install, @rpms_upgrade); @@ -307,7 +314,7 @@ if (@rpms_install || @rpms_upgrade) { if (@$_) { message(_("Installation failed")); - m|^/| && !-e $_ and exit 2 foreach @l; #- missing local file + m|^/| && !-e $_ and exit 2 foreach @rpms_install; #- missing local file $noexpr = _("Nn"); $yesexpr = _("Yy"); @@ -331,7 +338,7 @@ if (@rpms_install || @rpms_upgrade) { if ($?) { message(_("Installation failed")); - m|^/| && !-e $_ and exit 2 foreach @l; #- missing local file + m|^/| && !-e $_ and exit 2 foreach @rpms_upgrade; #- missing local file $noexpr = _("Nn"); $yesexpr = _("Yy"); @@ -2,7 +2,7 @@ Name: urpmi Version: 2.0 -Release: 6mdk +Release: 7mdk License: GPL Source0: %{name}.tar.bz2 Source1: %{name}.logrotate @@ -126,6 +126,11 @@ rm -f /var/lib/urpmi/depslist %changelog +* Wed Nov 21 2001 François Pons <fpons@mandrakesoft.com> 2.0-7mdk +- fixed missing urpmi configuration file not read. +- fixed bad output of rpm files to be installed or upgraded. +- fixed bad check of missing rpm files. + * Mon Nov 19 2001 François Pons <fpons@mandrakesoft.com> 2.0-6mdk - fixed --auto-select and rpm file upload. @@ -124,6 +124,7 @@ $urpm->search_packages(\%packages, [ @names ], use_provides => $query->{use_prov if ($query->{auto_select}) { my (%to_remove, %keep_files); + $query->{update} or $urpm->read_config(nocheck_access => 1); $urpm->select_packages_to_upgrade('', \%packages, \%to_remove, \%keep_files); if (keys(%to_remove) > 0) { @@ -134,7 +135,7 @@ if ($query->{auto_select}) { #- filter to add in packages selected required packages. if ($query->{minimal}) { $query->{use_provides} || @files or $urpm->read_provides; - $query->{update} or $urpm->read_config(nocheck_access => 1); + $query->{update} || $query->{auto_select} 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); |