diff options
author | Francois Pons <fpons@mandriva.com> | 2001-11-28 10:16:10 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2001-11-28 10:16:10 +0000 |
commit | c24edadb524096a9fd8dc36697a0d9b4795d4ad6 (patch) | |
tree | 5101484f89afd5f5c741d058fc47068539260540 /urpm.pm | |
parent | 8923ae296271934e0e9f486877efde3f6e090d24 (diff) | |
download | urpmi-c24edadb524096a9fd8dc36697a0d9b4795d4ad6.tar urpmi-c24edadb524096a9fd8dc36697a0d9b4795d4ad6.tar.gz urpmi-c24edadb524096a9fd8dc36697a0d9b4795d4ad6.tar.bz2 urpmi-c24edadb524096a9fd8dc36697a0d9b4795d4ad6.tar.xz urpmi-c24edadb524096a9fd8dc36697a0d9b4795d4ad6.zip |
small fixes and typo fixes back.
Diffstat (limited to 'urpm.pm')
-rw-r--r-- | urpm.pm | 16 |
1 files changed, 10 insertions, 6 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; |