From 709f56043b97de033cbb83f21ef27e64d91a480b Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 20 Oct 2008 08:54:30 +0000 Subject: - urpmi.update o fix --force-key (#45094) nb: 2 cases must be handled. When the medium is updated, we just need to ensure urpmi.cfg is written. But when it's not updated, we must do a special case --- urpm/media.pm | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'urpm/media.pm') diff --git a/urpm/media.pm b/urpm/media.pm index 2c12ca84..3a21a0aa 100644 --- a/urpm/media.pm +++ b/urpm/media.pm @@ -1513,6 +1513,7 @@ sub _get_pubkey { ($local ? \&_get_pubkey__local : \&_download_pubkey)->($urpm, $medium); $medium->{'key-ids'} =_read_cachedir_pubkey($urpm, $medium, $b_wait_lock); + $urpm->{modified} = 1; } sub _get_pubkey_and_descriptions { @@ -1577,6 +1578,10 @@ sub _update_medium_ { if ($options{forcekey}) { delete $medium->{'key-ids'}; + if ($rc eq 'unmodified') { + _get_pubkey($urpm, $medium); # we must do it now, quite hackish... + return 1; + } } if (!$rc || $rc eq 'unmodified') { -- cgit v1.2.1