From fc0883f8935053cf3d57f84facef373c8fdbeed1 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Thu, 2 Aug 2007 20:18:07 +0000 Subject: (perform_installation) readd back callback_close that was wrongly killed along callback_open (which indeed was redondant with urpmi code) while adding support for transaction in r22950, thus displaying again README.urpmi* note that readme processing really is duplicated with what urpmi::install::install() does --- Rpmdrake/pkg.pm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm index 122af691..f1457f4c 100755 --- a/Rpmdrake/pkg.pm +++ b/Rpmdrake/pkg.pm @@ -684,6 +684,14 @@ sub perform_installation { #- (partially) duplicated from /usr/sbin/urpmi :-( noscripts => $urpm->{options}{noscripts}, callback_inst => $callback_inst, callback_trans => $callback_inst, + 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, -- cgit v1.2.1