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 --- NEWS | 2 ++ urpm/media.pm | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/NEWS b/NEWS index ecef10e5..6713d6e1 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,8 @@ - gurpmi o display the download errors o log all urpmi logs +- urpmi.update + o fix --force-key (#45094) - urpmi.addmedia o do not allow "/" in media name (#44765) 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