summaryrefslogtreecommitdiffstats
path: root/perl-install/pkgs.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2001-02-07 10:45:52 +0000
committerFrancois Pons <fpons@mandriva.com>2001-02-07 10:45:52 +0000
commitf178a0b654b57e5eb443cee76cd3170bfef0bc4a (patch)
tree1944cce64b66995308b00fc7510fac62b6198e4e /perl-install/pkgs.pm
parentd8ec21bed269b44c6ec416ebbbe2f43464d48d50 (diff)
downloaddrakx-backup-do-not-use-f178a0b654b57e5eb443cee76cd3170bfef0bc4a.tar
drakx-backup-do-not-use-f178a0b654b57e5eb443cee76cd3170bfef0bc4a.tar.gz
drakx-backup-do-not-use-f178a0b654b57e5eb443cee76cd3170bfef0bc4a.tar.bz2
drakx-backup-do-not-use-f178a0b654b57e5eb443cee76cd3170bfef0bc4a.tar.xz
drakx-backup-do-not-use-f178a0b654b57e5eb443cee76cd3170bfef0bc4a.zip
now fully fixed ftp connection (and http too) caused by forked DrakX
with latent ftp connection.
Diffstat (limited to 'perl-install/pkgs.pm')
-rw-r--r--perl-install/pkgs.pm20
1 files changed, 10 insertions, 10 deletions
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index 0baccea9e..a9af7f72d 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -394,6 +394,7 @@ sub psUsingHdlist {
$packages->{mediums}{$medium} and return;
my $m = $packages->{mediums}{$medium} = { hdlist => $hdlist,
+ method => $method,
medium => $medium,
rpmsdir => $rpmsdir, #- where is RPMS directory.
descr => $descr,
@@ -1196,17 +1197,15 @@ sub install($$$;$$) {
#- extract headers for parent as they are used by callback.
extractHeaders($prefix, \@transToInstall, $media->{$medium});
- #- reset file descriptor open for main process but
- #- make sure error trying to change from hdlist are
- #- trown from main process too.
- install_any::getFile(packageFile($transToInstall[0]), $transToInstall[0][$MEDIUM]{descr});
- #- and make sure there are no staling open file descriptor too!
+ if ($media->{$medium}{method} eq 'cdrom') {
+ #- reset file descriptor open for main process but
+ #- make sure error trying to change from hdlist are
+ #- trown from main process too.
+ install_any::getFile(packageFile($transToInstall[0]), $transToInstall[0][$MEDIUM]{descr});
+ }
+ #- and make sure there are no staling open file descriptor too (before forking)!
install_any::getFile('XXX');
- #- reset ftp handlers before forking, otherwise well ;-(
- #require ftp;
- #ftp::rewindGetFile();
-
local (*INPUT, *OUTPUT); pipe INPUT, OUTPUT;
if (my $pid = fork()) {
close OUTPUT;
@@ -1254,7 +1253,8 @@ sub install($$$;$$) {
sub { #- installCallback
print OUTPUT join(":", @_), "\n"; },
1);
- log::l("rpmRunTransactions done");
+ log::l("rpmRunTransactions done, now trying to close still opened fd");
+ install_any::getFile('XXX'); #- close still opened fd.
if (@probs) {
my %parts;