Rearranged to produce a CD per architecture

This commit is contained in:
Steve McIntyre 2002-12-23 10:03:45 +00:00
parent c5fe08e47c
commit b6a299ab22
1 changed files with 40 additions and 41 deletions

View File

@ -48,16 +48,7 @@ SECTS="main non-free contrib"
VERBOSE=2 VERBOSE=2
export VERBOSE BASEDIR SECTS export VERBOSE BASEDIR SECTS
# The full update will not fit on a single CD, so split it arbitrarily ARCHLIST="alpha arm hppa i386 ia64 m68k mips mipsel powerpc s390 sparc src" # all dealt with specially
# CD 1 gets arm/i386/source
# CD 2 gets alpha/m68k/powerpc
# CD 3 gets sparc
# binary-all goes on all 3
INFO1="Debian GNU/Linux $VER Update CD $DATE: Alpha, Arm, HPPA, I386, IA64, M68k and Source"
INFO2="Debian GNU/Linux $VER Update CD $DATE: Mips, Mipsel, Powerpc, S390, Sparc and Source"
ARCH1="src all alpha arm hppa i386 ia64 m68k"
ARCH2="src all mips mipsel powerpc s390 sparc"
export TDIR NONFREE NONUS VER MIRROR CODENAME OUT BASEDIR export TDIR NONFREE NONUS VER MIRROR CODENAME OUT BASEDIR
@ -87,28 +78,28 @@ copy_trees () {
BINLIST=$1 BINLIST=$1
shift shift
ARCHES=$* ARCHES=$*
echo " Copying \"$ARCHES\" files into $UPD/$CDDIR" echo " Copying \"$ARCHES\" files into $UPD/$CDDIR"
for ARCH in $ARCHES for ARCH in $ARCHES
do do
case "$ARCH" in case "$ARCH" in
src) src)
NUM=`cat $SRCLIST | wc -l` NUM=`cat $SRCLIST | wc -l`
if [ $NUM -gt 0 ] ; then if [ $NUM -gt 0 ] ; then
echo " $ARCH into $UPD/$CDDIR" echo " $ARCH into $UPD/$CDDIR"
adddirs $UPD/$CDDIR $SRCLIST adddirs $UPD/$CDDIR $SRCLIST
cat $SRCLIST | xargs $addfiles $UPD/$CDDIR $MIRROR cat $SRCLIST | xargs $addfiles $UPD/$CDDIR $MIRROR
else else
echo " No updates needed for $ARCH" echo " No updates needed for $ARCH"
fi fi
;; ;;
*) *)
NUM=`cat $BINLIST | grep _$ARCH.deb | wc -l` NUM=`cat $BINLIST | grep _$ARCH.deb | wc -l`
if [ $NUM -gt 0 ] ; then if [ $NUM -gt 0 ] ; then
echo " $ARCH into $UPD/$CDDIR" echo " $ARCH into $UPD/$CDDIR"
adddirs $UPD/$CDDIR $BINLIST adddirs $UPD/$CDDIR $BINLIST
cat $BINLIST | grep _$ARCH.deb | xargs $addfiles $UPD/$CDDIR $MIRROR cat $BINLIST | grep _$ARCH.deb | xargs $addfiles $UPD/$CDDIR $MIRROR
else else
echo " No updates needed for $ARCH" echo " No updates needed for $ARCH"
fi fi
;; ;;
esac esac
@ -152,7 +143,8 @@ create_control_files () {
echo Cleaning up echo Cleaning up
rm -rf $UPD rm -rf $UPD
mkdir $UPD $UPD/CD1 $UPD/CD2 mkdir $UPD
CDNUM=1
cd $MIRROR cd $MIRROR
echo Creating main-section list echo Creating main-section list
@ -173,11 +165,6 @@ if [ "$NONFREE"x != "1"x ] ; then
mv -f $UPD/src-list1 $UPD/src-list mv -f $UPD/src-list1 $UPD/src-list
fi fi
echo Creating trees
copy_trees CD1 $UPD/src-list $UPD/bin-list $ARCH1
copy_trees CD2 $UPD/src-list $UPD/bin-list $ARCH2
if [ "$NONUS"x != ""x ] ; then if [ "$NONUS"x != ""x ] ; then
echo Creating non-US list echo Creating non-US list
cd $NONUS cd $NONUS
@ -198,28 +185,40 @@ if [ "$NONUS"x != ""x ] ; then
mv -f $UPD/src-nu-list1 $UPD/src-nu-list mv -f $UPD/src-nu-list1 $UPD/src-nu-list
fi fi
echo Creating non-US trees
copy_trees CD1 $UPD/src-nu-list $UPD/bin-nu-list $ARCH1
copy_trees CD2 $UPD/src-nu-list $UPD/bin-nu-list $ARCH2
fi fi
echo Creating .disk/info files for THISARCH in $ARCHLIST
mkdir $UPD/CD1/.disk $UPD/CD2/.disk do
echo $INFO1 > $UPD/CD1/.disk/info if [ $THISARCH = "src" ] ; then
echo $INFO2 > $UPD/CD2/.disk/info echo "Creating CD$CDNUM for source"
else
cd $UPD echo "Creating CD$CDNUM for binary-$THISARCH and binary-all"
echo Creating Packages and Sources files fi
create_control_files CD1 $ARCH1 mkdir $UPD/CD$CDNUM $UPD/CD$CDNUM/.disk
create_control_files CD2 $ARCH2 INFO="Debian GNU/Linux $VER Update CD $DATE: $THISARCH"
echo $INFO > $UPD/CD$CDNUM/.disk/info
echo Creating images echo " Copying normal files"
echo " CD1:" if [ $THISARCH = "src" ] ; then
${MKISOFS} -J -r -V "Debian $VER update CD" -o $OUT/$CODENAME-update-1.raw $UPD/CD1 2>&1 | grep "extents written" copy_trees CD$CDNUM $UPD/src-list $UPD/bin-list $THISARCH
echo " CD2:" else
${MKISOFS} -J -r -V "Debian $VER update CD" -o $OUT/$CODENAME-update-2.raw $UPD/CD2 2>&1 | grep "extents written" copy_trees CD$CDNUM $UPD/src-list $UPD/bin-list $THISARCH all
#echo " CD3:" fi
#${MKISOFS} -J -r -V "Debian $VER update CD" -o $OUT/$CODENAME-update-3.raw $UPD/CD3 2>&1 | grep "extents written" if [ "$NONUS"x != ""x ] ; then
echo " Copying non-US files"
if [ $THISARCH = "src" ] ; then
copy_trees CD$CDNUM $UPD/src-nu-list $UPD/bin-nu-list $THISARCH
else
copy_trees CD$CDNUM $UPD/src-nu-list $UPD/bin-nu-list $THISARCH all
fi
fi
echo " Creating Packages and Sources files"
cd $UPD
create_control_files CD$CDNUM $THISARCH
echo " Creating image for CD$CDNUM"
echo -n " "
${MKISOFS} -J -r -V "Debian $VER update CD" -o $OUT/$CODENAME-update-$THISARCH.raw $UPD/CD$CDNUM 2>&1 | grep "extents written"
CDNUM=$(($CDNUM + 1))
done