Special-case builds of source-only discs: if we think we've overflowed

the disc size, try to carry on for a few more packages to get closer
to actually filling the disc. Closes: #613751.
This commit is contained in:
Steve McIntyre 2011-02-23 17:30:27 +00:00
parent 317536973a
commit e12ab9e518
2 changed files with 19 additions and 7 deletions

6
debian/changelog vendored
View File

@ -11,7 +11,11 @@ debian-cd (3.1.6) UNRELEASED; urgency=low
squeeze release builds.
* Add disk size definitions for 1/2/4/8 GB USB sticks.
* Extend the size-override code to allow to override an individual disc
in the set (e.g. to make the first DVD fit on a 4GB USB stick).
in the set (e.g. to make the first DVD fit on a 4GB USB
stick). Closes: #612074
* Special-case builds of source-only discs: if we think we've
overflowed the disc size, try to carry on for a few more packages
to get closer to actually filling the disc. Closes: #613751.
[ Otavio Salvador ]
* Add btrfs-tools on required packages by installer. Closes: #612007.

View File

@ -292,12 +292,20 @@ while (defined (my $pkg = <INLIST>)) {
# Put this package first on the next disc
push (@overflowlist, $pkg);
}
finish_disc($cddir, "");
# And reset, to start the next disc
$size = 0;
$disknum++;
undef(@pkgs_added);
# Special-case for source-only discs where we don't care
# about the ordering. If we're doing a source-only build
# and we've overflowed, allow us to carry on down the list
# for a while to fill more space. Stop when we've skipped
# 5 packages (arbitrary choice of number!) #613751
if (!($archlist eq "source") or (scalar @overflowlist >= 5)) {
finish_disc($cddir, "");
# And reset, to start the next disc
$size = 0;
$disknum++;
undef(@pkgs_added);
} else {
print LOG "SOURCE DISC: continuing on to see if anything else will fit, " . scalar @overflowlist . " packages on the overflow list at this point\n";
}
} else {
$pkgs_this_cd++;
$pkgs_done++;