add more support for contrib exclusion

This commit is contained in:
Tollef Fog Heen 2002-12-07 10:33:52 +00:00
parent 916440cf9a
commit 07fcb55774
3 changed files with 28 additions and 14 deletions

View File

@ -36,8 +36,10 @@ fi
mkdir -p dists/$CODENAME/main/binary-$ARCH mkdir -p dists/$CODENAME/main/binary-$ARCH
mkdir -p dists/$CODENAME/main/source mkdir -p dists/$CODENAME/main/source
if [ "${CONTRIB:-0}" != 0 ]; then
mkdir -p dists/$CODENAME/contrib/binary-$ARCH mkdir -p dists/$CODENAME/contrib/binary-$ARCH
mkdir -p dists/$CODENAME/contrib/source mkdir -p dists/$CODENAME/contrib/source
fi
if [ "${NONFREE:-0}" != "0" ]; then if [ "${NONFREE:-0}" != "0" ]; then
mkdir -p dists/$CODENAME/non-free/binary-$ARCH mkdir -p dists/$CODENAME/non-free/binary-$ARCH
mkdir -p dists/$CODENAME/non-free/source mkdir -p dists/$CODENAME/non-free/source
@ -49,8 +51,10 @@ fi
if [ -n "$SECURITY" ]; then if [ -n "$SECURITY" ]; then
mkdir -p dists/$CODENAME/updates/main/binary-$ARCH mkdir -p dists/$CODENAME/updates/main/binary-$ARCH
mkdir -p dists/$CODENAME/updates/main/source mkdir -p dists/$CODENAME/updates/main/source
if [ "${CONTRIB:-0}" != "0" ]; then
mkdir -p dists/$CODENAME/updates/contrib/binary-$ARCH mkdir -p dists/$CODENAME/updates/contrib/binary-$ARCH
mkdir -p dists/$CODENAME/updates/contrib/source mkdir -p dists/$CODENAME/updates/contrib/source
fi
if [ "${NONFREE:-0}" != "0" ]; then if [ "${NONFREE:-0}" != "0" ]; then
mkdir -p dists/$CODENAME/updates/non-free/binary-$ARCH mkdir -p dists/$CODENAME/updates/non-free/binary-$ARCH
mkdir -p dists/$CODENAME/updates/non-free/source mkdir -p dists/$CODENAME/updates/non-free/source
@ -60,8 +64,10 @@ fi
if [ -n "$NONUS" ]; then if [ -n "$NONUS" ]; then
mkdir -p dists/$CODENAME/non-US/main/binary-$ARCH mkdir -p dists/$CODENAME/non-US/main/binary-$ARCH
mkdir -p dists/$CODENAME/non-US/main/source mkdir -p dists/$CODENAME/non-US/main/source
if [ "${CONTRIB:-0}" != "0" ]; then
mkdir -p dists/$CODENAME/non-US/contrib/binary-$ARCH mkdir -p dists/$CODENAME/non-US/contrib/binary-$ARCH
mkdir -p dists/$CODENAME/non-US/contrib/source mkdir -p dists/$CODENAME/non-US/contrib/source
fi
if [ "${NONFREE:-0}" != "0" ]; then if [ "${NONFREE:-0}" != "0" ]; then
mkdir -p dists/$CODENAME/non-US/non-free/binary-$ARCH mkdir -p dists/$CODENAME/non-US/non-free/binary-$ARCH
mkdir -p dists/$CODENAME/non-US/non-free/source mkdir -p dists/$CODENAME/non-US/non-free/source

View File

@ -18,6 +18,7 @@ my $nonfree = $ENV{'NONFREE'} || 0;
my $extranonfree = $ENV{'EXTRANONFREE'} || 0; my $extranonfree = $ENV{'EXTRANONFREE'} || 0;
my $nonus = $ENV{'NONUS'} || 0; my $nonus = $ENV{'NONUS'} || 0;
my $forcenonusoncd1 = $ENV{'FORCENONUSONCD1'} || 0; my $forcenonusoncd1 = $ENV{'FORCENONUSONCD1'} || 0;
my $contrib = $ENV{'CONTRIB'} || 0;
my $complete = $ENV{'COMPLETE'} || 0; my $complete = $ENV{'COMPLETE'} || 0;
my $local = $ENV{'LOCAL'} || 0; my $local = $ENV{'LOCAL'} || 0;
@ -50,14 +51,19 @@ my @nonuslist=();
my %includesrc; my %includesrc;
# Get the information from the good Sources.gz files # Get the information from the good Sources.gz files
my @SOURCES = ("$mirror/dists/$codename/main/source/Sources.gz", my @SOURCES = ("$mirror/dists/$codename/main/source/Sources.gz");
"$mirror/dists/$codename/contrib/source/Sources.gz");
if ($contrib) {
push @SOURCES, "$mirror/dists/$codename/contrib/source/Sources.gz";
}
if ($nonus) { if ($nonus) {
push @SOURCES, "$nonus/dists/$codename/non-US/main/source/Sources.gz";
if ($contrib) {
push @SOURCES, push @SOURCES,
"$nonus/dists/$codename/non-US/main/source/Sources.gz",
"$nonus/dists/$codename/non-US/contrib/source/Sources.gz"; "$nonus/dists/$codename/non-US/contrib/source/Sources.gz";
} }
}
if ($nonfree or $extranonfree) { if ($nonfree or $extranonfree) {
push @SOURCES, "$mirror/dists/$codename/non-free/source/Sources.gz"; push @SOURCES, "$mirror/dists/$codename/non-free/source/Sources.gz";
if ($nonus) { if ($nonus) {

View File

@ -11,10 +11,12 @@ set -e
SDIR=$TDIR/$CODENAME-src SDIR=$TDIR/$CODENAME-src
PREFIX=`echo $1 | sed "s?$SDIR/CD?$SDIR/?"` PREFIX=`echo $1 | sed "s?$SDIR/CD?$SDIR/?"`
SECTIONS="main"
if [ "${NONFREE:-0}" != "0" -o "${EXTRANONFREE:-0}" != "0" ]; then if [ "${NONFREE:-0}" != "0" -o "${EXTRANONFREE:-0}" != "0" ]; then
SECTIONS="main contrib non-free" SECTIONS="${SECTIONS} non-free"
else fi
SECTIONS="main contrib" fi [ "${CONTRIB:-0}" != "0" ]; then
SECTIONS="${SECTIONS} contrib"
fi fi
cd $1 cd $1