[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Preserve timestamps and other things (patch)



Here is a patch to fix a few small things with debian-cd.

 - Preserve timestamps when copying files into the CDs
 - Make sure build.sh can run in -e (stop on error) mode
 - Report if packages needed by debootstrap is missing on a CD
 - Report how much space is reserved on each CD
 - Handle boot-floppy directories without documentation

Please include this patch in the next release.

Index: CONF.sh
===================================================================
RCS file: /cvs/debian-boot/debian-cd/CONF.sh,v
retrieving revision 1.27
diff -u -3 -p -u -r1.27 CONF.sh
--- CONF.sh	2002/05/06 17:19:05	1.27
+++ CONF.sh	2002/06/27 17:40:50
@@ -3,32 +3,32 @@
 #
 
 # Unset all optional variables first to start from a clean state
-unset NONUS
-unset FORCENONUSONCD1
-unset NONFREE
-unset EXTRANONFREE
-unset LOCAL
-unset LOCALDEBS
-unset SECURED
-unset BOOTDIR
-unset SYMLINK
-unset COPYLINK
-unset MKISOFS
-unset MKISOFS_OPTS
-unset ISOLINUX
-unset EXCLUDE
-unset SRCEXCLUDE
-unset NORECOMMENDS
-unset NOSUGGESTS
-unset DOJIGDO
-unset JIGDOCMD
-unset JIGDOTEMPLATEURL
-unset DEFBINSIZE
-unset DEFSRCSIZE
-unset FASTSUMS
-unset PUBLISH_URL
-unset PUBLISH_NONUS_URL
-unset PUBLISH_PATH
+unset NONUS             || true
+unset FORCENONUSONCD1   || true
+unset NONFREE           || true
+unset EXTRANONFREE      || true
+unset LOCAL             || true
+unset LOCALDEBS         || true
+unset SECURED           || true
+unset BOOTDIR           || true
+unset SYMLINK           || true
+unset COPYLINK          || true
+unset MKISOFS           || true
+unset MKISOFS_OPTS      || true
+unset ISOLINUX          || true
+unset EXCLUDE           || true
+unset SRCEXCLUDE        || true
+unset NORECOMMENDS      || true
+unset NOSUGGESTS        || true
+unset DOJIGDO           || true
+unset JIGDOCMD          || true
+unset JIGDOTEMPLATEURL  || true
+unset DEFBINSIZE        || true
+unset DEFSRCSIZE        || true
+unset FASTSUMS          || true
+unset PUBLISH_URL       || true
+unset PUBLISH_NONUS_URL || true
+unset PUBLISH_PATH      || true
 
 
 # The debian-cd dir
Index: Makefile
===================================================================
RCS file: /cvs/debian-boot/debian-cd/Makefile,v
retrieving revision 1.59
diff -u -3 -p -u -r1.59 Makefile
--- Makefile	2002/06/25 13:42:23	1.59
+++ Makefile	2002/06/27 17:40:51
@@ -451,6 +451,8 @@ $(BDIR)/packages-stamp:
 	    if [ "$$ok" = "yes" ]; then \
 		echo "CD$$DISK contains all packages needed by debootstrap"; \
 		touch $(BDIR)/CD$$DISK/.disk/base_installable; \
+	    else; \
+		echo "CD$$DISK missing some packages needed by debootstrap"; \
 	    fi; \
 	else \
 	    echo "Unable to find debootstrap program"; \
Index: build.sh
===================================================================
RCS file: /cvs/debian-boot/debian-cd/build.sh,v
retrieving revision 1.8
diff -u -3 -p -u -r1.8 build.sh
--- build.sh	2002/04/07 16:26:59	1.8
+++ build.sh	2002/06/27 17:40:51
@@ -1,10 +1,12 @@
-#!/bin/sh
+#!/bin/sh -e
 
 # Script to build one arch
 
 . CONF.sh
 
-[ -n "$1" ] && export ARCH=$1
+if [ -n "$1" ] ; then
+	export ARCH=$1
+fi
 
 make distclean
 make ${CODENAME}_status
@@ -30,6 +32,7 @@ for CD in 1 2 3 4 5 6 7 8; do
 	[ "$size" = "" ] && size=0
 	[ $CD = "1" ] && size=$(($size + $disks))
     FULL_SIZE=`echo "($DEFBINSIZE - $size) * 1024 * 1024" | bc`
+	echo "INFO: Reserving $size MB on the $CD cd.  SIZELIMIT=$FULL_SIZE."
 	SIZE_ARGS="$SIZE_ARGS SIZELIMIT${CD}=$FULL_SIZE"
 done
 FULL_SIZE=`echo "($DEFSRCSIZE - $size) * 1024 * 1024" | bc`
Index: tools/add-bin-doc
===================================================================
RCS file: /cvs/debian-boot/debian-cd/tools/add-bin-doc,v
retrieving revision 1.6
diff -u -3 -p -u -r1.6 add-bin-doc
--- tools/add-bin-doc	2002/01/20 14:37:56	1.6
+++ tools/add-bin-doc	2002/06/27 17:40:51
@@ -13,7 +13,7 @@ for i in $BDIR/*.packages; do 
 	dir=${i%%.packages}
 	dir=${dir##$BDIR/}
 	dir=$BDIR/CD$dir
-	cp -df $MIRROR/README* $dir/ 
+	cp -pdf $MIRROR/README* $dir/ 
 
 	if [ -f $dir/doc/dedication-$DEBMAINVER.txt ]; then
 		mv $dir/doc/dedication-$DEBMAINVER.txt $dir/dedication.txt
@@ -37,14 +37,14 @@ for i in $BDIR/*.packages; do 
 
 	rm -f $dir/README.diskdefines
 	mkdir -p $dir/pics 
-	cp $BASEDIR/data/pics/*.* $dir/pics/ 
+	cp -p $BASEDIR/data/pics/*.* $dir/pics/ 
 
 	if [ -e $MIRROR/dists/$CODENAME/main/Release-Notes ]; then 
-	   cp -f $MIRROR/dists/$CODENAME/main/Release-Notes $dir/
+	   cp -pf $MIRROR/dists/$CODENAME/main/Release-Notes $dir/
 	fi
 
 	if [ -e $MIRROR/dists/$CODENAME/Contents-$ARCH.gz ]; then
-	   cp -f $MIRROR/dists/$CODENAME/Contents-$ARCH.gz $dir/dists/$CODENAME/
+	   cp -pf $MIRROR/dists/$CODENAME/Contents-$ARCH.gz $dir/dists/$CODENAME/
 	else
 	   echo "WARNING: there's no Contents-$ARCH.gz file for $CODENAME !"
 	fi
@@ -52,7 +52,7 @@ for i in $BDIR/*.packages; do 
         if [ -n "$NONUS" ]
 	then
 	    if [ -e $NONUS/dists/$CODENAME/non-US/Contents-$ARCH.gz ]; then
-		 cp -f $NONUS/dists/$CODENAME/non-US/Contents-$ARCH.gz \
+		 cp -pf $NONUS/dists/$CODENAME/non-US/Contents-$ARCH.gz \
 		    $dir/dists/$CODENAME/non-US/
 	    else
 		echo "WARNING: there's no Content-$ARCH.gz file for $CODENAME/non-US !"
@@ -60,7 +60,7 @@ for i in $BDIR/*.packages; do 
 	fi
 
 	if [ -e $BASEDIR/data/$CODENAME/README.$ARCH ]; then 
-	  cp -f $BASEDIR/data/$CODENAME/README.$ARCH $dir/
+	  cp -pf $BASEDIR/data/$CODENAME/README.$ARCH $dir/
 	fi
 
 	if [ -e $BASEDIR/data/$CODENAME/README.1ST.$ARCH ]; then 
@@ -73,7 +73,7 @@ for i in $BDIR/*.packages; do 
 	fi
 
 	if [ -e $BASEDIR/data/$CODENAME/README.multicd ]; then 
-	    cp -f $BASEDIR/data/$CODENAME/README.multicd $dir/
+	    cp -pf $BASEDIR/data/$CODENAME/README.multicd $dir/
 	fi
 
 done
Index: tools/boot/woody/boot-i386
===================================================================
RCS file: /cvs/debian-boot/debian-cd/tools/boot/woody/boot-i386,v
retrieving revision 1.37
diff -u -3 -p -u -r1.37 boot-i386
--- tools/boot/woody/boot-i386	2002/05/15 21:32:02	1.37
+++ tools/boot/woody/boot-i386	2002/06/27 17:40:51
@@ -97,7 +97,7 @@ if [ "${ISOLINUX:-0}" != "0" ]; then
     # Include Smart Boot Manager image for people where isolinux doesn't
     # work
     gzip -dc $BASEDIR/data/$CODENAME/sbm.bin.gz > $CDDIR/install/sbm.bin
-    cp $BASEDIR/data/$CODENAME/README.sbm $CDDIR/install/
+    cp -p $BASEDIR/data/$CODENAME/README.sbm $CDDIR/install/
     # Isolinux config files
     cp -f $BASEDIR/data/$CODENAME/isolinux.txt $BASEDIR/data/$CODENAME/f*.txt boot$N/isolinux/
     cat > boot$N/isolinux/isolinux.cfg <<EOF
@@ -144,7 +144,7 @@ F0 f10.txt
 EOF
 fi
 
-cp -f $CDDIR/dists/$CODENAME/main/disks-$ARCH/current/dosutils/* $CDDIR/install/
+cp -pf $CDDIR/dists/$CODENAME/main/disks-$ARCH/current/dosutils/* $CDDIR/install/
 
 (echo "Tools for DOS :" ; \
 	echo "lodlin/         load Linux kernel from DOS" ;\
Index: tools/woody/installtools.sh
===================================================================
RCS file: /cvs/debian-boot/debian-cd/tools/woody/installtools.sh,v
retrieving revision 1.7
diff -u -3 -p -u -r1.7 installtools.sh
--- tools/woody/installtools.sh	2001/11/06 10:23:36	1.7
+++ tools/woody/installtools.sh	2002/06/27 17:40:51
@@ -23,8 +23,11 @@ fi
 # Put the install documentation in /install
 cd $DOCS
 mkdir -p $DIR/install/$DOCDIR
-cp -a * $DIR/install/$DOCDIR/
-ln -sf install.en.html $DIR/install/$DOCDIR/index.html
+if cp -a * $DIR/install/$DOCDIR/ ; then
+	ln -sf install.en.html $DIR/install/$DOCDIR/index.html
+else
+	echo "ERROR: Unable to copy boot-floppies documentation to CD."
+fi
 
 # Put the boot-disk documentation in /doc too
 mkdir -p $DIR/doc/install


-- 
To UNSUBSCRIBE, email to debian-cd-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: