diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2004-07-06 07:19:34 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2004-07-06 07:19:34 +0000 |
commit | e5ba192fbc065ebf5712227a3ecb25dc815c5a14 (patch) | |
tree | dacab624f36ca043b8df15d7c7f10d4d12d2b9c2 | |
parent | 1e822554705046b25dbfdad55a6e02f8ea7c5739 (diff) | |
download | rpmdrake-e5ba192fbc065ebf5712227a3ecb25dc815c5a14.tar rpmdrake-e5ba192fbc065ebf5712227a3ecb25dc815c5a14.tar.gz rpmdrake-e5ba192fbc065ebf5712227a3ecb25dc815c5a14.tar.bz2 rpmdrake-e5ba192fbc065ebf5712227a3ecb25dc815c5a14.tar.xz rpmdrake-e5ba192fbc065ebf5712227a3ecb25dc815c5a14.zip |
After installation, display the contents of files named README.urpmi,
README.install.urpmi (install only), and README.update.urpmi (update only)
-rwxr-xr-x | rpmdrake | 74 |
1 files changed, 59 insertions, 15 deletions
@@ -519,19 +519,22 @@ or you already installed all of them.")); yesno => [ N("Cancel"), N("More info"), N("Ok") ]); if ($results eq #-PO: Keep it short, this is gonna be on a button - N("More info")) { - interactive_packtable(N("Information on packages"), - $w->{rwindow}, - undef, - [ map { my $pkg = $_; - [ gtkpack__(Gtk2::HBox->new(0, 0), gtkset_selectable(Gtk2::Label->new($pkg), 1)), - gtksignal_connect(Gtk2::Button->new(N("More information on package...")), - clicked => sub { - interactive_msg(N("More information on package..."), - $options->{get_info}->($pkg), scroll => 1) - }) ] } @deps ], - [ gtksignal_connect(Gtk2::Button->new(N("Ok")), - clicked => sub { Gtk2->main_quit }) ]); + N("More info")) + { + interactive_packtable( + N("Information on packages"), + $w->{rwindow}, + undef, + [ map { my $pkg = $_; + [ gtkpack__(Gtk2::HBox->new(0,0), gtkset_selectable(Gtk2::Label->new($pkg),1)), + gtksignal_connect(Gtk2::Button->new(N("More information on package...")), + clicked => sub { + interactive_msg(N("More information on package..."), + $options->{get_info}->($pkg), scroll => 1) + }) ] } @deps ], + [ gtksignal_connect(Gtk2::Button->new(N("Ok")), + clicked => sub { Gtk2->main_quit }) ] + ); goto deps_msg_again; } else { return $results eq N("Ok"); @@ -1323,8 +1326,24 @@ sub perform_installation { #- (partially) duplicated from /usr/sbin/urpmi :-( gurpm::progress($amount/$total); } }; - my @errors = $urpm->install($urpm->{ask_remove}, \%sources_install, \%sources, translate_message => 1, - post_clean_cache => 1, callback_inst => $callback_inst, callback_trans => $callback_inst); + my @errors = $urpm->install( + $urpm->{ask_remove}, + \%sources_install, + \%sources, + translate_message => 1, + post_clean_cache => 1, + callback_inst => $callback_inst, + callback_trans => $callback_inst, + callback_close => sub { + my ($urpm, undef, $pkgid) = @_; + return unless defined $pkgid; + return if $MODE ne 'install' && $MODE ne 'update'; + my $pkg = $urpm->{depslist}[$pkgid]; + push our @Readmes, map { + [ $_, $pkg->fullname() ] + } grep { /\bREADME(\.$MODE)?\.urpmi$/ } $pkg->files(); + }, + ); gurpm::end(); $urpm->try_umounting_removables; @@ -1346,6 +1365,31 @@ sub perform_installation { #- (partially) duplicated from /usr/sbin/urpmi :-( %pkg2rpmnew) and interactive_msg_(N("Everything installed successfully"), N("All requested packages were installed successfully.")); + if (our @Readmes) { #- display the README*.urpmi files + interactive_packtable( + N("Information on packages"), + $w->{rwindow}, + N("These packages come with upgrade information"), + [ map { + my $pkg = $_; + [ gtkpack__( + Gtk2::HBox->new(0, 0), + gtkset_selectable(Gtk2::Label->new($pkg->[1]),1), + ), + gtksignal_connect( + Gtk2::Button->new(N("More information on package...")), + clicked => sub { + interactive_msg( + N("More information on package..."), + (join '' => cat_($pkg->[0])), + scroll => 1, + ); + }, + ), + ] } @Readmes ], + [ gtksignal_connect(Gtk2::Button->new(N("Ok")), clicked => sub { Gtk2->main_quit }) ] + ); + } } else { gurpm::end(); $urpm->try_umounting_removables; |