From: Otavio Salvador <[EMAIL PROTECTED]> Sometimes is useful to use a mirror without the docs and tools directory. This patch allow it if we export the ALLOWBROKENMIRROR variable on CONF.sh
Signed-off-by: Otavio Salvador <[EMAIL PROTECTED]> --- CONF.sh | 4 ++++ Makefile | 11 ++++++----- tools/add-bin-doc | 6 ++++++ tools/make_image | 7 +++++-- tools/start_new_disc | 2 +- 5 files changed, 22 insertions(+), 8 deletions(-) diff --git a/CONF.sh b/CONF.sh index 5c16904..357ac94 100644 --- a/CONF.sh +++ b/CONF.sh @@ -35,6 +35,7 @@ unset MAXCDS || true unset SPLASHPNG || true unset OMIT_MANUAL || true unset OMIT_RELEASE_NOTES || true +unset ALLOWBROKENMIRRORS || true # The debian-cd dir # Where I am (hoping I'm in the debian-cd dir) @@ -296,6 +297,9 @@ export OMIT_RELEASE_NOTES=1 # Set this to override the default location #export RELEASE_NOTES_LOCATION="http://www.debian.org/releases/$CODENAME" +# If set, allows usage of mirrors without doc and tools directories. +#export ALLOWBROKENMIRRORS=1 + case "$OFFICIAL" in "Official") export OFFICIAL_VAL=2 diff --git a/Makefile b/Makefile index bd1dc30..1e7f099 100755 --- a/Makefile +++ b/Makefile @@ -113,11 +113,12 @@ endif $(MIRROR)/doc: need-complete-mirror $(MIRROR)/tools: need-complete-mirror need-complete-mirror: - @# Why the hell is this needed ?? - @if [ ! -d $(MIRROR)/doc -o ! -d $(MIRROR)/tools ]; then \ - echo "You need a Debian mirror with the doc, tools and"; \ - echo "indices directories ! "; \ - exit 1; \ + @if [ ! -n $(ALLOWBROKENMIRROR) -o $(ALLOWBROKENMIRROR) = "0" ]; then \ + @if [ ! -d $(MIRROR)/doc -o ! -d $(MIRROR)/tools ]; then \ + echo "You need a Debian mirror with the doc, tools and"; \ + echo "indices directories ! "; \ + exit 1; \ + fi; \ fi ## INITIALIZATION ## diff --git a/tools/add-bin-doc b/tools/add-bin-doc index cba971a..0690828 100755 --- a/tools/add-bin-doc +++ b/tools/add-bin-doc @@ -18,6 +18,9 @@ if [ "$OMIT_MANUAL"x = ""x ] ; then OMIT_MANUAL=0 fi +# Not indented part to make merge easier +if [ "$ALLOWBROKENMIRROR"x = ""x -o "$ALLOWBROKENMIRROR"x = "0"x ]; then + dir=$BDIR/CD$DISK cp -pdf $MIRROR/README* $dir/ @@ -59,6 +62,9 @@ if [ -e $BASEDIR/data/$CODENAME/README.multicd ]; then cp -pf $BASEDIR/data/$CODENAME/README.multicd $dir/ fi +fi +# end of not indented part + for ARCH in $ARCHES do if [ $ARCH != "source" ] ; then diff --git a/tools/make_image b/tools/make_image index c191a80..050f0a8 100755 --- a/tools/make_image +++ b/tools/make_image @@ -53,8 +53,11 @@ do dir=$DIR/CD$n cd $dir - # Anything last-minute that can only be done now? - last_minute_update + + if [ "$ALLOWBROKENMIRROR"x = ""x -o "$ALLOWBROKENMIRROR"x = "0"x ]; then + # Anything last-minute that can only be done now? + last_minute_update + fi cd $dir/.. diff --git a/tools/start_new_disc b/tools/start_new_disc index c5b9396..250d14c 100755 --- a/tools/start_new_disc +++ b/tools/start_new_disc @@ -200,7 +200,7 @@ if [ $DISKNUM = 1 ] ; then find $CDDIR/doc -name "dedication-*" | grep -v $DEBVERSION | xargs rm -f find $CDDIR/doc -name "debian-keyring.tar.gz" | xargs rm -f - if [ ! -e $CDDIR/doc/FAQ/html ] ; then + if [ -e $CDDIR/doc -a ! -e $CDDIR/doc/FAQ/html ] ; then echo " Extracting FAQ on CD1" mkdir $CDDIR/doc/FAQ/html cd $CDDIR/doc/FAQ/html -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]