* Fixed a bug where some symlinks where not created because the
directory where they should be created didn't exist yet.
This commit is contained in:
parent
94fea67ce5
commit
8d5ca3775b
|
@ -38,16 +38,30 @@ while (defined($_ = <LIST>)) {
|
|||
# .../binary-all/... and we reproduce a similar setup on the CD
|
||||
if ($arch eq "all" and (-l "$source/$file" or
|
||||
$file =~ m#/binary-all/#)) {
|
||||
$file =~ s#/binary-all/#/binary-$ENV{'ARCH'}/#g;
|
||||
if ($section =~ /non-US/) {
|
||||
$file =~ m#/([^/]+)$# and $name = $1;
|
||||
symlink ("../binary-all/$name", "$dir/$file");
|
||||
} else {
|
||||
$file =~ m#/([^/]+/[^/]+)$# and $name = $1;
|
||||
symlink ("../../binary-all/$name", "$dir/$file");
|
||||
}
|
||||
$file =~ s#/binary-$ENV{'ARCH'}/#/binary-all/#g;
|
||||
$file =~ s#/binary-all/#/binary-$ENV{'ARCH'}/#g;
|
||||
|
||||
# Check that the directory where the link will be created does
|
||||
# exist
|
||||
my $pdir = "$dir/$file";
|
||||
$pdir =~ s#[^/]+$##g;
|
||||
if (! -d $pdir)
|
||||
{
|
||||
system("mkdir -p $pdir");
|
||||
}
|
||||
|
||||
# Create the symlink from binary-$arch to binary-all
|
||||
if ($section =~ /non-US/) {
|
||||
$file =~ m#/([^/]+)$# and $name = $1;
|
||||
symlink ("../binary-all/$name", "$dir/$file") ||
|
||||
die "Can't symlink $dir/$file to ../binary-all/$name: $!";
|
||||
} else {
|
||||
$file =~ m#/([^/]+/[^/]+)$# and $name = $1;
|
||||
symlink ("../../binary-all/$name", "$dir/$file") ||
|
||||
die "Can't symlink $dir/$file to ../../binary-all/$name: $!";
|
||||
}
|
||||
$file =~ s#/binary-$ENV{'ARCH'}/#/binary-all/#g;
|
||||
}
|
||||
|
||||
# And we put the file in the CD tree (with a (hard) link)
|
||||
$realfile = real_file ("$source/$file");
|
||||
good_link ($realfile, "$dir/$file");
|
||||
|
|
Loading…
Reference in New Issue