aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-11-18 14:00:24 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-11-18 14:00:24 +0000
commit255988ec42b20876af4448f41e7b5ac919862b91 (patch)
treed3cd07a282d94b1f83155cd51da01a6675060156
parent37c2d74eeae302d45858b134695d5bb03627ed5f (diff)
downloadrpmdrake-255988ec42b20876af4448f41e7b5ac919862b91.tar
rpmdrake-255988ec42b20876af4448f41e7b5ac919862b91.tar.gz
rpmdrake-255988ec42b20876af4448f41e7b5ac919862b91.tar.bz2
rpmdrake-255988ec42b20876af4448f41e7b5ac919862b91.tar.xz
rpmdrake-255988ec42b20876af4448f41e7b5ac919862b91.zip
Display packages required by basesystem in rpmdrake-remove, but with a lock icon
-rwxr-xr-xrpmdrake21
1 files changed, 10 insertions, 11 deletions
diff --git a/rpmdrake b/rpmdrake
index f3b00155..c3ae8e5d 100755
--- a/rpmdrake
+++ b/rpmdrake
@@ -630,7 +630,7 @@ sub run_treeview_dialog {
};
$options = {
node_state => sub {
- $_[0] ? ($pkgs->{$_[0]}{selected} ? 'selected' : 'unselected') : 'XXX';
+ $_[0] ? ($pkgs->{$_[0]}{selected} ? 'selected' : $pkgs->{$_[0]}{pkg}->flag_base ? '/usr/share/rpmdrake/icons/base.png' : 'unselected') : 'XXX';
}, #- checks $_[0] -> hack for partial tree displaying
build_tree => sub {
my ($add_node, $flat, $mode) = @_;
@@ -1743,7 +1743,7 @@ sub get_installed_pkgs {
});
}
foreach (values %basepackages) {
- my $n = @$_;
+ my $n = @$_; #- count number of times it's provided
foreach (@$_) {
$base{$_} = \$n;
}
@@ -1752,15 +1752,14 @@ sub get_installed_pkgs {
$db->traverse(sub {
my ($pkg) = @_;
my $fullname = my_fullname($pkg);
- if (!$base{$fullname} || ${$base{$fullname}} != 1) {
- #- I need to extract summary and description since they'll be lost when $pkg->pack_header
- $installed_pkgs{$fullname} = {
- selected => 0, pkg => $pkg, urpm_name => urpm_name($pkg),
- summary => rpm_summary($pkg->summary),
- description => rpm_description($pkg->description),
- } unless $installed_pkgs{$fullname} && $installed_pkgs{$fullname}{description};
- $base{$fullname} and $installed_pkgs{$fullname}{base} = \${$base{$fullname}};
- }
+ #- I need to extract summary and description since they'll be lost when $pkg->pack_header
+ $installed_pkgs{$fullname} = {
+ selected => 0, pkg => $pkg, urpm_name => urpm_name($pkg),
+ summary => rpm_summary($pkg->summary),
+ description => rpm_description($pkg->description),
+ } unless $installed_pkgs{$fullname} && $installed_pkgs{$fullname}{description};
+ $base{$fullname} and $installed_pkgs{$fullname}{base} = \${$base{$fullname}};
+ if ($base{$fullname} && ${$base{$fullname}} == 1) { $pkg->set_flag_base(1) }
$pkg->pack_header;
});
statusbar_msg_remove($wait);