diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2004-08-13 01:22:59 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2004-08-13 01:22:59 +0000 |
commit | 0ee07ece875988099af5c8e58112b20aab48f3c5 (patch) | |
tree | f946b25fb79a6880e80fe453d157687fd2746309 | |
parent | 9254117a69ef2349e35ff4dd02800571e0634dd7 (diff) | |
download | drakx-0ee07ece875988099af5c8e58112b20aab48f3c5.tar drakx-0ee07ece875988099af5c8e58112b20aab48f3c5.tar.gz drakx-0ee07ece875988099af5c8e58112b20aab48f3c5.tar.bz2 drakx-0ee07ece875988099af5c8e58112b20aab48f3c5.tar.xz drakx-0ee07ece875988099af5c8e58112b20aab48f3c5.zip |
Try to copy associated synthesis when a custom hdlist path is given
-rw-r--r-- | perl-install/pkgs.pm | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm index 4bfe1e39f..77540fa96 100644 --- a/perl-install/pkgs.pm +++ b/perl-install/pkgs.pm @@ -440,11 +440,17 @@ sub psUsingHdlist { $m->{hdlist_size} = -s $newf; #- keep track of size for post-check. symlinkf $newf, "/tmp/$hdlist"; - #- if $o_fhdlist is defined, this is preferable not to try to find the associated synthesis. + #- if $o_fhdlist is a filehandle, this is preferable not to try to find the associated synthesis. my $newsf = "$urpmidir/synthesis.hdlist.$fakemedium.cz" . ($hdlist =~ /\.cz2/ && "2"); - unless ($o_fhdlist) { + unless (ref $o_fhdlist) { #- copy existing synthesis file too. - install_any::getAndSaveFile("media/media_info/synthesis.$hdlist", $newsf); + my $synth; + if ($o_fhdlist) { + $synth = $o_fhdlist; + $synth =~ s/hdlist/synthesis.hdlist/ or $synth = undef; + } + $synth = "media/media_info/synthesis.$hdlist" unless $synth; + install_any::getAndSaveFile($synth, $newsf); $m->{synthesis_hdlist_size} = -s $newsf; #- keep track of size for post-check. -s $newsf > 0 or unlink $newsf; } |