diff options
author | Daniel Burrows <dburrows@debian.org> | 2005-11-10 18:16:58 +0000 |
---|---|---|
committer | Daniel Burrows <dburrows@debian.org> | 2005-11-10 18:16:58 +0000 |
commit | 3f72df0f9b32a1a68521fca17077f61268decc40 (patch) | |
tree | 76bc79d235de8ebb75e8b8cabfd336832c7f9766 /src/solution_item.cc | |
parent | a23e36bfe4c3027a4189ea04020b92c7f5538f2b (diff) | |
download | aptitude-3f72df0f9b32a1a68521fca17077f61268decc40.tar.gz |
[aptitude @ Make the 'highlighted' methods of solution_items resiliant against a closed package cache.]
Diffstat (limited to 'src/solution_item.cc')
-rw-r--r-- | src/solution_item.cc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/solution_item.cc b/src/solution_item.cc index aa0504e8..21965f92 100644 --- a/src/solution_item.cc +++ b/src/solution_item.cc @@ -242,6 +242,13 @@ void solution_act_item::unmandate() void solution_act_item::highlighted(vs_tree *win) { + if(apt_cache_file == NULL) + { + set_short_description(fragf("")); + set_active_dep(aptitude_resolver_dep()); + return; + } + pkgCache::VerIterator real_ver = ver.get_ver(); if(real_ver.end()) @@ -517,7 +524,10 @@ bool solution_unresolved_item::is_mandatory() void solution_unresolved_item::highlighted(vs_tree *win) { - set_active_dep(d); + if(apt_cache_file == NULL) + set_active_dep(aptitude_resolver_dep()); + else + set_active_dep(d); } void solution_unresolved_item::unhighlighted(vs_tree *win) |