make_disc_trees.pl: add workaround for missing bookworm/non-free-firmware/dep11

There's no dep11 directory for bookworm's non-free-firmware component
for the time being, and we've just decided to be more cautious about
input files, which breaks the bookworm build.

Until the issue is fixed on the appstream.debian.org side, and until dak
can indeed import that directory into the Debian archive, use sid's
non-free-firmware dep11 directory instead of bookworm's.
This commit is contained in:
Cyril Brulebois 2023-01-25 01:38:34 +01:00
parent 214e2dd88c
commit ee40a3bf23
1 changed files with 13 additions and 0 deletions

View File

@ -13,6 +13,7 @@ use File::Path qw(make_path remove_tree);
use File::Basename;
use Compress::Zlib;
use File::Slurp;
use feature 'state';
my %pkginfo;
my ($basedir, $mirror, $tdir, $codename, $archlist, $mkisofs, $maxcds,
@ -1208,6 +1209,18 @@ sub add_firmware_stuff {
$dep11_dir = "$mirror/dists/$codename-backports/$component/dep11";
}
# Workaround for currently-missing dep11 directory for non-free-firmware
# in bookworm, until that's fixed on appstream.debian.org and synchronized
# into the archive:
if ($codename eq 'bookworm' and $component eq 'non-free-firmware' and not -d $dep11_dir) {
state $warned = 0;
if ($warned == 0) {
print "*** APPLYING WORKAROUND for missing $dep11_dir, replacing $codename with sid ***\n";
$warned = 1;
}
$dep11_dir = "$mirror/dists/sid/$component/dep11";
}
if (! -d "$dir/firmware") {
mkdir "$dir/firmware" or die "mkdir $dir/firmware failed $!\n";
mkdir "$dir/firmware/dep11" or die "mkdir $dir/firmware/dep11 failed $!\n";