make_disc_trees: create /firmware before adding symlinks there

Otherwise it would only be created after failing to create the first symlink.
See previous commit.
This commit is contained in:
Cyril Brulebois 2023-01-20 16:23:17 +01:00
parent b1cb4c43c2
commit a2378ed25d
1 changed files with 5 additions and 4 deletions

View File

@ -1207,16 +1207,17 @@ sub add_firmware_stuff {
$dep11_dir = "$mirror/dists/$codename-backports/$dist/dep11"; $dep11_dir = "$mirror/dists/$codename-backports/$dist/dep11";
} }
msg_ap(0, "Symlink fw package $p into /firmware\n");
symlink("../$file", "$dir/firmware/$base_file")
or die "unable to create $dir/firmware/$base_file symlink: $!";
msg_ap(0, "Symlink ../$file $dir/firmware/.\n");
if (! -d "$dir/firmware") { if (! -d "$dir/firmware") {
mkdir "$dir/firmware" or die "mkdir $dir/firmware failed $!\n"; mkdir "$dir/firmware" or die "mkdir $dir/firmware failed $!\n";
mkdir "$dir/firmware/dep11" or die "mkdir $dir/firmware/dep11 failed $!\n"; mkdir "$dir/firmware/dep11" or die "mkdir $dir/firmware/dep11 failed $!\n";
$blocks_added += 2; $blocks_added += 2;
} }
msg_ap(0, "Symlink fw package $p into /firmware\n");
symlink("../$file", "$dir/firmware/$base_file")
or die "unable to create $dir/firmware/$base_file symlink: $!";
msg_ap(0, "Symlink ../$file $dir/firmware/.\n");
# Cope with maybe having the patterns file already # Cope with maybe having the patterns file already
# (e.g. multi-arch), in which case we'll replace it here # (e.g. multi-arch), in which case we'll replace it here
if (-f "$dir/firmware/dep11/$p.patterns") { if (-f "$dir/firmware/dep11/$p.patterns") {