diff options
author | Francois Pons <fpons@mandriva.com> | 2000-03-14 12:13:21 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2000-03-14 12:13:21 +0000 |
commit | a0bc9e5238bfcb95218b634deef66c7561d6a1cb (patch) | |
tree | 82312f78430904e837736a7cc635a4c63b67090d /perl-install/install_any.pm | |
parent | e2cbffc6422fc59ee624c2c399e79109c21c7cc4 (diff) | |
download | drakx-a0bc9e5238bfcb95218b634deef66c7561d6a1cb.tar drakx-a0bc9e5238bfcb95218b634deef66c7561d6a1cb.tar.gz drakx-a0bc9e5238bfcb95218b634deef66c7561d6a1cb.tar.bz2 drakx-a0bc9e5238bfcb95218b634deef66c7561d6a1cb.tar.xz drakx-a0bc9e5238bfcb95218b634deef66c7561d6a1cb.zip |
*** empty log message ***
Diffstat (limited to 'perl-install/install_any.pm')
-rw-r--r-- | perl-install/install_any.pm | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index f4840f637..382e13c78 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -46,13 +46,13 @@ sub relGetFile($) { /\.img$/ and return "images/$_"; my $dir = m|/| ? "mdkinst" : /^(?:compss|compssList|compssUsers|depslist.*|hdlist.*)$/ ? "base/": "RPMS$asked_medium/"; $_ = "Mandrake/$dir$_"; - s/i386/i586/; + #- s/i386/i586/; avoid using such thing as package have to be correctly rebuild $_; } -sub errorOpeningFile($) { - my ($file) = @_; +sub errorOpeningFile($;$) { + my ($file, $absent) = @_; $file eq 'XXX' and return; #- special case to force closing file after rpmlib transaction. - $current_medium eq $asked_medium and return; #- nothing to do in such case. + $current_medium eq $asked_medium && !$absent and return; #- nothing to do in such case. $refused_media{$asked_medium} and return; #- refused forever... my $max = 32; #- always refuse after $max tries. @@ -92,7 +92,11 @@ sub getFile { *install_any::getFile = sub { http::getFile($_[0]) or errorOpeningFile($_[0]) }; } else { *install_any::getFile = sub { - open getFile, "/tmp/rhimage/" . relGetFile($_[0]) or return errorOpeningFile($_[0]); + #- try to open the file, but examine if it is present in the repository, this allow + #- handling changing a media when some of the file on the first CD has been copied + #- to other to avoid media change... + open getFile, "/tmp/rhimage/" . relGetFile($_[0]) or + return errorOpeningFile($_[0], !(-e "/tmp/rhimage/" . relGetFile($_[0]))); *getFile; }; } |