diff options
author | Thierry Vignaud <tv@mandriva.org> | 2008-03-04 19:32:40 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2008-03-04 19:32:40 +0000 |
commit | 01316da030388b0996cc52af0bcf6a44552e6f26 (patch) | |
tree | fd78c6da6a14a2ac9ec50e1881cc3551559430ba | |
parent | 9c33802a2aa43f202f74449aedca495afe60c3b2 (diff) | |
download | urpmi-01316da030388b0996cc52af0bcf6a44552e6f26.tar urpmi-01316da030388b0996cc52af0bcf6a44552e6f26.tar.gz urpmi-01316da030388b0996cc52af0bcf6a44552e6f26.tar.bz2 urpmi-01316da030388b0996cc52af0bcf6a44552e6f26.tar.xz urpmi-01316da030388b0996cc52af0bcf6a44552e6f26.zip |
(resolve_dependencies) add 'upgrade_callback' and
'resolve_req_callback' callbacks so that rpmdrake can reuse more urpmi
code
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | urpm/select.pm | 6 |
2 files changed, 6 insertions, 1 deletions
@@ -1,5 +1,6 @@ - add infrastructure so that gurpmi & rpmdrake can handle priority upgrade list +- add callbacks so that urpmi can reuse more urpmi code - gurpmi: o handle priority upgrade list - urpmi: diff --git a/urpm/select.pm b/urpm/select.pm index 291180af..16e46af6 100644 --- a/urpm/select.pm +++ b/urpm/select.pm @@ -228,6 +228,8 @@ sub _search_packages { #- auto_select #- install_src #- priority_upgrade +#- upgrade_callback +#- resolve_req_callback #- %options passed to ->resolve_requested: #- callback_choices #- keep @@ -261,6 +263,7 @@ sub resolve_dependencies { $urpm->request_packages_to_upgrade($db, $state, $requested, requested => undef, $urpm->{searchmedia} ? (idlist => searchmedia_idlist($urpm)) : (), ); + $options{upgrade_callback} and $options{upgrade_callback}->(); } my @priority_upgrade; @@ -294,7 +297,8 @@ sub resolve_dependencies { } if (!$need_restart) { - $urpm->resolve_requested($db, $state, $requested, %options); + my @requested = $urpm->resolve_requested($db, $state, $requested, %options); + $options{resolve_req_callback} and $options{resolve_req_callback}->(@requested); #- now check if a priority_upgrade package has been required #- by a requested package |