summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-12-11 11:24:20 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-12-11 11:24:20 +0000
commit14f4760940036f8d43cfe615252c9bfa902fd991 (patch)
treef862fde0afb1e99f8e8a3c4e81aaa9b22c568f2c
parent173684275950dee61237624b1cf9fc637f47c07c (diff)
downloaddrakx-14f4760940036f8d43cfe615252c9bfa902fd991.tar
drakx-14f4760940036f8d43cfe615252c9bfa902fd991.tar.gz
drakx-14f4760940036f8d43cfe615252c9bfa902fd991.tar.bz2
drakx-14f4760940036f8d43cfe615252c9bfa902fd991.tar.xz
drakx-14f4760940036f8d43cfe615252c9bfa902fd991.zip
- adapt to perl-URPM 3.00 API to parse pubkey files
-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;