aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2002-09-04 10:21:41 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2002-09-04 10:21:41 +0000
commitae660eb36f5530d142a3046adbeb1c8c4d8be0da (patch)
tree1e737efb06de8ebdf55f7337f290f121eab0311c
parent373b4c51216de4361f7c9f8826c900bd34064e42 (diff)
downloadrpmdrake-ae660eb36f5530d142a3046adbeb1c8c4d8be0da.tar
rpmdrake-ae660eb36f5530d142a3046adbeb1c8c4d8be0da.tar.gz
rpmdrake-ae660eb36f5530d142a3046adbeb1c8c4d8be0da.tar.bz2
rpmdrake-ae660eb36f5530d142a3046adbeb1c8c4d8be0da.tar.xz
rpmdrake-ae660eb36f5530d142a3046adbeb1c8c4d8be0da.zip
max infos also provides currently installed version of pkg
-rwxr-xr-xrpmdrake16
1 files changed, 12 insertions, 4 deletions
diff --git a/rpmdrake b/rpmdrake
index 782f8ef3..d863896f 100755
--- a/rpmdrake
+++ b/rpmdrake
@@ -200,6 +200,13 @@ sub do_search($$$$$$) {
sub db { URPM::DB::open or die 'Couldn\'t open RPM DB' }
+sub find_installed_version {
+ my ($p) = @_;
+ my @version;
+ db->traverse_tag('name', [ $p->name ], sub { push @version, $_[0]->version.'-'.$_[0]->release });
+ @version ? join(',', sort @version) : _("(none)");
+}
+
sub run_treeview_dialog {
my ($pkgs_provider, $callback_action) = @_;
@@ -418,10 +425,11 @@ or you already installed all of them."));
exists $pkgs->{$key}{description} && (!@$max_info_in_descr || exists $pkgs->{$key}{files})
or slow_func($tree->window, sub { extract_header($pkgs->{$key}, $urpm) });
my @max_info = if_(@$max_info_in_descr,
- $MODE eq 'remove' ? ()
- : [ "\n", _("Source: "), pkg2medium($pkgs->{$key}{pkg}, $urpm)->{name} ],
- [ "\n", _("Files:\n"), $pkgs->{$key}{files} || _("(Not available)") ],
- [ "\n\n", _("Changelog:\n"), $pkgs->{$key}{changelog} || _("(Not available)") ]);
+ $MODE eq 'remove' ? ()
+ : [ "\n", _("Source: "), pkg2medium($pkgs->{$key}{pkg}, $urpm)->{name} ],
+ [ "\n", _("Currently installed version: "), find_installed_version($pkgs->{$key}{pkg}) ],
+ [ "\n", _("Files:\n"), $pkgs->{$key}{files} || _("(Not available)") ],
+ [ "\n\n", _("Changelog:\n"), $pkgs->{$key}{changelog} || _("(Not available)") ]);
my $col = my_gtk::gtkcolor(32*256, 68*256, 157*256);
$MODE eq 'update' and gtktext_insert($info_update,
[ [ undef, $col, undef, _("Reason for update: ") ],