summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/install/NEWS1
-rw-r--r--perl-install/install/media.pm11
2 files changed, 5 insertions, 7 deletions
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS
index 28af4cdf3..d0672d97d 100644
--- a/perl-install/install/NEWS
+++ b/perl-install/install/NEWS
@@ -1,3 +1,4 @@
+- adapt to perl-URPM 3.00 API to parse pubkey files
- adjust Uzbek locale (cf locales-uz change)
- sort languages in "choose language" step in text mode
- diskdrake:
diff --git a/perl-install/install/media.pm b/perl-install/install/media.pm
index 3814f34a5..512d18e26 100644
--- a/perl-install/install/media.pm
+++ b/perl-install/install/media.pm
@@ -721,11 +721,9 @@ sub get_medium {
if (!$m->{pubkey}) {
my $rel_pubkey = $m->{rel_hdlist};
$rel_pubkey =~ s!/hdlist(.*)\.cz!/pubkey$1! or internal_error("bad {rel_hdlist} $m->{rel_hdlist}");
- if (my $pubkey = getFile_($phys_m, $rel_pubkey)) {
- $m->{pubkey} = [ $packages->parse_armored_file($pubkey) ];
- }
+ $m->{pubkey} = urpmidir() . "/pubkey_$m->{fakemedium}";
+ getAndSaveFile_($phys_m, $rel_pubkey, $m->{pubkey});
}
- $m->{pubkey} ||= [];
#- for standalone medium not using media.cfg
$phys_m->{name} ||= $m->{name};
@@ -931,10 +929,9 @@ sub install_urpmi {
#- import pubkey in rpmdb.
my $db = install::pkgs::open_rpm_db_rw();
- $packages->parse_pubkeys(db => $db);
foreach my $medium (@media) {
- $packages->import_needed_pubkeys($medium->{pubkey}, db => $db, callback => sub {
- my (undef, undef, $_k, $id, $imported) = @_;
+ URPM::import_needed_pubkeys_from_file($db, $medium->{pubkey}, sub {
+ my ($id, $imported) = @_;
if ($id) {
log::l(($imported ? "imported" : "found") . " key=$id for medium $medium->{name}");
$medium->{key_ids}{$id} = undef;