diff options
-rw-r--r-- | NEWS | 1 | ||||
-rwxr-xr-x | mdkapplet | 15 |
2 files changed, 13 insertions, 3 deletions
@@ -1,2 +1,3 @@ - mdkapplet: o make sure notifications' text doesn't got truncated + o use more modern API to check for updates @@ -366,9 +366,18 @@ sub silentCheck() { if (my $db = urpm::db_open_or_die($urpm)) { my $requested = {}; my $state = {}; - $urpm->request_packages_to_upgrade($db, $state, $requested); - my @requested_strict = $urpm->resolve_requested($db, $state, $requested, callback_choices => sub { 0 }); - if (@requested_strict) { # FIXME: log first found pkgs? + my @requested_strict; + my $need_restart = urpm::select::resolve_dependencies( + $urpm, $state, $requested, + callback_choices => sub { 0 }, + priority_upgrade => $urpm->{options}{'priority-upgrade'}, + auto_select => 1, + resolve_req_callback => sub { + @requested_strict = sort map { scalar $_->fullname } @_; + }, + ); + + if ($need_restart || @requested_strict) { # FIXME: log first found pkgs? $exit->('updates'); } else { $exit->('uptodate'); |