summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2009-02-18 12:36:50 +0000
committerThierry Vignaud <tv@mandriva.org>2009-02-18 12:36:50 +0000
commita4fb3876f00e41603cbd5484b8445880086a19c4 (patch)
tree042bd516f78f4f52802cbc2e6fe725fd3db06c91
parent7def7797b44018aa6ac83334c67d775ff47238d8 (diff)
downloaddrakx-a4fb3876f00e41603cbd5484b8445880086a19c4.tar
drakx-a4fb3876f00e41603cbd5484b8445880086a19c4.tar.gz
drakx-a4fb3876f00e41603cbd5484b8445880086a19c4.tar.bz2
drakx-a4fb3876f00e41603cbd5484b8445880086a19c4.tar.xz
drakx-a4fb3876f00e41603cbd5484b8445880086a19c4.zip
follow urpmi pratice and use more similar data structure: there can
be only one key id per medium, so just store it instead of using a dummy hash table
-rw-r--r--perl-install/install/media.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/perl-install/install/media.pm b/perl-install/install/media.pm
index 08337f757..2b6a044f1 100644
--- a/perl-install/install/media.pm
+++ b/perl-install/install/media.pm
@@ -30,7 +30,7 @@ use urpm::download;
#- fakemedium ("$name ($rpmsdir)", used locally by urpmi)
#- rel_hdlist
#- hdlist_size
-#- key-ids (hashref, values are key ids)
+#- key-ids
#- name (text description)
#- pubkey (array containing all the keys to import)
#- phys_medium
@@ -929,7 +929,7 @@ sub install_urpmi {
my ($id, $imported) = @_;
if ($id) {
log::l(($imported ? "imported" : "found") . " key=$id for medium $medium->{name}");
- $medium->{'key-ids'}{$id} = undef;
+ $medium->{'key-ids'} = $id;
}
});
unlink $medium->{pubkey};
@@ -967,8 +967,8 @@ sub install_urpmi {
#- output new urpmi.cfg format here.
push @cfg, map { "$_\n" }
"$qname $qdir {",
- if_(keys(%{$medium->{'key-ids'}}),
- " key-ids: " . join(',', keys %{$medium->{'key-ids'}})),
+ if_($medium->{'key-ids'},
+ " key-ids: " . $medium->{'key-ids'}),
if_($removable_device,
" removable: $removable_device"),
if_($medium->{update},