OK, I believe I've covered all of Raphael's changes. This one now
works fine with !complete.

Files:

diff

tools/strip-nonUS-bin

tools/add-bin-doc

-- 
Steve McIntyre, Cambridge, UK.                   [EMAIL PROTECTED]
<a href=http://www.chiark.greenend.org.uk/~damerell/CUWoCS/CUWoCS.html>CUWoCS 
home page</a>                          Cthulhu - Why vote for the Lesser Evil?
"Tongue-tied & twisted, Just an earth-bound misfit, I..."  |Finger for PGP key
? go
? CONF.sh.work
? CONF.sh.home
? non-US.diff
? CONF.sh.steve
? tools/strip-nonUS-bin
? tools/add-bin-doc
? tools/boot/potato/boot-m68k.steve
Index: CONF.sh
===================================================================
RCS file: /cvs/debian-boot/debian-cd/CONF.sh,v
retrieving revision 1.7
diff -u -r1.7 CONF.sh
--- CONF.sh     2000/06/06 17:19:27     1.7
+++ CONF.sh     2000/06/14 07:20:04
@@ -33,6 +33,11 @@
 # Comment the following line if you don't have/want non-US
 #export NONUS=/ftp/debian-non-US
 
+# And this option will make you 2 copies of CD1 - one with all the
+# non-US packages on it, one with none. Useful if you're likely to
+# need both.
+#export FORCENONUSONCD1=1
+
 # Path of the temporary directory
 export TDIR=/ftp/tmp
 
Index: Makefile
===================================================================
RCS file: /cvs/debian-boot/debian-cd/Makefile,v
retrieving revision 1.18
diff -u -r1.18 Makefile
--- Makefile    2000/06/14 04:54:51     1.18
+++ Makefile    2000/06/14 07:20:15
@@ -64,15 +64,22 @@
 mirrorcheck=$(BASEDIR)/tools/mirror_check
 addpackages=$(BASEDIR)/tools/add_packages
 adddirs=$(BASEDIR)/tools/add_dirs
+add_bin_doc=$(BASEDIR)/tools/add-bin-doc
 scanpackages=$(BASEDIR)/tools/scanpackages
 scansources=$(BASEDIR)/tools/scansources
 addfiles=$(BASEDIR)/tools/add_files
 set_mkisofs_opts=$(BASEDIR)/tools/set_mkisofs_opts
+strip_nonus_bin=$(BASEDIR)/tools/strip-nonUS-bin
 
 BDIR=$(TDIR)/$(CODENAME)-$(ARCH)
 ADIR=$(APTTMP)/$(CODENAME)-$(ARCH)
 SDIR=$(TDIR)/$(CODENAME)-src
 
+FIRSTDISKS=CD1 
+ifdef FORCENONUSONCD1
+FIRSTDISKS=CD1 CD1_NONUS
+endif
+
 ## DEBUG STUFF ##
 
 PrintVars:
@@ -119,6 +126,12 @@
 ok=false
 endif
 endif
+# If we have FORCENONUSONCD1 set, we must also have NONUS set
+ifdef FORCENONUSONCD1
+ifndef NONUS
+ok=false
+endif
+endif
 
 default:
        @echo "Please refer to the README file for more information"
@@ -220,7 +233,7 @@
 deletelist: ok
        @-rm $(BDIR)/rawlist
        @-rm $(BDIR)/list
-       
+
 # Generates the list of packages/files to put on each CD
 list: bin-list src-list
 
@@ -229,14 +242,40 @@
 $(BDIR)/1.packages:
        @echo "Dispatching the packages on all the CDs ..."
        @$(list2cds) $(BDIR)/list $(SIZELIMIT)
-       
+ifdef FORCENONUSONCD1
+       @for file in $(BDIR)/*.packages; do \
+           newfile=$${file%%.packages}_NONUS.packages; \
+           cp $$file $$newfile; \
+           $(strip_nonus_bin) $$file $$file.tmp; \
+           if (cmp -s $$file $$file.tmp) ; then \
+               rm -f $$file.tmp $$newfile ; \
+           else \
+               echo Splitting non-US packages: $$file and $$newfile ; \
+               mv -f $$file.tmp $$file; \
+           fi ;\
+       done
+endif
+
 # Generate the listing for sources CDs corresponding to the packages included
 # in the binary set
 src-list: bin-list $(SDIR)/1.sources
 $(SDIR)/1.sources:
        @echo "Dispatching the sources on all the CDs ..."
        @$(cds2src) $(SIZELIMIT)
-       
+ifdef FORCENONUSONCD1
+       @for file in $(SDIR)/*.sources; do \
+           newfile=$${file%%.sources}_NONUS.sources; \
+           cp $$file $$newfile; \
+           grep -v non-US $$file >$$file.tmp; \
+           if (cmp -s $$file $$file.tmp) ; then \
+               rm -f $$file.tmp $$newfile ; \
+           else \
+               echo Splitting non-US sources: $$file and $$newfile ; \
+               mv -f $$file.tmp $$file; \
+           fi ;\
+       done
+endif
+
 # Generate the complete listing of packages from the task
 # Build a nice list without doubles and without spaces
 genlist: ok $(BDIR)/list
@@ -249,90 +288,101 @@
 
 # Build the raw list (cpp output) with doubles and spaces
 $(BDIR)/rawlist:
+ifdef FORCENONUSONCD1
+       @find $(NONUS)/dists/$(CODENAME) | grep binary-.*/.*deb | \
+        sed 's/.*\///g;s/_.*//g' | sort | uniq > $(BDIR)/Debian_$(CODENAME)_nonUS
+endif
        @perl -npe 's/\@ARCH\@/$(ARCH)/g' $(TASK) | \
         cpp -nostdinc -nostdinc++ -P -undef -D ARCH=$(ARCH) -D ARCH_$(ARCH) \
-            -I $(BASEDIR)/tasks - - >> $(BDIR)/rawlist
-
+            -DFORCENONUSONCD1=$(FORCENONUSONCD1) \
+            -I $(BASEDIR)/tasks -I $(BDIR) - - >> $(BDIR)/rawlist
 
 ## DIRECTORIES && PACKAGES && INFOS ##
 
 # Create all the needed directories for installing packages (plus the
 # .disk directory)
 tree: bin-tree src-tree
-bin-tree: ok bin-list $(BDIR)/1/debian
-$(BDIR)/1/debian:
+bin-tree: ok bin-list $(BDIR)/CD1/debian
+$(BDIR)/CD1/debian:
        @echo "Adding the required directories to the binary CDs ..."
        @for i in $(BDIR)/*.packages; do \
                dir=$${i%%.packages}; \
+               dir=$${dir##$(BDIR)/}; \
+               dir=$(BDIR)/CD$$dir; \
                mkdir -p $$dir; \
                $(adddirs) $$dir; \
        done
-src-tree: ok src-list $(SDIR)/1/debian
-$(SDIR)/1/debian:
+
+src-tree: ok src-list $(SDIR)/CD1/debian
+$(SDIR)/CD1/debian:
        @echo "Adding the required directories to the source CDs ..."
        @for i in $(SDIR)/*.sources; do \
                dir=$${i%%.sources}; \
+               dir=$${dir##$(SDIR)/}; \
+               dir=$(SDIR)/CD$$dir; \
                mkdir -p $$dir; \
                $(adddirs) $$dir; \
        done
 
 # CD labels / volume ids / disk info
 infos: bin-infos src-infos
-bin-infos: bin-tree $(BDIR)/1/.disk/info
-$(BDIR)/1/.disk/info:
+bin-infos: bin-tree $(BDIR)/CD1/.disk/info
+$(BDIR)/CD1/.disk/info:
        @echo "Generating the binary CD labels and their volume ids ..."
        @nb=`ls -l $(BDIR)/*.packages | wc -l | tr -d " "`; num=0;\
         DATE=`date +%Y%m%d`; \
        for i in $(BDIR)/*.packages; do \
                num=$${i%%.packages}; num=$${num##$(BDIR)/}; \
-               echo -n $(BINDISKINFO) > $(BDIR)/$$num/.disk/info; \
+               dir=$(BDIR)/CD$$num; \
+               echo -n $(BINDISKINFO) | sed 's/_NONUS//g' > $$dir/.disk/info; \
                echo '#define DISKNAME ' $(BINDISKINFOND) \
-                                       > $(BDIR)/$$num/README.diskdefines; \
+                                       > $$dir/README.diskdefines; \
                echo '#define TYPE  binary' \
-                                       >> $(BDIR)/$$num/README.diskdefines; \
+                                       >> $$dir/README.diskdefines; \
                echo '#define TYPEbinary  1' \
-                                       >> $(BDIR)/$$num/README.diskdefines; \
+                                       >> $$dir/README.diskdefines; \
                echo '#define ARCH ' $(ARCH) \
-                                       >> $(BDIR)/$$num/README.diskdefines; \
+                                       >> $$dir/README.diskdefines; \
                echo '#define ARCH'$(ARCH) ' 1' \
-                                       >> $(BDIR)/$$num/README.diskdefines; \
+                                       >> $$dir/README.diskdefines; \
                echo '#define DISKNUM ' $$num \
-                                       >> $(BDIR)/$$num/README.diskdefines; \
+                                       >> $$dir/README.diskdefines; \
                echo '#define DISKNUM'$$num ' 1' \
-                                       >> $(BDIR)/$$num/README.diskdefines; \
+                                       >> $$dir/README.diskdefines; \
                echo '#define TOTALNUM ' $$nb \
-                                       >> $(BDIR)/$$num/README.diskdefines; \
+                                       >> $$dir/README.diskdefines; \
                echo '#define TOTALNUM'$$nb ' 1' \
-                                       >> $(BDIR)/$$num/README.diskdefines; \
+                                       >> $$dir/README.diskdefines; \
                echo -n $(BINVOLID) > $(BDIR)/$${num}.volid; \
                $(set_mkisofs_opts) bin $$num > $(BDIR)/$${num}.mkisofs_opts; \
        done
-src-infos: src-tree $(SDIR)/1/.disk/info
-$(SDIR)/1/.disk/info:
+src-infos: src-tree $(SDIR)/CD1/.disk/info
+$(SDIR)/CD1/.disk/info:
        @echo "Generating the source CD labels and their volume ids ..."
        @nb=`ls -l $(SDIR)/*.sources | wc -l | tr -d " "`; num=0;\
         DATE=`date +%Y%m%d`; \
        for i in $(SDIR)/*.sources; do \
                num=$${i%%.sources}; num=$${num##$(SDIR)/}; \
-               echo -n $(SRCDISKINFO) > $(SDIR)/$$num/.disk/info; \
+               dir=$(SDIR)/CD$$num; \
+               echo -n $(SRCDISKINFO) | sed 's/_NONUS//g' > $$dir/.disk/info; \
                echo '#define DISKNAME ' $(SRCDISKINFOND) \
-                                       > $(SDIR)/$$num/README.diskdefines; \
+                                       > $$dir/README.diskdefines; \
                echo '#define TYPE  source' \
-                                       >> $(SDIR)/$$num/README.diskdefines; \
+                                       >> $$dir/README.diskdefines; \
                echo '#define TYPEsource  1' \
-                                       >> $(SDIR)/$$num/README.diskdefines; \
+                                       >> $$dir/README.diskdefines; \
                echo '#define ARCH ' $(ARCH) \
-                                       >> $(SDIR)/$$num/README.diskdefines; \
+                                       >> $$dir/README.diskdefines; \
                echo '#define ARCH'$(ARCH) ' 1' \
-                                       >> $(SDIR)/$$num/README.diskdefines; \
+                                       >> $$dir/README.diskdefines; \
                echo '#define DISKNUM ' $$num \
-                                       >> $(SDIR)/$$num/README.diskdefines; \
+                                       >> $$dir/README.diskdefines; \
                echo '#define DISKNUM'$$num ' 1' \
-                                       >> $(SDIR)/$$num/README.diskdefines; \
+                                       >> $$dir/README.diskdefines; \
                echo '#define TOTALNUM ' $$nb \
-                                       >> $(SDIR)/$$num/README.diskdefines; \
+                                       >> $$dir/README.diskdefines; \
                echo '#define TOTALNUM'$$nb ' 1' \
-                                       >> $(SDIR)/$$num/README.diskdefines; \
+                                       >> $$dir/README.diskdefines; \
                echo -n $(SRCVOLID) > $(SDIR)/$${num}.volid; \
                $(set_mkisofs_opts) src $$num > $(SDIR)/$${num}.mkisofs_opts; \
        done
@@ -344,6 +394,7 @@
        @for i in $(BDIR)/*.packages; do \
                dir=$${i%%.packages}; \
                n=$${dir##$(BDIR)/}; \
+               dir=$(BDIR)/CD$$n; \
                echo "$$n ... "; \
                cat $$i | xargs -n 200 -r $(addpackages) $$dir; \
                if [ -x "$(HOOK)" ]; then \
@@ -355,6 +406,8 @@
        @#Now install the Packages and Packages.cd files
        @for i in $(BDIR)/*.packages; do \
                dir=$${i%%.packages}; \
+               dir=$${dir##$(BDIR)/}; \
+               dir=$(BDIR)/CD$$dir; \
                $(scanpackages) install $$dir; \
        done
        @touch $(BDIR)/packages-stamp
@@ -365,6 +418,7 @@
        @for i in $(SDIR)/*.sources; do \
                dir=$${i%%.sources}; \
                n=$${dir##$(SDIR)/}; \
+               dir=$(SDIR)/CD$$n; \
                echo -n "$$n ... "; \
                grep -v "non-US/" $$i | xargs $(addfiles) $$dir $(MIRROR); \
                if [ -n "$(NONUS)" ]; then \
@@ -384,6 +438,7 @@
        @for file in $(BDIR)/*.packages; do \
                dir=$${file%%.packages}; \
                n=$${dir##$(BDIR)/}; \
+               dir=$(BDIR)/CD$$n; \
                if [ -f $(BASEDIR)/tools/boot/$(CODENAME)/boot-$(ARCH) ]; then \
                        cd $(BDIR); \
                        $(BASEDIR)/tools/boot/$(CODENAME)/boot-$(ARCH) $$n $$dir; \
@@ -396,57 +451,21 @@
 
 # Add the doc files to the CDs and the Release-Notes and the
 # Contents-$(ARCH).gz files
-bin-doc: ok bin-infos $(BDIR)/1/doc
-$(BDIR)/1/doc:
+bin-doc: ok bin-infos $(BDIR)/CD1/doc
+$(BDIR)/CD1/doc:
        @echo "Adding the documentation (bin) ..."
-       @$(addfiles) $(BDIR)/1 $(MIRROR) doc; 
-       @for i in $(BDIR)/*.packages; do \
-               dir=$${i%%.packages}; \
-               cp -d $(MIRROR)/README* $$dir/; \
-               rm -f $$dir/README $$dir/README.1ST \
-                       $$dir/README.CD-manufacture $$dir/README.multicd \
-                       $$dir/README.pgp ; \
-               cpp -traditional -undef -P -C -Wall -nostdinc -I $$dir/ \
-                   -D OUTPUTtext $(BASEDIR)/data/$(CODENAME)/README.html.in \
-                       | sed -e 's/%%.//g' > $$dir/README.html ; \
-               lynx -dump -force_html $$dir/README.html | todos \
-                       > $$dir/README.txt ; \
-               cpp -traditional -undef -P -C -Wall -nostdinc -I $$dir/ \
-                   -D OUTPUThtml $(BASEDIR)/data/$(CODENAME)/README.html.in \
-                       | sed -e 's/%%.//g' > $$dir/README.html ; \
-               rm -f $$dir/README.diskdefines ; \
-               mkdir -p $$dir/pics ; \
-               cp $(BASEDIR)/data/pics/*.jpg $$dir/pics/ ; \
-               if [ -e $(MIRROR)/dists/$(CODENAME)/main/Release-Notes ]; then \
-                  cp $(MIRROR)/dists/$(CODENAME)/main/Release-Notes $$dir/; \
-               fi; \
-               cp $(MIRROR)/dists/$(CODENAME)/Contents-$(ARCH).gz \
-                  $$dir/dists/$(CODENAME)/; \
-               if [ -n "$(NONUS)" ]; then \
-                  cp $(NONUS)/dists/$(CODENAME)/non-US/Contents-$(ARCH).gz \
-                     $$dir/dists/$(CODENAME)/non-US/; \
-               fi; \
-               if [ -e $(BASEDIR)/data/$(CODENAME)/README.$(ARCH) ]; then \
-                 cp $(BASEDIR)/data/$(CODENAME)/README.$(ARCH) $$dir/; \
-               fi; \
-               if [ -e $(BASEDIR)/data/$(CODENAME)/README.1ST.$(ARCH) ]; then \
-                 echo "This disc is labelled :" > $$dir/README.1ST; \
-                 cat $$dir/.disk/info >>$$dir/README.1ST; \
-                 echo -e "\n\n" >>$$dir/README.1ST; \
-                 cat $(BASEDIR)/data/$(CODENAME)/README.1ST.$(ARCH) \
-                   >> $$dir/README.1ST; \
-                 todos $$dir/README.1ST; \
-               fi; \
-               if [ -e $(BASEDIR)/data/$(CODENAME)/README.multicd ]; then \
-                 cp $(BASEDIR)/data/$(CODENAME)/README.multicd $$dir/; \
-               fi; \
+       @for DISK in $(FIRSTDISKS) ; do \
+               $(addfiles) $(BDIR)/$$DISK $(MIRROR) doc; \
        done
+       @$(add_bin_doc) # Common stuff for all disks
 
-src-doc: ok src-infos $(SDIR)/1/README.html
-$(SDIR)/1/README.html:
+src-doc: ok src-infos $(SDIR)/CD1/README.html
+$(SDIR)/CD1/README.html:
        @echo "Adding the documentation (src) ..."
        @for i in $(SDIR)/*.sources; do \
                dir=$${i%%.sources}; \
+               dir=$${dir##$(SDIR)/}; \
+               dir=$(SDIR)/CD$$dir; \
                cp -d $(MIRROR)/README* $$dir/; \
                rm -f $$dir/README $$dir/README.1ST \
                        $$dir/README.CD-manufacture $$dir/README.multicd \
@@ -465,35 +484,37 @@
        done
 
 # Add the install stuff on the first CD
-installtools: ok bin-doc disks $(BDIR)/1/tools
-$(BDIR)/1/tools:
+installtools: ok bin-doc disks $(BDIR)/CD1/tools
+$(BDIR)/CD1/tools:
        @echo "Adding install tools and documentation ..."
-       @$(addfiles) $(BDIR)/1 $(MIRROR) tools
-       @mkdir $(BDIR)/1/install
-       @if [ -x "$(BASEDIR)/tools/$(CODENAME)/installtools.sh" ]; then \
-               $(BASEDIR)/tools/$(CODENAME)/installtools.sh; \
-        fi
+       @for DISK in $(FIRSTDISKS) ; do \
+               $(addfiles) $(BDIR)/$$DISK $(MIRROR) tools ; \
+               mkdir $(BDIR)/$$DISK/install ; \
+               if [ -x "$(BASEDIR)/tools/$(CODENAME)/installtools.sh" ]; then \
+                       $(BASEDIR)/tools/$(CODENAME)/installtools.sh $(BDIR)/$$DISK ; \
+               fi ; \
+       done
 
 # Add the disks-arch directories where needed
-disks: ok bin-infos $(BDIR)/1/dists/$(CODENAME)/main/disks-$(ARCH)
-$(BDIR)/1/dists/$(CODENAME)/main/disks-$(ARCH):
+disks: ok bin-infos $(BDIR)/CD1/dists/$(CODENAME)/main/disks-$(ARCH)
+$(BDIR)/CD1/dists/$(CODENAME)/main/disks-$(ARCH):
        @echo "Adding disks-$(ARCH) stuff ..."
-       @mkdir -p \
-           $(BDIR)/1/dists/$(CODENAME)/main/disks-$(ARCH)
-       @$(addfiles) \
-         $(BDIR)/1/dists/$(CODENAME)/main/disks-$(ARCH) \
-         $(BOOTDISKS) .
-       @#Keep only one copy of the disks stuff
-       @cd $(BDIR)/1/dists/$(CODENAME)/main/disks-$(ARCH); \
-       if [ "$(SYMLINK)" != "" ]; then exit 0; fi; \
-       if [ -L current ]; then \
-               CURRENT_LINK=`ls -l current | awk '{print $$11}'`; \
-               mv $$CURRENT_LINK .tmp_link; \
-               rm -rf [0123456789]*; \
-               mv .tmp_link $$CURRENT_LINK; \
-       elif [ -d current ]; then \
-               rm -rf [0123456789]*; \
-       fi;
+       @for DISK in $(FIRSTDISKS) ; do \
+               mkdir -p $(BDIR)/$$DISK/dists/$(CODENAME)/main/disks-$(ARCH) ; \
+               $(addfiles) \
+               $(BDIR)/$$DISK/dists/$(CODENAME)/main/disks-$(ARCH) \
+               $(BOOTDISKS) . ; \
+               cd $(BDIR)/$$DISK/dists/$(CODENAME)/main/disks-$(ARCH); \
+               if [ "$(SYMLINK)" != "" ]; then exit 0; fi; \
+               if [ -L current ]; then \
+                       CURRENT_LINK=`ls -l current | awk '{print $$11}'`; \
+                       mv $$CURRENT_LINK .tmp_link; \
+                       rm -rf [0123456789]*; \
+                       mv .tmp_link $$CURRENT_LINK; \
+               elif [ -d current ]; then \
+                       rm -rf [0123456789]*; \
+               fi; \
+       done
 
 upgrade: ok bin-infos $(BDIR)/upgrade-stamp
 $(BDIR)/upgrade-stamp:
@@ -540,23 +561,26 @@
 
 # Generate a md5sum.txt file listings all files on the CD
 md5list: bin-md5list src-md5list
-bin-md5list: ok packages $(BDIR)/1/md5sum.txt
-$(BDIR)/1/md5sum.txt:
+bin-md5list: ok packages $(BDIR)/CD1/md5sum.txt
+$(BDIR)/CD1/md5sum.txt:
        @echo "Generating md5sum of files from all the binary CDs ..."
        @for file in $(BDIR)/*.packages; do \
                dir=$${file%%.packages}; \
                n=$${dir##$(BDIR)/}; \
+               dir=$(BDIR)/CD$$n; \
                test -x "$(HOOK)" && cd $(BDIR) && $(HOOK) $$n before-mkisofs; \
                cd $$dir; \
                find . -follow -type f | grep -v "\./md5sum" | grep -v \
                "dists/stable" | grep -v "dists/frozen" | \
                grep -v "dists/unstable" | xargs md5sum > md5sum.txt ; \
        done
-src-md5list: ok sources $(SDIR)/1/md5sum.txt
-$(SDIR)/1/md5sum.txt:
+src-md5list: ok sources $(SDIR)/CD1/md5sum.txt
+$(SDIR)/CD1/md5sum.txt:
        @echo "Generating md5sum of files from all the source CDs ..."
        @for file in $(SDIR)/*.sources; do \
                dir=$${file%%.sources}; \
+               dir=$${dir##$(SDIR)/}; \
+               dir=$(SDIR)/CD$$dir; \
                cd $$dir; \
                find . -follow -type f | grep -v "\./md5sum" | grep -v \
                "dists/stable" | grep -v "dists/frozen" | \
@@ -570,12 +594,13 @@
        @for file in $(BDIR)/*.packages; do \
                dir=$${file%%.packages}; \
                n=$${dir##$(BDIR)/}; \
+               dir=$(BDIR)/CD$$n; \
                cd $$dir/..; \
-               opts=`cat $$dir.mkisofs_opts`; \
-               volid=`cat $$dir.volid`; \
+               opts=`cat $(BDIR)/$$n.mkisofs_opts`; \
+               volid=`cat $(BDIR)/$$n.volid`; \
                rm -f $(OUT)/$(CODENAME)-$(ARCH)-$$n.raw; \
                $(MKISOFS) $(MKISOFS_OPTS) -V "$$volid" \
-                 -o $(OUT)/$(CODENAME)-$(ARCH)-$$n.raw $$opts $$n ; \
+                 -o $(OUT)/$(CODENAME)-$(ARCH)-$$n.raw $$opts CD$$n ; \
                if [ -f $(BASEDIR)/tools/boot/$(CODENAME)/post-boot-$(ARCH) ]; then \
                        $(BASEDIR)/tools/boot/$(CODENAME)/post-boot-$(ARCH) $$n $$dir \
                         $(OUT)/$(CODENAME)-$(ARCH)-$$n.raw; \
@@ -586,12 +611,13 @@
        @for file in $(SDIR)/*.sources; do \
                dir=$${file%%.sources}; \
                n=$${dir##$(SDIR)/}; \
+               dir=$(SDIR)/CD$$n; \
                cd $$dir/..; \
-               opts=`cat $$dir.mkisofs_opts`; \
-               volid=`cat $$dir.volid`; \
+               opts=`cat $(SDIR)/$$n.mkisofs_opts`; \
+               volid=`cat $(SDIR)/$$n.volid`; \
                rm -f $(OUT)/$(CODENAME)-src-$$n.raw; \
                $(MKISOFS) $(MKISOFS_OPTS) -V "$$volid" \
-                 -o $(OUT)/$(CODENAME)-src-$$n.raw $$opts $$n ; \
+                 -o $(OUT)/$(CODENAME)-src-$$n.raw $$opts CD$$n ; \
        done
 
 # Generate the *.list files for the Pseudo Image Kit
@@ -606,15 +632,15 @@
 bin-image: ok bin-md5list $(OUT)
        @echo "Generating the binary iso image n�$(CD) ..."
        @test -n "$(CD)" || (echo "Give me a CD=<num> parameter !" && false)
-       @dir=$(BDIR)/$(CD); cd $(BDIR); opts=`cat $$dir.mkisofs_opts`; \
-        volid=`cat $$dir.volid`; rm -f $(OUT)/$(CODENAME)-$(ARCH)-$(CD).raw; \
+       cd $(BDIR); opts=`cat $(CD).mkisofs_opts`; \
+        volid=`cat $(CD).volid`; rm -f $(OUT)/$(CODENAME)-$(ARCH)-$(CD).raw; \
          $(MKISOFS) $(MKISOFS_OPTS) -V "$$volid" \
          -o $(OUT)/$(CODENAME)-$(ARCH)-$(CD).raw $$opts $(CD)
 src-image: ok src-md5list $(OUT)
        @echo "Generating the source iso image n�$(CD) ..."
        @test -n "$(CD)" || (echo "Give me a CD=<num> parameter !" && false)
-       @dir=$(SDIR)/$(CD); cd $(SDIR); opts=`cat $$dir.mkisofs_opts`; \
-        volid=`cat $$dir.volid`; rm -f $(OUT)/$(CODENAME)-src-$(CD).raw; \
+       cd $(SDIR); opts=`cat $(CD).mkisofs_opts`; \
+        volid=`cat $(CD).volid`; rm -f $(OUT)/$(CODENAME)-src-$(CD).raw; \
          $(MKISOFS) $(MKISOFS_OPTS) -V "$$volid" \
          -o $(OUT)/$(CODENAME)-src-$(CD).raw $$opts $(CD)
 
Index: README
===================================================================
RCS file: /cvs/debian-boot/debian-cd/README,v
retrieving revision 1.12
diff -u -r1.12 README
--- README      2000/06/06 17:19:27     1.12
+++ README      2000/06/14 07:20:20
@@ -100,6 +100,12 @@
   - if NONUS is set, then packages from non-US will be allowed (remember
     that the value of NONUS must be the path to the non-US mirror
     if you have one)
+  - if FORCENONUSONCD1 is set also, then packages will be
+    rearranged so that non-US packages are all on CD#1. This
+    includes the non-free ones if you specify NONFREE. Then 2 separate
+    copies of CD#1 will be produced, identical in every respect except
+    for the inclusion/lack of non-US packages. The same happens for
+    the source CDs when they are built.
   - if NONFREE is set, then packages from non-free will be allowed
     (NONFREE must be exported to all sub-shells)
   - if EXTRANONFREE is set, then non-free packages will be included
Index: tasks/Debian_potato
===================================================================
RCS file: /cvs/debian-boot/debian-cd/tasks/Debian_potato,v
retrieving revision 1.5
diff -u -r1.5 Debian_potato
--- tasks/Debian_potato 2000/05/30 11:13:10     1.5
+++ tasks/Debian_potato 2000/06/14 07:20:20
@@ -7,6 +7,10 @@
 /* The potato CD set does now use empty package called task-*
    to select the packages in the initial installation */
 
+#if (FORCENONUSONCD1 == 1)
+#include "Debian_potato_nonUS"
+#endif
+
 task-dialup
 task-dialup-isdn
 task-newbie-help
Index: tools/add_files
===================================================================
RCS file: /cvs/debian-boot/debian-cd/tools/add_files,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 add_files
--- tools/add_files     1999/11/11 17:10:41     1.1.1.1
+++ tools/add_files     2000/06/14 07:20:27
@@ -1,7 +1,7 @@
 #!/usr/bin/perl -w
 
 # First arg, the root of the destination
-# Second arg, the roof of the source
+# Second arg, the root of the source
 # Other args, the directories/files to copy (relative to the root source)
 
 use strict;
Index: tools/cds2src
===================================================================
RCS file: /cvs/debian-boot/debian-cd/tools/cds2src,v
retrieving revision 1.6
diff -u -r1.6 cds2src
--- tools/cds2src       2000/06/07 00:28:28     1.6
+++ tools/cds2src       2000/06/14 07:20:29
@@ -17,6 +17,7 @@
 my $nonfree = $ENV{'NONFREE'} || 0;
 my $extranonfree = $ENV{'EXTRANONFREE'} || 0;
 my $nonus = $ENV{'NONUS'} || 0;
+my $forcenonusoncd1 = $ENV{'FORCENONUSONCD1'} || 0;
 my $complete = $ENV{'COMPLETE'} || 0;
 my $local = $ENV{'LOCAL'} || 0;
 
@@ -44,6 +45,8 @@
 my %sources;
 my %included;
 my %excluded;
+my @nonuslist=();
+my %includesrc;
 
 # Get the information from the good Sources.gz files
 my @SOURCES = ("$mirror/dists/$codename/main/source/Sources.gz",
@@ -85,7 +88,7 @@
        next if not m/^Package: (\S+)\s*$/m;
        $p = $1;
        $included{$p} = 0;
-        $sources{$p}{"Package"} = $p;
+       $sources{$p}{"Package"} = $p;
        foreach $re (qw/Binary Version Section Directory/) {
                (m/^$re: (.*?)\s*$/m and $sources{$p}{$re} = $1)
                || msg(1, "Header field '$re' missing for source '$p'\n");
@@ -102,6 +105,11 @@
        } else {
                $excluded{$p} = 0;
        }
+       # Generate the list of non-US source packages
+       if (($sources{$p}{"Directory"} =~ /non-US/)) 
+       {
+           push @nonuslist, $p;
+       }
        # Match between source & binary packages
        foreach $bin (split (/,\s+/, $sources{$p}{"Binary"})) {
                $bin2src{$bin} = $p;
@@ -126,20 +134,62 @@
 # Get the list of included packages
 my @list = ();
 my $i = 1;
+my $infile;
 while (-e "$bdir/$i.packages") {
-       open (LIST, "< $bdir/$i.packages") || die "Can't open $file ...\n";
-       while (defined($_ = <LIST>)) {
-               chomp;
-               push @list, $_;
-       }
-       close LIST;
-       $i++;
+    my $nonusfile = sprintf("%s/%d_NONUS.packages", $bdir, $i);
+    if(-e "$nonusfile") {
+        $infile = $nonusfile;
+    } else {
+        $infile = "$bdir/$i.packages";
+    }
+
+    print "Using package file $infile\n";
+    open (LIST, "< $infile") || die "Can't open $infile ...\n";
+
+    while (defined($_ = <LIST>)) {
+        chomp;
+        push @list, $_;
+    }
+    close LIST;
+    $i++;
 }
 msg(0, "ERROR: No source packages for the CD !\n") if not @list;
 
 # Calculate what files go on which CD
 my (%cds);
 my ($cd, $cd_size, $total_size, $src) = (1, 0, 0);
+
+# Add non-US stuff to CD#1 first if we have been asked to...
+# "complete" means also add non-US sources that don't have binary packages...
+if($forcenonusoncd1) {
+    if(!$complete) {
+        foreach (@list) {
+         if(not exists $bin2src{$_}) {
+             next;
+         }
+         $includesrc{$bin2src{$_}} = 1;
+        }
+    }
+
+    foreach (@nonuslist) {
+        if($complete or $includesrc{$_}) {
+         msg(1, "Asked to add non-US source $_ to source CD#1\n");
+         $src = $_;
+        }
+        if (not exists $included{$src}) {
+         msg(0, "ERROR: Non-US source `$src' does not exist ... (ignored)\n");
+         next;
+        }
+        if($excluded{$src}) {
+         msg(1, "...but not doing so - $excluded{$src}\n");
+         next;
+        }
+        next if $included{$src};
+        add_src ($src);
+    }
+}
+
+# And then the rest
 foreach $p (@list) {
        if (not exists $bin2src{$p}) {
                msg(1, "WARNING: Package `$p' has no sources ... (ignored)\n");
@@ -155,6 +205,7 @@
        add_src ($src);
 }
 
+# And now any remaining sources that don't have binary packages
 if ($complete) {
     msg(0, "Now we'll add the sources not yet included ...\n");
     foreach $p (sort { ($sources{$a}{"Section"} cmp $sources{$b}{"Section"})
Index: tools/list2cds
===================================================================
RCS file: /cvs/debian-boot/debian-cd/tools/list2cds,v
retrieving revision 1.6
diff -u -r1.6 list2cds
--- tools/list2cds      2000/06/06 17:19:27     1.6
+++ tools/list2cds      2000/06/14 07:20:34
@@ -17,6 +17,7 @@
 my $nonfree = $ENV{'NONFREE'} || 0;
 my $extranonfree = $ENV{'EXTRANONFREE'} || 0;
 my $nonus = $ENV{'NONUS'} || 0;
+my $forcenonusoncd1 = $ENV{'FORCENONUSONCD1'} || 0;
 my $local = $ENV{'LOCAL'} || 0;
 my $complete = $ENV{'COMPLETE'} || 0;
 my $exclude = $ENV{'EXCLUDE'} || "$list.exclude";
Index: tools/scanpackages
===================================================================
RCS file: /cvs/debian-boot/debian-cd/tools/scanpackages,v
retrieving revision 1.3
diff -u -r1.3 scanpackages
--- tools/scanpackages  2000/06/06 17:19:27     1.3
+++ tools/scanpackages  2000/06/14 07:20:36
@@ -9,8 +9,12 @@
 
 #set -e
 
-PREFIX=$2
+BDIR=$TDIR/$CODENAME-$ARCH
+
+PREFIX=`echo $2 | sed "s?$BDIR/CD?$BDIR/?"`
+
 NUM=${PREFIX##$TDIR/$CODENAME-$ARCH/}
+NUM=`echo $NUM | sed 's/_NONUS//g'`
 if [ -n "$NONFREE" -o -n "$EXTRANONFREE" ]; then
   SECTIONS="main contrib non-free"
 else
@@ -42,7 +46,10 @@
        fi
        # Install the Packages.cd and Packages.cd.gz files
        # Each CD know about all prior CDs
-       for i in $TDIR/$CODENAME-$ARCH/*.packages; do
+       # We use "?.packages" here so that we always use US-safe
+       # packages files only - we don't want later (supposedly
+       # common) CDs having dependencies on a non-US CD#1...
+       for i in $TDIR/$CODENAME-$ARCH/?.packages; do
                dir=${i%%.packages}
                n=${dir##$TDIR/$CODENAME-$ARCH/}
                if [ $n -le $NUM ]; then
Index: tools/boot/potato/boot-alpha
===================================================================
RCS file: /cvs/debian-boot/debian-cd/tools/boot/potato/boot-alpha,v
retrieving revision 1.3
diff -u -r1.3 boot-alpha
--- tools/boot/potato/boot-alpha        2000/06/11 13:12:55     1.3
+++ tools/boot/potato/boot-alpha        2000/06/14 07:20:37
@@ -17,8 +17,7 @@
 cd $CDDIR/..
 
 # Only disc 1 bootable
-
-if [ $N != 1 ]; then 
+if [ $N != 1 -a $N != 1_NONUS ]; then 
        echo "-J" > $N.mkisofs_opts
        exit 0; 
 fi
@@ -26,20 +25,20 @@
 # Hack for bootable disks
 mkdir -p boot1/boot
 
-echo -n "-J boot1" > 1.mkisofs_opts
+echo -n "-J boot1" > $N.mkisofs_opts
 
 # Use the generic linux image
-cp $CDDIR/dists/stable/main/disks-$ARCH/current/linux \
+cp -f $CDDIR/dists/stable/main/disks-$ARCH/current/linux \
        boot1/boot/linux
 
 # Copy over the subarch boot-loaders
 mkdir boot1/milo
-cp $CDDIR/dists/stable/main/disks-$ARCH/current/MILO/* \
+cp -f $CDDIR/dists/stable/main/disks-$ARCH/current/MILO/* \
        boot1/milo/
 
 # Now the APB stuff
 mkdir boot1/apb
-cp $CDDIR/dists/stable/main/disks-$ARCH/current/APB/* \
+cp -f $CDDIR/dists/stable/main/disks-$ARCH/current/APB/* \
        boot1/apb/
 
 mkdir $CDDIR/tools/rawrite1
@@ -57,7 +56,7 @@
    echo "         rawrite 2.0 is much faster, but it locks up on some machines";\
    ) |todos > $CDDIR/tools/README.tools
 
-cp $CDDIR/tools/rawrite1/rawrite3.com $CDDIR/install/rw1_3.com
-cp $CDDIR/tools/rawrite2/rawrite2.exe $CDDIR/install/rw2_0.exe
+cp -f $CDDIR/tools/rawrite1/rawrite3.com $CDDIR/install/rw1_3.com
+cp -f $CDDIR/tools/rawrite2/rawrite2.exe $CDDIR/install/rw2_0.exe
 
 exit 0
Index: tools/boot/potato/boot-i386
===================================================================
RCS file: /cvs/debian-boot/debian-cd/tools/boot/potato/boot-i386,v
retrieving revision 1.8
diff -u -r1.8 boot-i386
--- tools/boot/potato/boot-i386 2000/03/25 15:37:19     1.8
+++ tools/boot/potato/boot-i386 2000/06/14 07:20:37
@@ -24,18 +24,18 @@
 # Compact image for disk 2
 if [ $N == 2 ]; then
        :> 2.mkisofs_opts
-       if [ -e 
1/dists/$CODENAME/main/disks-$ARCH/current/images-2.88/compact/rescue.bin ] 
+       if [ -e 
+CD1/dists/$CODENAME/main/disks-$ARCH/current/images-2.88/compact/rescue.bin ] 
        then
          mkdir -p boot2/boot
-         cp 1/dists/$CODENAME/main/disks-$ARCH/current/images-2.88/compact/rescue.bin 
boot2/boot/
+         cp -f 
+CD1/dists/$CODENAME/main/disks-$ARCH/current/images-2.88/compact/rescue.bin 
+boot2/boot/
          echo -n "-J -b boot/rescue.bin -c boot/boot.catalog boot2" \
                        > 2.mkisofs_opts
        fi
        exit 0;
 fi
 
-# Disks != 1 and not 2
-if [ $N != 1 ]; then 
+# Disks != 1* and not 2
+if [ $N != 1 -a $N != 1_NONUS ]; then 
        echo -n "-J" > $N.mkisofs_opts
        exit 0; 
 fi
@@ -43,12 +43,12 @@
 # Now we do disk 1 ...
 # couple of changes for 2.2.x bootdisks 27-dec-99 -- jwest
 
-echo -n "-J -b boot/rescue.bin -c boot/boot.catalog boot1" > 1.mkisofs_opts
+echo -n "-J -b boot/rescue.bin -c boot/boot.catalog boot1" > $N.mkisofs_opts
 
 (cd $CDDIR/dists/$CODENAME/main/disks-$ARCH/current/ ; \
-       cp images-1.44/resc*.bin  $CDDIR/install ; \
-       cp linux  $CDDIR/install ; \
-       cp images-1.44/root.bin $CDDIR/install )
+       cp -f images-1.44/resc*.bin  $CDDIR/install ; \
+       cp -f linux  $CDDIR/install ; \
+       cp -f images-1.44/root.bin $CDDIR/install )
 
 mkdir -p boot1/boot
 
@@ -64,12 +64,12 @@
 #      rm /tmp/root.bin.uncompressed  )
 ## end notes
 
-cp $CDDIR/dists/$CODENAME/main/disks-$ARCH/current/images-2.88/rescue.bin boot1/boot
+cp -f $CDDIR/dists/$CODENAME/main/disks-$ARCH/current/images-2.88/rescue.bin 
+boot1/boot
 
 
 #Extracting tools for disc 1
 
-cp $CDDIR/dists/$CODENAME/main/disks-$ARCH/current/dosutils/* $CDDIR/install/
+cp -f $CDDIR/dists/$CODENAME/main/disks-$ARCH/current/dosutils/* $CDDIR/install/
 
 (echo "Tools for DOS :" ; \
        echo "lodlin/         load Linux kernel from DOS" ;\
Index: tools/boot/potato/boot-m68k
===================================================================
RCS file: /cvs/debian-boot/debian-cd/tools/boot/potato/boot-m68k,v
retrieving revision 1.4
diff -u -r1.4 boot-m68k
--- tools/boot/potato/boot-m68k 2000/06/13 14:01:14     1.4
+++ tools/boot/potato/boot-m68k 2000/06/14 07:20:38
@@ -49,13 +49,13 @@
        > $N.mkisofs_opts
 
 # Only disk 1 bootable
-if [ $N != 1 ]; then
+if [ $N != 1 -a $N != 1_NONUS ]; then
        exit 0
 fi
 
 # Put CD boot image    into place
 mkdir -p boot1/boot
-cp $DISKSROOT/bvme6000/images-2.88/rescue.bin boot1/boot
+cp -f $DISKSROOT/bvme6000/images-2.88/rescue.bin boot1/boot
 
 echo -n " -b boot/rescue.bin -c boot/boot.catalog boot1" \
        >> $N.mkisofs_opts
@@ -64,8 +64,8 @@
 cd $CDDIR/install
 
 # Tools
-cp $DISKSROOT/rawrite2.exe $CDDIR/install
-cp $DISKSROOT/rawwrite.ttp $CDDIR/install
+cp -f $DISKSROOT/rawrite2.exe $CDDIR/install
+cp -f $DISKSROOT/rawwrite.ttp $CDDIR/install
 
 for TYPE in amiga atari bvme6000 mac mvme16x
 do
@@ -74,57 +74,57 @@
            mkdir -p $TYPE/images-1.44
        fi
 
-       cp $DISKSROOT/$TYPE/images-1.44/* $TYPE/images-1.44
+       cp -f $DISKSROOT/$TYPE/images-1.44/* $TYPE/images-1.44
 done
 
 # Atari extras
 D=atari
 S=$DISKSROOT/$D
-cp $S/bootargs          $D
-cp $S/bootstra.prg      $D
-cp $S/install.doc       $D
-cp $S/linux             $D
-cp $S/root.bin          $D
+cp -f $S/bootargs          $D
+cp -f $S/bootstra.prg      $D
+cp -f $S/install.doc       $D
+cp -f $S/linux             $D
+cp -f $S/root.bin          $D
 
 # Amiga extras
 D=amiga
 S=$DISKSROOT/$D
-cp $S/ReadMe_First*     $D
-cp $S/StartInstall*     $D
-cp $S/*.txt             $D
-cp $S/*.txt.info        $D
-cp $S/install.*         $D
-cp $S/linux             $D
-cp $S/root.bin          $D
-cp $S/amiboot-5.6       $D
+cp -f $S/ReadMe_First*     $D
+cp -f $S/StartInstall*     $D
+cp -f $S/*.txt             $D
+cp -f $S/*.txt.info        $D
+cp -f $S/install.*         $D
+cp -f $S/linux             $D
+cp -f $S/root.bin          $D
+cp -f $S/amiboot-5.6       $D
 # Needs to be executable
 chmod a+x $D/amiboot-5.6
-cp $DISKSROOT/amiga.info     $CDDIR/install
-cp $DISKSROOT/amiga.info     $CDDIR/install.info
+cp -f $DISKSROOT/amiga.info     $CDDIR/install
+cp -f $DISKSROOT/amiga.info     $CDDIR/install.info
 
 # BVME6000 extras
 D=bvme6000
 S=$DISKSROOT/$D
-cp $S/linuxbvme6000     $D
-cp $S/rootbvme6000.bin  $D
-cp $S/tftplilo.*        $D
-cp $S/install.txt       $D
-cp $S/bvmbug*           $D
+cp -f $S/linuxbvme6000     $D
+cp -f $S/rootbvme6000.bin  $D
+cp -f $S/tftplilo.*        $D
+cp -f $S/install.txt       $D
+cp -f $S/bvmbug*           $D
 
 # MVME16x extras
 D=mvme16x
 S=$DISKSROOT/$D
-cp $S/linuxmvme16x      $D
-cp $S/rootmvme16x.bin   $D
-cp $S/tftplilo.*        $D
-cp $S/install.txt       $D
+cp -f $S/linuxmvme16x      $D
+cp -f $S/rootmvme16x.bin   $D
+cp -f $S/tftplilo.*        $D
+cp -f $S/install.txt       $D
 
 # Mac extras
 D=mac
 S=$DISKSROOT/$D
-cp $S/linux             $D
-cp $S/root.bin          $D
-cp $S/*.img             $D
-cp $S/install/*         $D
+cp -f $S/linux             $D
+cp -f $S/root.bin          $D
+cp -f $S/*.img             $D
+cp -f $S/install/*         $D
  
 ##-----------------------------< end of file >------------------------------##
Index: tools/boot/potato/boot-powerpc
===================================================================
RCS file: /cvs/debian-boot/debian-cd/tools/boot/potato/boot-powerpc,v
retrieving revision 1.7
diff -u -r1.7 boot-powerpc
--- tools/boot/potato/boot-powerpc      2000/05/03 18:48:13     1.7
+++ tools/boot/potato/boot-powerpc      2000/06/14 07:20:39
@@ -19,8 +19,8 @@
 
 cd $CDROOT/..
 
-# Only disk 1 bootable
-if [ $N != 1 ]; then
+# Only disk 1* bootable
+if [ $N != 1 -a $N != 1_NONUS ]; then
        echo -n "--netatalk -j -hfs -probe -map $BASEDIR/data/hfs.map" \
                > $N.mkisofs_opts
        exit 0
@@ -59,49 +59,49 @@
 #--------------- APUS - Stuff -------------------------------
 #echo Installing APUS files
 mkdir apus
-cp $DISKSROOT/apus/linux apus
-cp $DISKSROOT/apus/images-1.44/root.bin apus
-cp $DISKSROOT/apus/images-1.44/rescue.bin apus
+cp -f $DISKSROOT/apus/linux apus
+cp -f $DISKSROOT/apus/images-1.44/root.bin apus
+cp -f $DISKSROOT/apus/images-1.44/rescue.bin apus
 
 #--------------- CHRP - Stuff -------------------------------
 echo Installing CHRP files
 mkdir chrp
-cp $DISKSROOT/chrp/linux chrp
-cp $DISKSROOT/chrp/images-1.44/root.bin chrp
-cp $DISKSROOT/chrp/images-1.44/rescue.bin chrp
+cp -f $DISKSROOT/chrp/linux chrp
+cp -f $DISKSROOT/chrp/images-1.44/root.bin chrp
+cp -f $DISKSROOT/chrp/images-1.44/rescue.bin chrp
 
 #-------------- Common - Stuff ------------------------------
 #echo Installing Common files
 #mkdir common
-#cp $DISKSROOT/common/linux common
-#cp $DISKSROOT/common/images-1.44/root.bin common
-#cp $DISKSROOT/common/images-1.44/rescue.bin common
+#cp -f $DISKSROOT/common/linux common
+#cp -f $DISKSROOT/common/images-1.44/root.bin common
+#cp -f $DISKSROOT/common/images-1.44/rescue.bin common
 
 #---------------- MBX - Stuff -------------------------------
 #echo Installing MBX files
 #mkdir mbx
-#cp $DISKSROOT/mbx/linux mbx
-#cp $DISKSROOT/mbx/images-1.44/root.bin mbx
-#cp $DISKSROOT/mbx/images-1.44/rescue.bin mbx
+#cp -f $DISKSROOT/mbx/linux mbx
+#cp -f $DISKSROOT/mbx/images-1.44/root.bin mbx
+#cp -f $DISKSROOT/mbx/images-1.44/rescue.bin mbx
 
 #--------------- PMac - Stuff -------------------------------
 echo Installing Power-Macintosh files
 mkdir powermac
-cp $DISKSROOT/powermac/linux powermac/vmlinux
-cp $DISKSROOT/powermac/images-1.44/root.bin powermac/
-cp $DISKSROOT/powermac/images-1.44/boot-floppy-hfs.img powermac/
+cp -f $DISKSROOT/powermac/linux powermac/vmlinux
+cp -f $DISKSROOT/powermac/images-1.44/root.bin powermac/
+cp -f $DISKSROOT/powermac/images-1.44/boot-floppy-hfs.img powermac/
 
-cp $DISKSROOT/powermac/BootX* powermac/
-cp $DISKSROOT/powermac/bootvars* powermac/
+cp -f $DISKSROOT/powermac/BootX* powermac/
+cp -f $DISKSROOT/powermac/bootvars* powermac/
 
 # Completely useless!  It's an ext2 floppy... how is that supposed to boot?
-# cp $DISKSROOT/powermac/images-1.44/rescue.bin powermac/
+# cp -f $DISKSROOT/powermac/images-1.44/rescue.bin powermac/
 
 # New-world bootability
 # This works in a subdirectory via an ugly hack; fix yaboot.
 cat $BASEDIR/data/yaboot/yaboot.conf \
  | sed "s/CODENAME/${CODENAME}/g" > powermac/yaboot.conf
-cp $BASEDIR/data/yaboot/ofboot.b powermac/
+cp -f $BASEDIR/data/yaboot/ofboot.b powermac/
 
 # Extract yaboot from the archive
 if [ -z "$YABOOT_DEBUG" ]; then
@@ -110,21 +110,21 @@
  mv powermac/boot/yaboot powermac/yaboot
  rmdir powermac/boot
 else
- cp $YABOOT_DEBUG powermac/yaboot
+ cp -f $YABOOT_DEBUG powermac/yaboot
 fi
 
 #--------------- PReP - Stuff -------------------------------
 echo Installing PReP files
 mkdir prep
-cp $DISKSROOT/prep/linux prep
-cp $DISKSROOT/prep/images-1.44/boot.bin prep
-cp $DISKSROOT/prep/images-1.44/root.bin prep
-cp $DISKSROOT/prep/images-1.44/rescue.bin prep
+cp -f $DISKSROOT/prep/linux prep
+cp -f $DISKSROOT/prep/images-1.44/boot.bin prep
+cp -f $DISKSROOT/prep/images-1.44/root.bin prep
+cp -f $DISKSROOT/prep/images-1.44/rescue.bin prep
 
 #=============== fix a few things up... =====================
 echo Installing PowerPC FAQ and tools
 #mkdir common
 #mv basecont.txt.info common
 #mv ../README.info ../README.powerpc.info
-#cp ../README.1ST.info ../README.multicd.info
+#cp -f ../README.1ST.info ../README.multicd.info
 
Index: tools/boot/potato/boot-sparc
===================================================================
RCS file: /cvs/debian-boot/debian-cd/tools/boot/potato/boot-sparc,v
retrieving revision 1.18
diff -u -r1.18 boot-sparc
--- tools/boot/potato/boot-sparc        2000/04/09 17:14:17     1.18
+++ tools/boot/potato/boot-sparc        2000/06/14 07:20:41
@@ -18,8 +18,10 @@
 
 :> $N.mkisofs_opts
 
-# Disk 1 only
-[ "$N" = 1 ] || exit 0
+# Only disc 1* bootable
+if [ $N != 1 -a $N != 1_NONUS ]; then 
+       exit 0; 
+fi
 
 echo "-B boot/second.b boot1" > $N.mkisofs_opts
 rm -rf boot1
@@ -34,7 +36,7 @@
        tar zxf - -C $inst/ ./boot/{cd,second}.b)
 
 # Some custom etc files
-cp -p $BASEDIR/tools/boot/potato/sparc-etc/{boot-msg.txt,debian.txt,silo.conf} \
+cp -f -p $BASEDIR/tools/boot/potato/sparc-etc/{boot-msg.txt,debian.txt,silo.conf} \
        $inst/etc/
 
 tmp=/var/tmp/debian_cd
@@ -48,7 +50,7 @@
 
 # Unpack the root tree into the directory. we use the tftp root.tar.gz
 tar zxf $CDDIR/dists/$CODENAME/main/disks-$ARCH/current/root.tar.gz -C $tmp/
-cp -a $tmp/debian-sparc-root/. $inst/
+cp -f -a $tmp/debian-sparc-root/. $inst/
 
 # no longer need this
 rm -rf $tmp
Index: tools/boot/potato/post-boot-powerpc
===================================================================
RCS file: /cvs/debian-boot/debian-cd/tools/boot/potato/post-boot-powerpc,v
retrieving revision 1.1
diff -u -r1.1 post-boot-powerpc
--- tools/boot/potato/post-boot-powerpc 2000/05/01 04:59:02     1.1
+++ tools/boot/potato/post-boot-powerpc 2000/06/14 07:20:41
@@ -19,8 +19,8 @@
 
 cd $CDROOT/..
 
-# Only disk 1 bootable
-if [ $N != 1 ]; then
+# Only disk 1* bootable
+if [ $N != 1 -a $N != 1_NONUS ]; then
        exit 0
 fi
 
Index: tools/potato/installtools.sh
===================================================================
RCS file: /cvs/debian-boot/debian-cd/tools/potato/installtools.sh,v
retrieving revision 1.13
diff -u -r1.13 installtools.sh
--- tools/potato/installtools.sh        2000/05/18 22:49:02     1.13
+++ tools/potato/installtools.sh        2000/06/14 07:20:41
@@ -6,19 +6,20 @@
 
 set -e
 
-BDIR=$TDIR/$CODENAME-$ARCH
+# The location of the tree for CD#1, passed in
+DIR=$1
 
 DOCDIR=doc
 
 # Put the install documentation in /install
-cd $BDIR/1/dists/$CODENAME/main/disks-$ARCH/current/$DOCDIR
-mkdir $BDIR/1/install/$DOCDIR
-cp -a * $BDIR/1/install/$DOCDIR/
-ln -sf install.en.html $BDIR/1/install/$DOCDIR/index.html
+cd $DIR/dists/$CODENAME/main/disks-$ARCH/current/$DOCDIR
+mkdir $DIR/install/$DOCDIR
+cp -a * $DIR/install/$DOCDIR/
+ln -sf install.en.html $DIR/install/$DOCDIR/index.html
 
 # Put the boot-disk documentation in /doc too
-mkdir $BDIR/1/doc/install
-cd $BDIR/1/doc/install
+mkdir $DIR/doc/install
+cd $DIR/doc/install
 for file in ../../install/$DOCDIR/*.{html,txt}
 do
        ln -s $file
#!/usr/bin/perl -w
#
# Copyright 2000 Steve McIntyre <[EMAIL PROTECTED]>
# See the README file for the license
#
# This script takes 2 arguments on input - the filename of a packages list and
# the output filename
#
# The job of this script is to remove all non-US packages from that packages 
# list.

use strict;

my $infile = shift;
my $outfile = shift;

my $apt = "$ENV{'BASEDIR'}/tools/apt-selection";
my $adir = "$ENV{'APTTMP'}/$ENV{'CODENAME'}-$ENV{'ARCH'}";
my $dir = "$ENV{'TDIR'}/$ENV{'CODENAME'}-$ENV{'ARCH'}";
my $verbose = $ENV{'VERBOSE'} || 0;
my $nonuslist = "$dir/non-US.list";

$| = 1; # Autoflush for debugging

open(LOG, ">>$dir/log.strip-nonUS-bin") 
    || die "Can't write in $dir/log.strip-nonUS-bin !\n";

sub msg {
        my $level = shift;
        if ($verbose >= $level) {
                print @_;
        }
        print LOG @_;
}

msg(2, "$infile\n");

my %packages;

# Get the informations on all packages
my $oldrs = $/;
$/ = '';
open(AVAIL, "$apt cache dumpavail |") || die "Can't fork : $!\n";
my ($p, $re);
while (defined($_=<AVAIL>)) {
    next if not m/^Package: (\S+)\s*$/m;
    $p = $1;
    if( m/^(Section|Filename): \S*non-US\S*\s*$/m )
    {
        $packages{$p}{"nonus"} = 1;
    } else {
        $packages{$p}{"nonus"} = 0;
    }
}
close AVAIL or die "apt-cache failed : $@ ($!)\n";
$/ = $oldrs;

# Now for each package in the specified package list, check it against
# our database. If it's non-US lose it.
open (INLIST, "< $infile") 
    || die "Can't open starting list $infile\n";
open (OUTLIST, "> $outfile") 
    || die "Can't open starting list $outfile\n";

while(defined($_=<INLIST>)) {
    chomp;
    if($packages{$_}{"nonus"}) {
        msg(2, "Removing non-US package $_\n");
    } else {
        msg(2, "Keeping package $_\n");
        print OUTLIST "$_\n";
    }
}
close INLIST;
close OUTLIST;
close LOG;
#!/bin/bash

#set -x
set -e

BDIR=$TDIR/$CODENAME-$ARCH
ADIR=$APTTMP/$CODENAME-$ARCH
SDIR=$TDIR/$CODENAME-src

$BASEDIR/tools/add_files $BDIR/$DISK $MIRROR doc

for i in $BDIR/*.packages; do 
        dir=${i%%.packages}
        dir=${dir##$BDIR/}
        dir=$BDIR/CD$dir
        cp -df $MIRROR/README* $dir/ 

        rm -f $dir/README $dir/README.1ST \
                $dir/README.CD-manufacture $dir/README.multicd \
                $dir/README.pgp ; \

        cpp -traditional -undef -P -C -Wall -nostdinc -I$dir \
            -D OUTPUTtext $BASEDIR/data/$CODENAME/README.html.in \
                | sed -e 's/%%.//g' > $dir/README.html

        lynx -dump -force_html $dir/README.html | todos \
        > $dir/README.txt ; \

        cpp -traditional -undef -P -C -Wall -nostdinc -I $dir/ \
            -D OUTPUThtml $BASEDIR/data/$CODENAME/README.html.in \
                | sed -e 's/%%.//g' > $dir/README.html

        rm -f $dir/README.diskdefines
        mkdir -p $dir/pics 
        cp $BASEDIR/data/pics/*.jpg $dir/pics/ 

        if [ -e $MIRROR/dists/$CODENAME/main/Release-Notes ]; then 
           cp -f $MIRROR/dists/$CODENAME/main/Release-Notes $dir/
        fi

        cp -f $MIRROR/dists/$CODENAME/Contents-$ARCH.gz \
           $dir/dists/$CODENAME/; \

        if [ -n "$NONUS" ]; then
           cp -f $NONUS/dists/$CODENAME/non-US/Contents-$ARCH.gz \
              $dir/dists/$CODENAME/non-US/
        fi

        if [ -e $BASEDIR/data/$CODENAME/README.$ARCH ]; then 
          cp -f $BASEDIR/data/$CODENAME/README.$ARCH $dir/
        fi

    if [ -e $BASEDIR/data/$CODENAME/README.1ST.$ARCH ]; then 
        rm -f $dir/README.1ST
        echo "This disc is labelled :" > $dir/README.1ST
        cat $dir/.disk/info >>$dir/README.1ST
        echo -e "\n\n" >>$dir/README.1ST
        cat $BASEDIR/data/$CODENAME/README.1ST.$ARCH > $dir/README.1ST
        todos $dir/README.1ST; 
    fi

    if [ -e $BASEDIR/data/$CODENAME/README.multicd ]; then 
        cp -f $BASEDIR/data/$CODENAME/README.multicd $dir/
    fi

done

Reply via email to