Skip to content

Commit ef6b6cd

Browse files
author
Gabriel Filion
committed
Hide packages if phasing is being applied (#220)
Ubuntu uses a progress upgrade throughout hosts called phasing upgrades. If a package needs to be upgraded but is marked as being delayed because of phasing, it shouldn't be listed as the packages needing upgrades since it's already being taken care of. Signed-off-by: Gabriel Filion <[email protected]>
1 parent b36a2ea commit ef6b6cd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: apt_info.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def _convert_candidates_to_upgrade_infos(candidates):
5555

5656
def _write_pending_upgrades(registry, cache):
5757
candidates = {
58-
p.candidate for p in cache if p.is_upgradable
58+
p.candidate for p in cache if p.is_upgradable and not p.phasing_applied
5959
}
6060
upgrade_list = _convert_candidates_to_upgrade_infos(candidates)
6161

@@ -69,7 +69,7 @@ def _write_pending_upgrades(registry, cache):
6969
def _write_held_upgrades(registry, cache):
7070
held_candidates = {
7171
p.candidate for p in cache
72-
if p.is_upgradable and p._pkg.selected_state == apt_pkg.SELSTATE_HOLD
72+
if p.is_upgradable and p._pkg.selected_state == apt_pkg.SELSTATE_HOLD and not p.phasing_applied
7373
}
7474
upgrade_list = _convert_candidates_to_upgrade_infos(held_candidates)
7575

0 commit comments

Comments
 (0)