summaryrefslogtreecommitdiffstats
path: root/perl-install/pkgs.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-10-10 22:36:46 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-10-10 22:36:46 +0000
commitde08b3c99e81030d1455dc7b3bf869559a234495 (patch)
tree71639bb74323bb82e7203d84511e8b81702ca2fa /perl-install/pkgs.pm
parenteaf1f7e94354b3bf37db6864de8364ffbda223f7 (diff)
downloaddrakx-de08b3c99e81030d1455dc7b3bf869559a234495.tar
drakx-de08b3c99e81030d1455dc7b3bf869559a234495.tar.gz
drakx-de08b3c99e81030d1455dc7b3bf869559a234495.tar.bz2
drakx-de08b3c99e81030d1455dc7b3bf869559a234495.tar.xz
drakx-de08b3c99e81030d1455dc7b3bf869559a234495.zip
no_comment
Diffstat (limited to 'perl-install/pkgs.pm')
-rw-r--r--perl-install/pkgs.pm16
1 files changed, 9 insertions, 7 deletions
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index c46d26b93..b78ec1d24 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -2,7 +2,7 @@ package pkgs;
use diagnostics;
use strict;
-use vars qw($fd $size_correction_ratio);
+use vars qw(*LOG $size_correction_ratio);
use common qw(:common :file :functional);
use install_any;
@@ -270,10 +270,11 @@ sub init_db {
my ($prefix, $isUpgrade) = @_;
my $f = "$prefix/root/install.log";
- open(F, "> $f") ? log::l("opened $f") : log::l("Failed to open $f. No install log will be kept.");
- $fd = fileno(F) || log::fd() || 2;
- c::rpmErrorSetCallback($fd);
-# c::rpmSetVeryVerbose();
+ open(LOG, "> $f") ? log::l("opened $f") : log::l("Failed to open $f. No install log will be kept.");
+ *LOG or *LOG = log::F() or *LOG = *STDERR;
+ CORE::select((CORE::select(LOG), $| = 1)[0]);
+ c::rpmErrorSetCallback(fileno LOG);
+#- c::rpmSetVeryVerbose();
log::l("reading /usr/lib/rpm/rpmrc");
c::rpmReadConfigFiles() or die "can't read rpm config files";
@@ -287,7 +288,7 @@ sub getHeader($) {
unless ($p->{header}) {
my $f = install_any::getFile($p->{file}) or die "error opening package $p->{name} (file $p->{file})";
- $p->{header} = c::rpmReadPackageHeader(fileno $f);
+ $p->{header} = c::rpmReadPackageHeader(fileno $f) or die "bad package $p->{name}";
}
$p->{header};
}
@@ -432,7 +433,7 @@ sub install($$) {
c::rpmdbClose($db);
c::rpmtransFree($trans);
};
- c::rpmtransSetScriptFd($trans, $fd);
+ c::rpmtransSetScriptFd($trans, fileno LOG);
eval { fs::mount("/proc", "$prefix/proc", "proc", 0) };
@@ -440,6 +441,7 @@ sub install($$) {
#- !! do not translate these messages, they are used when catched (cf install_steps_graphical)
my $callbackOpen = sub {
+ print LOG "$_[0]\n";
my $fd = install_any::getFile($_[0]) or log::l("bad file $_[0]");
$fd ? fileno $fd : -1;
};