summaryrefslogtreecommitdiffstats
path: root/perl-install/pkgs.pm
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-08-13 01:22:59 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-08-13 01:22:59 +0000
commit0ee07ece875988099af5c8e58112b20aab48f3c5 (patch)
treef946b25fb79a6880e80fe453d157687fd2746309 /perl-install/pkgs.pm
parent9254117a69ef2349e35ff4dd02800571e0634dd7 (diff)
downloaddrakx-backup-do-not-use-0ee07ece875988099af5c8e58112b20aab48f3c5.tar
drakx-backup-do-not-use-0ee07ece875988099af5c8e58112b20aab48f3c5.tar.gz
drakx-backup-do-not-use-0ee07ece875988099af5c8e58112b20aab48f3c5.tar.bz2
drakx-backup-do-not-use-0ee07ece875988099af5c8e58112b20aab48f3c5.tar.xz
drakx-backup-do-not-use-0ee07ece875988099af5c8e58112b20aab48f3c5.zip
Try to copy associated synthesis when a custom hdlist path is given
Diffstat (limited to 'perl-install/pkgs.pm')
-rw-r--r--perl-install/pkgs.pm12
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;
}