summaryrefslogtreecommitdiffstats
path: root/perl-install/pkgs.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-08-22 01:10:13 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-08-22 01:10:13 +0000
commit1a996ceb744f490f0183099640e7a1eb3ad039c1 (patch)
tree7e599599dc2cd1601dc1f86b7db223ceebc562a9 /perl-install/pkgs.pm
parente2df2b17c50af038bbfe15f5b6dd9a21c532ae5b (diff)
downloaddrakx-1a996ceb744f490f0183099640e7a1eb3ad039c1.tar
drakx-1a996ceb744f490f0183099640e7a1eb3ad039c1.tar.gz
drakx-1a996ceb744f490f0183099640e7a1eb3ad039c1.tar.bz2
drakx-1a996ceb744f490f0183099640e7a1eb3ad039c1.tar.xz
drakx-1a996ceb744f490f0183099640e7a1eb3ad039c1.zip
no_comment
Diffstat (limited to 'perl-install/pkgs.pm')
-rw-r--r--perl-install/pkgs.pm13
1 files changed, 7 insertions, 6 deletions
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index cb1d42006..0b8339e5f 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -443,7 +443,7 @@ sub psUsingHdlists {
}
sub psUsingHdlist {
- my ($prefix, $method, $packages, $hdlist, $medium, $rpmsdir, $descr, $selected) = @_;
+ my ($prefix, $method, $packages, $hdlist, $medium, $rpmsdir, $descr, $selected, $fhdlist) = @_;
#- if the medium already exist, use it.
$packages->[2]{$medium} and return;
@@ -463,7 +463,7 @@ sub psUsingHdlist {
#- for getting header of package during installation or after by urpmi.
my $newf = "$prefix/var/lib/urpmi/hdlist.$fakemedium.cz2";
-e $newf and do { unlink $newf or die "cannot remove $newf: $!"; };
- install_any::getAndSaveFile($hdlist, $newf) or die "no $hdlist found";
+ install_any::getAndSaveFile($fhdlist || $hdlist, $newf) or die "no $hdlist found";
symlinkf $newf, "/tmp/$hdlist";
#- extract filename from archive, this take advantage of verifying
@@ -1021,9 +1021,10 @@ sub install($$$;$$) {
log::l("\tdone");
my $callbackOpen = sub {
- my $f = packageFile($packages{$_[0]});
- print LOG "$f\n";
- my $fd = install_any::getFile($f);
+ my $p = $packages{$_[0]};
+ my $f = packageFile($p);
+ print LOG "$f $p->{medium}{descr}\n";
+ my $fd = install_any::getFile($f, $p->{medium}{descr});
$fd ? fileno $fd : -1;
};
my $callbackClose = sub { packageSetFlagInstalled(delete $packages{$_[0]}, 1) };
@@ -1081,7 +1082,7 @@ sub install($$$;$$) {
#- 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]));
+ install_any::getFile(packageFile($transToInstall[0]), $transToInstall[0]{medium}{descr});
#- and make sure there are no staling open file descriptor too!
install_any::getFile('XXX');