aboutsummaryrefslogtreecommitdiffstats
path: root/Rpmdrake/pkg.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2007-08-03 13:22:29 +0000
committerThierry Vignaud <tv@mandriva.org>2007-08-03 13:22:29 +0000
commit045f3479cb3e6301ed9a8daf076f15f570401a00 (patch)
treec2b84535230a1f153aca89049019f866a4c5b777 /Rpmdrake/pkg.pm
parent29c3adff913e517dd293015573d393292d5cff9a (diff)
downloadrpmdrake-045f3479cb3e6301ed9a8daf076f15f570401a00.tar
rpmdrake-045f3479cb3e6301ed9a8daf076f15f570401a00.tar.gz
rpmdrake-045f3479cb3e6301ed9a8daf076f15f570401a00.tar.bz2
rpmdrake-045f3479cb3e6301ed9a8daf076f15f570401a00.tar.xz
rpmdrake-045f3479cb3e6301ed9a8daf076f15f570401a00.zip
(perform_installation) reduce duplication of code with urpmi by
reusing urpmi default callback_close now that urpmi exports the list of READMEs it founded
Diffstat (limited to 'Rpmdrake/pkg.pm')
-rwxr-xr-xRpmdrake/pkg.pm12
1 files changed, 2 insertions, 10 deletions
diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm
index 58a8c2e8..995711ea 100755
--- a/Rpmdrake/pkg.pm
+++ b/Rpmdrake/pkg.pm
@@ -470,7 +470,6 @@ sub perform_installation { #- (partially) duplicated from /usr/sbin/urpmi :-(
my ($urpm, $pkgs) = @_;
my @error_msgs;
- my %Readmes;
my $statusbar_msg_id;
local $urpm->{fatal} = sub {
my $fatal_msg = $_[1];
@@ -684,15 +683,6 @@ sub perform_installation { #- (partially) duplicated from /usr/sbin/urpmi :-(
noscripts => $urpm->{options}{noscripts},
callback_inst => $callback_inst,
callback_trans => $callback_inst,
- # FIXME: this needs to be factorizd with urpmi::install::install():
- callback_close => sub {
- my ($urpm, undef, $pkgid) = @_;
- return unless defined $pkgid;
- my $pkg = $urpm->{depslist}[$pkgid];
- my $fullname = $pkg->fullname;
- my $trtype = (any { /\Q$fullname/ } values %transaction_sources_install) ? 'install' : '(update|upgrade)';
- for ($pkg->files) { /\bREADME(\.$trtype)?\.urpmi$/ and $Readmes{$_} = $fullname }
- },
);
my @l = urpm::install::install($urpm,
$to_remove,
@@ -790,6 +780,8 @@ Some configuration files were created as `.rpmnew' or `.rpmsave',
you may now inspect some in order to take actions:"),
%pkg2rpmnew)
and $statusbar_msg_id = statusbar_msg(N("All requested packages were installed successfully."));
+
+ my %Readmes = %{$urpm->{readmes}};
if (keys %Readmes) { #- display the README*.urpmi files
interactive_packtable(
N("Upgrade information"),