summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2006-03-03 15:12:59 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2006-03-03 15:12:59 +0000
commitf51b03cc11847b03d052c6eff44e1e1e5fb63328 (patch)
treea56301a1af40c35879625f8055974193deeae7a0 /urpm.pm
parentea49249133fb35ebfefb34486ed3f056beaa4b40 (diff)
downloadurpmi-f51b03cc11847b03d052c6eff44e1e1e5fb63328.tar
urpmi-f51b03cc11847b03d052c6eff44e1e1e5fb63328.tar.gz
urpmi-f51b03cc11847b03d052c6eff44e1e1e5fb63328.tar.bz2
urpmi-f51b03cc11847b03d052c6eff44e1e1e5fb63328.tar.xz
urpmi-f51b03cc11847b03d052c6eff44e1e1e5fb63328.zip
Use the new versions of verify_rpm and verify_signature from URPM, adapted to rpm 4.4.x
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm8
1 files changed, 5 insertions, 3 deletions
diff --git a/urpm.pm b/urpm.pm
index 9bc58521..c2b14dca 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -2722,7 +2722,7 @@ sub copy_packages_of_removable_media {
#- transfer it to the rpms cache.
unlink "$urpm->{cachedir}/partial/$filename";
if (urpm::util::copy($filepath, "$urpm->{cachedir}/partial") &&
- URPM::verify_rpm("$urpm->{cachedir}/partial/$filename", nosignatures => 1) !~ /NOT OK/)
+ URPM::verify_rpm("$urpm->{cachedir}/partial/$filename", nosignatures => 1))
{
#- now we can consider the file to be fine.
unlink "$urpm->{cachedir}/rpms/$filename";
@@ -2839,7 +2839,8 @@ sub download_packages_of_distant_media {
foreach my $i (keys %distant_sources) {
my ($filename) = $distant_sources{$i} =~ m|/([^/]*\.rpm)$|;
if ($filename && -s "$urpm->{cachedir}/partial/$filename" &&
- URPM::verify_rpm("$urpm->{cachedir}/partial/$filename", nosignatures => 1) !~ /NOT OK/) {
+ URPM::verify_rpm("$urpm->{cachedir}/partial/$filename", nosignatures => 1))
+ {
#- it seems the the file has been downloaded correctly and has been checked to be valid.
unlink "$urpm->{cachedir}/rpms/$filename";
urpm::util::move("$urpm->{cachedir}/partial/$filename", "$urpm->{cachedir}/rpms/$filename");
@@ -3287,9 +3288,10 @@ sub check_sources_signatures {
foreach my $id (keys %$sources_install, -1, keys %$sources) {
if ($id == -1) { $s = $sources; next }
my $filepath = $s->{$id};
- my $verif = URPM::verify_rpm($filepath);
+ my $verif = URPM::verify_signature($filepath);
if ($verif =~ /NOT OK/) {
+ $verif =~ s/\n//g;
$invalid_sources{$filepath} = N("Invalid signature (%s)", $verif);
} else {
unless ($medium &&