summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2001-11-28 10:16:10 +0000
committerFrancois Pons <fpons@mandriva.com>2001-11-28 10:16:10 +0000
commitc24edadb524096a9fd8dc36697a0d9b4795d4ad6 (patch)
tree5101484f89afd5f5c741d058fc47068539260540 /urpm.pm
parent8923ae296271934e0e9f486877efde3f6e090d24 (diff)
downloadurpmi-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.pm16
1 files changed, 10 insertions, 6 deletions
diff --git a/urpm.pm b/urpm.pm
index cf692c93..c3558311 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -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;