diff --git a/CONF.sh b/CONF.sh index d695c974..4675c139 100644 --- a/CONF.sh +++ b/CONF.sh @@ -41,7 +41,7 @@ unset BASE_INCLUDE || true unset BASE_EXCLUDE || true unset INSTALLER_CD || true unset DI_CODENAME || true - +unset MAXCDS || true # The debian-cd dir # Where I am (hoping I'm in the debian-cd dir) @@ -265,3 +265,6 @@ export PUBLISH_PATH="/home/jigdo-area/" # Parameters to pass to kernel when the CD boots. Not currently supported # for all architectures. #export KERNEL_PARAMS="DEBCONF_PRIORITY=critical" + +# If set, limits the number of binary CDs to produce. +#MAXCDS=1 diff --git a/tools/list2cds b/tools/list2cds index 01306cd8..8e2916b9 100755 --- a/tools/list2cds +++ b/tools/list2cds @@ -23,6 +23,7 @@ my $complete = $ENV{'COMPLETE'} || 0; my $exclude = "$list.exclude"; my $norecommends = $ENV{'NORECOMMENDS'} || 0; my $nosuggests = $ENV{'NOSUGGESTS'} || 1; +my $maxcds = $ENV{'MAXCDS'} || 0; my $apt = "$ENV{'BASEDIR'}/tools/apt-selection"; my $adir = "$ENV{'APTTMP'}/$ENV{'CODENAME'}-$ENV{'ARCH'}"; @@ -284,7 +285,14 @@ foreach (glob("$dir/*.packages")) { } # Now write the lists down +my $numcds=0; foreach (sort { $a <=> $b } keys %cds) { + if ($maxcds && $numcds+1 > $maxcds) { + msg(0, "Stopping at CD $numcds\n"); + last; + } + $numcds++; + my $count = 0; open(CDLIST, "> $dir/$_.packages") || die "Can't write in $dir/$_.packages: $!\n";