diff options
-rw-r--r-- | urpm.pm | 16 | ||||
-rw-r--r-- | urpmi.spec | 13 | ||||
-rwxr-xr-x | urpmq | 15 |
3 files changed, 29 insertions, 15 deletions
@@ -1115,11 +1115,15 @@ sub search_packages { foreach (@$_) { if ($best) { my $cmp_version = ($_->{info}{serial} == $best->{info}{serial} && - rpmtools::version_compare($_->{info}{version}, $best->{info}{version})); - my $cmp_release = $cmp_version == 0 && rpmtools::version_compare($_->{info}{release}, - $best->{info}{release}); - if ($_->{info}{serial} > $best->{info}{serial} || $cmp_version > 0 || $cmp_release > 0 || - ($_->{info}{serial} == $best->{info}{serial} && $cmp_version == 0 && $cmp_release == 0 && + rpmtools::version_compare($_->{info}{version}, + $best->{info}{version})); + my $cmp_release = ($cmp_version == 0 && + rpmtools::version_compare($_->{info}{release}, + $best->{info}{release})); + if ($_->{info}{serial} > $best->{info}{serial} || + $cmp_version > 0 || $cmp_release > 0 || + ($_->{info}{serial} == $best->{info}{serial} && + $cmp_version == 0 && $cmp_release == 0 && rpmtools::better_arch($_->{info}{arch}, $best->{info}{arch}))) { $best = $_; } @@ -1669,7 +1673,7 @@ sub upload_source_packages { } } } - eval { $urpm->{sync}("$urpm->{cachedir}/rpms", @distant_sources) }; + @distant_sources and eval { $urpm->{sync}("$urpm->{cachedir}/rpms", @distant_sources) }; #- return the hash of rpm file that have to be installed, they are all local now. %$local_sources, %sources; @@ -2,7 +2,7 @@ Name: urpmi Version: 2.1 -Release: 3mdk +Release: 4mdk License: GPL Source0: %{name}.tar.bz2 Source1: %{name}.logrotate @@ -46,6 +46,8 @@ do done install -m 644 autoirpm.deny $RPM_BUILD_ROOT/etc/urpmi cat <<EOF >$RPM_BUILD_ROOT/etc/urpmi/inst.list +# Here you can specify packages that need to be installed instead +# of being upgraded (typically kernel packages). kernel kernel-smp kernel-secure @@ -85,7 +87,8 @@ exit 0 [ -z "$DURING_INSTALL" -a -f /var/lib/urpmi/depslist ] && %{_sbindir}/urpmi.update -a rm -f /var/lib/urpmi/depslist -%preun -n autoirpm -p %{_sbindir}/autoirpm.uninstall +%preun -n autoirpm +[ -x %{_sbindir}/autoirpm.uninstall ] && %{_sbindir}/autoirpm.uninstall %files -f %{name}.lang %defattr(-,root,root) @@ -126,6 +129,12 @@ rm -f /var/lib/urpmi/depslist %changelog +* Wed Nov 28 2001 François Pons <fpons@mandrakesoft.com> 2.1-4mdk +- fixed incovation of sync method even when no files to sync. +- fixed urpmq option management (-m|-M equ -du but necessary by default). +- fixed %%preun of autoirpm to check previous installation. +- added small doc in /etc/urpmi/inst.list file. + * Tue Nov 27 2001 François Pons <fpons@mandrakesoft.com> 2.1-3mdk - added curl support (kept wget support). - updated help for urpmi, urpmi.update and urpmi.addmedia. @@ -50,8 +50,7 @@ usage: ") . _(" --headers - extract headers for package listed from urpmi db to stdout (root only). ") . _(" --sources - give all source packages before downloading (root only). -") . _(" --force - force invocation even if some packages do not -exist. +") . _(" --force - force invocation even if some packages do not exist. ") . "\n" . _(" names or rpm files given on command line are queried. ", $urpm::VERSION); exit(0); @@ -70,8 +69,8 @@ for (@ARGV) { /[\?h]/ and do { usage; next }; /d/ and do { $query->{deps} = 1; next }; /u/ and do { $query->{upgrade} = 1; next }; - /m/ and do { next }; - /M/ and do { next }; + /m/ and do { $query->{deps} = $query->{upgrade} = 1; next }; + /M/ and do { $query->{deps} = $query->{upgrade} = 1; next }; /c/ and do { $query->{complete} = 1; next }; /g/ and do { $query->{group} = 1; next }; /p/ and do { $query->{use_provides} = 1; next }; @@ -116,7 +115,9 @@ $urpm->relocate_depslist_provides(use_active => $query->{update}); #- basesystem is added to the list so if it need to be upgraded, all its dependency #- will be updated too. my %packages; -$urpm->search_packages(\%packages, [ @names ], use_provides => $query->{use_provides}, use_active => $query->{update}) +$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. @@ -134,8 +135,8 @@ if ($query->{auto_select}) { #- filter to add in packages selected required packages. $query->{use_provides} || @files or $urpm->read_provides; $query->{update} || $query->{auto_select} or $urpm->read_config(nocheck_access => 1); -$urpm->filter_minimal_packages_to_upgrade(\%packages, undef, - keep_alldeps => $query->{deps} && !$query->{upgrade}); +$query->{deps} and $urpm->filter_minimal_packages_to_upgrade(\%packages, undef, + keep_alldeps => !$query->{upgrade}); #- get out of package that should not be upgraded. $urpm->deselect_unwanted_packages(\%packages); |