Re: [RFR] Creating tasks dynamically

2008-10-16 Thread Frans Pop
On Thursday 16 October 2008, Frans Pop wrote:
> I've dropped EXCLUDE1 and UNEXCLUDE2 and the corresponding task files
> as they no longer seem to be used anywhere.

2 seconds further investigation showed that was incorrect.
Update with correct handling (I think) of (un)excludes attached.

diff --git a/CONF.sh b/CONF.sh
index 46d5164..93b6692 100644
--- a/CONF.sh
+++ b/CONF.sh
@@ -186,10 +186,10 @@ export DISKTYPE=CD
 #export CUSTOMSIZE=
 
 # We don't want certain packages to take up space on CD1...
-#export EXCLUDE1="$BASEDIR"/tasks/exclude-$CODENAME
+#export EXCLUDE1=exclude
 # ...but they are okay for other CDs (UNEXCLUDEx == may be included
 # on CD x if not already covered)
-#export UNEXCLUDE2="$BASEDIR"/tasks/unexclude-CD2-$CODENAME
+#export UNEXCLUDE2=unexclude-CD2
 # Any packages listed in EXCLUDE but not in any UNEXCLUDE will be
 # excluded completely.
 
@@ -298,10 +298,10 @@ done
 # and if you're not using build.sh then also make sure you set TASK
 # appropriately here)
 # INSTALLER_CD=0: nothing special (default)
-# INSTALLER_CD=1: just add debian-installer (use TASK=tasks/debian-installer-$CODENAME)
-# INSTALLER_CD=2: add d-i and base (use TASK=tasks/debian-installer+kernel-$CODENAME)
+# INSTALLER_CD=1: just add debian-installer (use TASK=debian-installer)
+# INSTALLER_CD=2: add d-i and base (use TASK=debian-installer+kernel)
 #export INSTALLER_CD=2
-#export TASK=tasks/debian-installer+kernel-$CODENAME
+#export TASK=debian-installer+kernel
 
 # Parameters to pass to kernel (or d-i) when the CD boots. Not currently
 # supported for all architectures.
diff --git a/Makefile b/Makefile
index 8e8964e..4d6cbb4 100755
--- a/Makefile
+++ b/Makefile
@@ -18,7 +18,7 @@ ifndef VERBOSE_MAKE
 Q=@
 endif
 ifndef TASK
-TASK=$(BASEDIR)/tasks/Debian_$(CODENAME)
+TASK=Debian
 endif
 ifndef MKISOFS
 export MKISOFS=$(shell which genisoimage mkisofs | head -1)
@@ -56,12 +56,14 @@ grab_source_list=$(BASEDIR)/tools/grab_source_list
 which_deb=$(BASEDIR)/tools/which_deb
 
 BDIR=$(TDIR)/$(CODENAME)
+TASKDIR=$(BDIR)/tasks
 ADIR=$(APTTMP)
 DB_DIR=$(BDIR)/debootstrap
 
 export DEBOOTSTRAP_DIR := $(DB_DIR)/usr/lib/debootstrap
 export PATH := $(DB_DIR)/usr/sbin:$(PATH)
 export BDIR
+export TASKDIR
 
 LATEST_DB := $(shell $(which_deb) $(MIRROR) $(CODENAME) debootstrap)
 
@@ -108,7 +110,7 @@ endif
 ## INITIALIZATION ##
 
 # Creation of the directories needed
-init: ok $(OUT) $(TDIR) $(BDIR) $(ADIR) $(BDIR)/DATE $(DB_DIR) unstable-map
+init: ok $(OUT) $(TDIR) $(BDIR) $(ADIR) $(TASKDIR) $(BDIR)/DATE $(DB_DIR) unstable-map
 $(OUT):
 	$(Q)mkdir -p $(OUT)
 $(TDIR):
@@ -117,6 +119,13 @@ $(BDIR):
 	$(Q)mkdir -p $(BDIR)
 $(ADIR):
 	$(Q)mkdir -p $(ADIR)
+$(TASKDIR):
+	$(Q)mkdir -p $(TASKDIR)
+	cp $(BASEDIR)/tasks/$(CODENAME)/* $(TASKDIR)
+	set -e; cd $(TASKDIR); \
+		$(BASEDIR)/tools/update_tasks; \
+		$(BASEDIR)/tools/generate_di_list; \
+		$(BASEDIR)/tools/generate_di+k_list
 $(BDIR)/DATE:
 	$(Q)date '+%Y%m%d' > $(BDIR)/DATE
 $(DB_DIR): $(LATEST_DB)
@@ -294,11 +303,11 @@ $(BDIR)/rawlist:
 		ARCHUNDEFS="$$ARCHUNDEFS -U $$ARCH"; \
 	done; \
 	if [ "$(SOURCEONLY)"x != "yes"x ] ; then \
-		cat $(TASK) | \
+		cat $(TASKDIR)/$(TASK) | \
 		cpp -nostdinc -nostdinc++ -P -undef $$ARCHDEFS \
 	   		$$ARCHUNDEFS -U i386 -U linux -U unix \
 		-DFORCENONUSONCD1=0 \
-		-I $(BASEDIR)/tasks -I $(BDIR) - - >> $(BDIR)/rawlist; \
+		-I $(TASKDIR) -I $(BDIR) - - >> $(BDIR)/rawlist; \
 	fi
 
 # If we're *only* doing source, then we need to build a list of all the
@@ -386,10 +395,7 @@ mirrorcheck: ok
 	done
 
 update-popcon:
-	$(update_popcon) tasks/popularity-contest-$(CODENAME)
-
-update-tasks:
-	$(update_tasks) $(CODENAME)
+	$(update_popcon) tasks/$(CODENAME)/popularity-contest
 
 # Little trick to simplify things
 official_images: ok init packagelists image-trees images
diff --git a/build.sh b/build.sh
index 95829b2..8423642 100755
--- a/build.sh
+++ b/build.sh
@@ -26,11 +26,11 @@ export PATH
 if [ "$TASK"x = ""x ] ; then
 	case "$INSTALLER_CD"x in
 		"1"x)
-			TASK=tasks/debian-installer-$DI_CODENAME
+			TASK=debian-installer
 			unset COMPLETE
 			;;
 		"2"x)
-			TASK=tasks/debian-installer+kernel-$CODENAME
+			TASK=debian-installer+kernel
 			unset COMPLETE
 			;;
 		*)
diff --git a/build_all.sh b/build_all.sh
index ba378e4..e4be750 100755
--- a/build_all.sh
+++ b/build_all.sh
@@ -19,11 +19,11 @@ export PATH
 if [ "$TASK"x = ""x ] ; then
 	case "$INSTALLER_CD"x in
 		"1"x)
-			TASK=tasks/debian-installer-$DI_CODENAME
+			TASK=debian-installer
 			unset COMPLETE
 			;;
 		"2"x)
-			TASK=tasks/debian-installer+kernel-$CODENAME
+			TASK=debian-installer+kernel
 			unset COMPLETE
 			;;
 		*)
diff --git a/easy-build.sh b/easy-build.sh
index 983a604..6df5230 100755
--- a/easy-build.sh
+++ b/easy-build.sh
@@ -99,8 +99,6 @@ export MAXJIGDOS=0
 # Include proposed-updates
 #export PROPOSED_UPDATES=$CODENAME-proposed-updates
 
-#export EXCLUDE1="$BASEDIR"/tasks/exclude-$CODENAME
-#export UNEXCLUDE2="$BASEDIR"/tasks/unexclude-CD2-$CODENAME

Re: Bits from the Debian CD team

2008-10-16 Thread Matt Taggart
> It's probably time for a quick update on what we've been up to
> lately in terms of producing Debian CD and DVD and (!) BD images.
> 
> That will give the game away for the biggest change that has happened
> lately - we're now producing some Blu-ray images alongside the
> existing CD and DVD images with each weekly Lenny build. As a standard
> Blu-ray disc will hold up to 25GB of data, that means that, for the
> first time in several years, users should be able to fit all of the
> packages for one architecture on a single disc. Woo!

This reminds me that I never followed up on this email about image sizes

http://lists.debian.org/debian-cd/2007/04/msg00072.html

The images sizes in that email are probably out of date, but the questions 
are still relevant:

1) should the images be better optimized for media sizes, both the various 
optical media but also usb thumb drives? (side note, I bet you can get 
surplus small thumb drives for _really_ cheap now, it would be neat to be 
able to give away debian on them)
2) How are we doing on current image sizes and how they relate to the 
physical media sizes?
3) As Joey suggested, if there is extra room on the i386 netinst could it 
contain extra kernels? maybe this has already been solved? I didn't check.
4) could you make multi-arch businesscards of i386 and amd64?
5) could you make multi-arch mini-CDs of i386/amd64/ppc by combining
   their businesscard images?

Thanks,

-- 
Matt Taggart
[EMAIL PROTECTED]



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



[RFR] Creating tasks dynamically

2008-10-16 Thread Frans Pop
Hiya,

I've been working on a patch that dynamically creates some of the 
debian-cd task files instead of having them in SVN:
- debian-installer
- debian-installer+kernel
- task-essential*
- task-full*

The "static" task files and the task file based on popcon data have been 
moved to per-release subdirectories.
The popcon task file is not yet dynamically generated as there are some 
considerations that should be discussed before we do so.

This means that in the new situation you get this:
$ ls tasks/
etch  firmware  lenny  README  sid->lenny
$ ls tasks/lenny/
Debian   empty task.list   popularity-contest
Debian-kde   forcd1task.list.kde
Debian-xfce  interesting-fromcd23  task.list.xfce

The "Debian" task files lose the codename refs in the includes:
$ grep include tasks/lenny/Debian
#include 
#include 
#include 
#include 
#include 
#include 

The basic concept of the new setup is that early in a build we copy
tasks/$CODENAME/* to $BDIR/tasks/ and then generate the D-I and tasksel 
task files in the latter dir.

The attached diff shows the changes to scripts etc. The changes in the 
tasks directory have been omitted from the diff.
Documentation updates are TODO.

I've successfully build a BC and a KDE full CD with the new code.

I've dropped EXCLUDE1 and UNEXCLUDE2 and the corresponding task files as 
they no longer seem to be used anywhere.

Cheers,
FJP

diff --git a/CONF.sh b/CONF.sh
index 46d5164..ecf8c51 100644
--- a/CONF.sh
+++ b/CONF.sh
@@ -185,14 +185,6 @@ export DISKTYPE=CD
 #export DISKTYPE=CUSTOM
 #export CUSTOMSIZE=
 
-# We don't want certain packages to take up space on CD1...
-#export EXCLUDE1="$BASEDIR"/tasks/exclude-$CODENAME
-# ...but they are okay for other CDs (UNEXCLUDEx == may be included
-# on CD x if not already covered)
-#export UNEXCLUDE2="$BASEDIR"/tasks/unexclude-CD2-$CODENAME
-# Any packages listed in EXCLUDE but not in any UNEXCLUDE will be
-# excluded completely.
-
 # Set this if the recommended packages should be skipped when adding 
 # package on the CD.  The default is 'false'.
 export NORECOMMENDS=1
@@ -298,10 +290,10 @@ done
 # and if you're not using build.sh then also make sure you set TASK
 # appropriately here)
 # INSTALLER_CD=0: nothing special (default)
-# INSTALLER_CD=1: just add debian-installer (use TASK=tasks/debian-installer-$CODENAME)
-# INSTALLER_CD=2: add d-i and base (use TASK=tasks/debian-installer+kernel-$CODENAME)
+# INSTALLER_CD=1: just add debian-installer (use TASK=debian-installer)
+# INSTALLER_CD=2: add d-i and base (use TASK=debian-installer+kernel)
 #export INSTALLER_CD=2
-#export TASK=tasks/debian-installer+kernel-$CODENAME
+#export TASK=debian-installer+kernel
 
 # Parameters to pass to kernel (or d-i) when the CD boots. Not currently
 # supported for all architectures.
diff --git a/Makefile b/Makefile
index 8e8964e..0ef5a2e 100755
--- a/Makefile
+++ b/Makefile
@@ -18,7 +18,7 @@ ifndef VERBOSE_MAKE
 Q=@
 endif
 ifndef TASK
-TASK=$(BASEDIR)/tasks/Debian_$(CODENAME)
+TASK=Debian
 endif
 ifndef MKISOFS
 export MKISOFS=$(shell which genisoimage mkisofs | head -1)
@@ -56,6 +56,7 @@ grab_source_list=$(BASEDIR)/tools/grab_source_list
 which_deb=$(BASEDIR)/tools/which_deb
 
 BDIR=$(TDIR)/$(CODENAME)
+TASKDIR=$(BDIR)/tasks
 ADIR=$(APTTMP)
 DB_DIR=$(BDIR)/debootstrap
 
@@ -108,7 +109,7 @@ endif
 ## INITIALIZATION ##
 
 # Creation of the directories needed
-init: ok $(OUT) $(TDIR) $(BDIR) $(ADIR) $(BDIR)/DATE $(DB_DIR) unstable-map
+init: ok $(OUT) $(TDIR) $(BDIR) $(ADIR) $(TASKDIR) $(BDIR)/DATE $(DB_DIR) unstable-map
 $(OUT):
 	$(Q)mkdir -p $(OUT)
 $(TDIR):
@@ -117,6 +118,13 @@ $(BDIR):
 	$(Q)mkdir -p $(BDIR)
 $(ADIR):
 	$(Q)mkdir -p $(ADIR)
+$(TASKDIR):
+	$(Q)mkdir -p $(TASKDIR)
+	cp $(BASEDIR)/tasks/$(CODENAME)/* $(TASKDIR)
+	set -e; cd $(TASKDIR); \
+		$(BASEDIR)/tools/update_tasks; \
+		$(BASEDIR)/tools/generate_di_list; \
+		$(BASEDIR)/tools/generate_di+k_list
 $(BDIR)/DATE:
 	$(Q)date '+%Y%m%d' > $(BDIR)/DATE
 $(DB_DIR): $(LATEST_DB)
@@ -294,11 +302,11 @@ $(BDIR)/rawlist:
 		ARCHUNDEFS="$$ARCHUNDEFS -U $$ARCH"; \
 	done; \
 	if [ "$(SOURCEONLY)"x != "yes"x ] ; then \
-		cat $(TASK) | \
+		cat $(TASKDIR)/$(TASK) | \
 		cpp -nostdinc -nostdinc++ -P -undef $$ARCHDEFS \
 	   		$$ARCHUNDEFS -U i386 -U linux -U unix \
 		-DFORCENONUSONCD1=0 \
-		-I $(BASEDIR)/tasks -I $(BDIR) - - >> $(BDIR)/rawlist; \
+		-I $(TASKDIR) -I $(BDIR) - - >> $(BDIR)/rawlist; \
 	fi
 
 # If we're *only* doing source, then we need to build a list of all the
@@ -386,10 +394,7 @@ mirrorcheck: ok
 	done
 
 update-popcon:
-	$(update_popcon) tasks/popularity-contest-$(CODENAME)
-
-update-tasks:
-	$(update_tasks) $(CODENAME)
+	$(update_popcon) tasks/$(CODENAME)/popularity-contest
 
 # Little trick to simplify things
 official_images: ok init packagelists image-trees images
diff --git a/build.sh b/build.sh
index 95829b2..8423642 100755
--- a/build.sh
+++ b/build.sh
@@ -26,11 +26,11 @@ export PATH
 if [ "$TASK"x = ""x ] ; then
 

Re: [RFR] Creating tasks dynamically v3

2008-10-16 Thread Frans Pop
On Thursday 16 October 2008, Frans Pop wrote:
> The attached diff shows the changes to scripts etc. The changes in the
> tasks directory have been omitted from the diff.

Here is version 3 of the patch. Changes:
- remove $(TASKDIR) in dir-clean target
- make creation of $(TASKDIR) quiet
- also change include dir for rawlist-exclude

There seem to be some inconsistencies about how EXCLUDE is handled:
- it is "unset" in CONF.sh, but there is no example to set it
- it looks like it's being processed both in the Makefile (target
  rawlist-exclude) and in make_disc_trees.pl

diff --git a/CONF.sh b/CONF.sh
index 46d5164..93b6692 100644
--- a/CONF.sh
+++ b/CONF.sh
@@ -186,10 +186,10 @@ export DISKTYPE=CD
 #export CUSTOMSIZE=
 
 # We don't want certain packages to take up space on CD1...
-#export EXCLUDE1="$BASEDIR"/tasks/exclude-$CODENAME
+#export EXCLUDE1=exclude
 # ...but they are okay for other CDs (UNEXCLUDEx == may be included
 # on CD x if not already covered)
-#export UNEXCLUDE2="$BASEDIR"/tasks/unexclude-CD2-$CODENAME
+#export UNEXCLUDE2=unexclude-CD2
 # Any packages listed in EXCLUDE but not in any UNEXCLUDE will be
 # excluded completely.
 
@@ -298,10 +298,10 @@ done
 # and if you're not using build.sh then also make sure you set TASK
 # appropriately here)
 # INSTALLER_CD=0: nothing special (default)
-# INSTALLER_CD=1: just add debian-installer (use TASK=tasks/debian-installer-$CODENAME)
-# INSTALLER_CD=2: add d-i and base (use TASK=tasks/debian-installer+kernel-$CODENAME)
+# INSTALLER_CD=1: just add debian-installer (use TASK=debian-installer)
+# INSTALLER_CD=2: add d-i and base (use TASK=debian-installer+kernel)
 #export INSTALLER_CD=2
-#export TASK=tasks/debian-installer+kernel-$CODENAME
+#export TASK=debian-installer+kernel
 
 # Parameters to pass to kernel (or d-i) when the CD boots. Not currently
 # supported for all architectures.
diff --git a/Makefile b/Makefile
index 8e8964e..884dbef 100755
--- a/Makefile
+++ b/Makefile
@@ -18,7 +18,7 @@ ifndef VERBOSE_MAKE
 Q=@
 endif
 ifndef TASK
-TASK=$(BASEDIR)/tasks/Debian_$(CODENAME)
+TASK=Debian
 endif
 ifndef MKISOFS
 export MKISOFS=$(shell which genisoimage mkisofs | head -1)
@@ -56,12 +56,14 @@ grab_source_list=$(BASEDIR)/tools/grab_source_list
 which_deb=$(BASEDIR)/tools/which_deb
 
 BDIR=$(TDIR)/$(CODENAME)
+TASKDIR=$(BDIR)/tasks
 ADIR=$(APTTMP)
 DB_DIR=$(BDIR)/debootstrap
 
 export DEBOOTSTRAP_DIR := $(DB_DIR)/usr/lib/debootstrap
 export PATH := $(DB_DIR)/usr/sbin:$(PATH)
 export BDIR
+export TASKDIR
 
 LATEST_DB := $(shell $(which_deb) $(MIRROR) $(CODENAME) debootstrap)
 
@@ -108,7 +110,7 @@ endif
 ## INITIALIZATION ##
 
 # Creation of the directories needed
-init: ok $(OUT) $(TDIR) $(BDIR) $(ADIR) $(BDIR)/DATE $(DB_DIR) unstable-map
+init: ok $(OUT) $(TDIR) $(BDIR) $(ADIR) $(TASKDIR) $(BDIR)/DATE $(DB_DIR) unstable-map
 $(OUT):
 	$(Q)mkdir -p $(OUT)
 $(TDIR):
@@ -117,6 +119,13 @@ $(BDIR):
 	$(Q)mkdir -p $(BDIR)
 $(ADIR):
 	$(Q)mkdir -p $(ADIR)
+$(TASKDIR):
+	$(Q)mkdir -p $(TASKDIR)
+	$(Q)cp $(BASEDIR)/tasks/$(CODENAME)/* $(TASKDIR)
+	$(Q)set -e; cd $(TASKDIR); \
+		$(BASEDIR)/tools/update_tasks; \
+		$(BASEDIR)/tools/generate_di_list; \
+		$(BASEDIR)/tools/generate_di+k_list
 $(BDIR)/DATE:
 	$(Q)date '+%Y%m%d' > $(BDIR)/DATE
 $(DB_DIR): $(LATEST_DB)
@@ -144,6 +153,7 @@ unstable-map:
 clean: ok dir-clean
 dir-clean:
 	$(Q)rm -rf $(BDIR)/CD[1234567890]*
+	$(Q)rm -rf $(BDIR)/tasks
 	$(Q)rm -f $(BDIR)/*.filelist*
 	$(Q)rm -f  $(BDIR)/packages-stamp $(BDIR)/upgrade-stamp $(BDIR)/md5-check
 
@@ -294,11 +304,11 @@ $(BDIR)/rawlist:
 		ARCHUNDEFS="$$ARCHUNDEFS -U $$ARCH"; \
 	done; \
 	if [ "$(SOURCEONLY)"x != "yes"x ] ; then \
-		cat $(TASK) | \
+		cat $(TASKDIR)/$(TASK) | \
 		cpp -nostdinc -nostdinc++ -P -undef $$ARCHDEFS \
 	   		$$ARCHUNDEFS -U i386 -U linux -U unix \
 		-DFORCENONUSONCD1=0 \
-		-I $(BASEDIR)/tasks -I $(BDIR) - - >> $(BDIR)/rawlist; \
+		-I $(TASKDIR) -I $(BDIR) - - >> $(BDIR)/rawlist; \
 	fi
 
 # If we're *only* doing source, then we need to build a list of all the
@@ -320,7 +330,7 @@ $(BDIR)/rawlist-exclude:
 			cpp -nostdinc -nostdinc++ -P -undef $$ARCHDEFS \
 			$$ARCHUNDEFS -U i386 -U linux -U unix \
 			-DFORCENONUSONCD1=0 \
-			-I $(BASEDIR)/tasks -I $(BDIR) - - >> $(BDIR)/rawlist-exclude; \
+			-I $(TASKDIR) -I $(BDIR) - - >> $(BDIR)/rawlist-exclude; \
 	else \
 		echo > $(BDIR)/rawlist-exclude; \
 	fi
@@ -386,10 +396,7 @@ mirrorcheck: ok
 	done
 
 update-popcon:
-	$(update_popcon) tasks/popularity-contest-$(CODENAME)
-
-update-tasks:
-	$(update_tasks) $(CODENAME)
+	$(update_popcon) tasks/$(CODENAME)/popularity-contest
 
 # Little trick to simplify things
 official_images: ok init packagelists image-trees images
diff --git a/build.sh b/build.sh
index 95829b2..8423642 100755
--- a/build.sh
+++ b/build.sh
@@ -26,11 +26,11 @@ export PATH
 if [ "$TASK"x = ""x ] ; then
 	case "$INSTALLER_CD"x in
 		"1"x)
-			TASK=tasks/debian-installer-$DI_CODENAME
+			TASK=debian-installer
 			unset COMPLETE
 			;;
 		"2"x)
-

Re: [RFR] Creating tasks dynamically - alternative

2008-10-16 Thread Frans Pop
On Thursday 16 October 2008, Frans Pop wrote:
> The basic concept of the new setup is that early in a build we copy
> tasks/$CODENAME/* to $BDIR/tasks/ and then generate the D-I and tasksel
> task files in the latter dir.

Here's an alternative implementation where the "static" task files are not 
copied, but the dynamically generated task files get included from the 
static task files.

For this to work two new static task files Debian-businesscard and 
Debian-netinst have been created.

I've not yet tested this and some additional cleanup is possible (for 
example, the name d-i+kernel does not really make sense anymore), but the 
attached patch should show the general idea.

I'm not sure whether I prefer this version or the previous one...

diff --git a/CONF.sh b/CONF.sh
index 46d5164..ed9c160 100644
--- a/CONF.sh
+++ b/CONF.sh
@@ -186,10 +186,10 @@ export DISKTYPE=CD
 #export CUSTOMSIZE=
 
 # We don't want certain packages to take up space on CD1...
-#export EXCLUDE1="$BASEDIR"/tasks/exclude-$CODENAME
+#export EXCLUDE1=exclude
 # ...but they are okay for other CDs (UNEXCLUDEx == may be included
 # on CD x if not already covered)
-#export UNEXCLUDE2="$BASEDIR"/tasks/unexclude-CD2-$CODENAME
+#export UNEXCLUDE2=unexclude-CD2
 # Any packages listed in EXCLUDE but not in any UNEXCLUDE will be
 # excluded completely.
 
@@ -298,10 +298,10 @@ done
 # and if you're not using build.sh then also make sure you set TASK
 # appropriately here)
 # INSTALLER_CD=0: nothing special (default)
-# INSTALLER_CD=1: just add debian-installer (use TASK=tasks/debian-installer-$CODENAME)
-# INSTALLER_CD=2: add d-i and base (use TASK=tasks/debian-installer+kernel-$CODENAME)
+# INSTALLER_CD=1: just add debian-installer (use TASK=Debian-businesscard)
+# INSTALLER_CD=2: add d-i and base (use TASK=Debian-netinst)
 #export INSTALLER_CD=2
-#export TASK=tasks/debian-installer+kernel-$CODENAME
+#export TASK=Debian-netinst
 
 # Parameters to pass to kernel (or d-i) when the CD boots. Not currently
 # supported for all architectures.
diff --git a/Makefile b/Makefile
index 8e8964e..012ebb8 100755
--- a/Makefile
+++ b/Makefile
@@ -18,7 +18,7 @@ ifndef VERBOSE_MAKE
 Q=@
 endif
 ifndef TASK
-TASK=$(BASEDIR)/tasks/Debian_$(CODENAME)
+TASK=Debian
 endif
 ifndef MKISOFS
 export MKISOFS=$(shell which genisoimage mkisofs | head -1)
@@ -55,13 +55,16 @@ update_tasks=$(BASEDIR)/tools/update_tasks
 grab_source_list=$(BASEDIR)/tools/grab_source_list
 which_deb=$(BASEDIR)/tools/which_deb
 
+TASKDIR=$(BASEDIR)/tasks/$(CODENAME)
 BDIR=$(TDIR)/$(CODENAME)
+DYNTASKDIR=$(BDIR)/tasks
 ADIR=$(APTTMP)
 DB_DIR=$(BDIR)/debootstrap
 
 export DEBOOTSTRAP_DIR := $(DB_DIR)/usr/lib/debootstrap
 export PATH := $(DB_DIR)/usr/sbin:$(PATH)
 export BDIR
+export TASKDIR
 
 LATEST_DB := $(shell $(which_deb) $(MIRROR) $(CODENAME) debootstrap)
 
@@ -108,7 +111,7 @@ endif
 ## INITIALIZATION ##
 
 # Creation of the directories needed
-init: ok $(OUT) $(TDIR) $(BDIR) $(ADIR) $(BDIR)/DATE $(DB_DIR) unstable-map
+init: ok $(OUT) $(TDIR) $(BDIR) $(ADIR) $(TASKDIR) $(BDIR)/DATE $(DB_DIR) unstable-map
 $(OUT):
 	$(Q)mkdir -p $(OUT)
 $(TDIR):
@@ -117,6 +120,12 @@ $(BDIR):
 	$(Q)mkdir -p $(BDIR)
 $(ADIR):
 	$(Q)mkdir -p $(ADIR)
+$(TASKDIR):
+	$(Q)mkdir -p $(TASKDIR)
+	$(Q)set -e; cd $(TASKDIR); \
+		$(BASEDIR)/tools/update_tasks; \
+		$(BASEDIR)/tools/generate_di_list; \
+		$(BASEDIR)/tools/generate_di+k_list
 $(BDIR)/DATE:
 	$(Q)date '+%Y%m%d' > $(BDIR)/DATE
 $(DB_DIR): $(LATEST_DB)
@@ -144,6 +153,7 @@ unstable-map:
 clean: ok dir-clean
 dir-clean:
 	$(Q)rm -rf $(BDIR)/CD[1234567890]*
+	$(Q)rm -rf $(BDIR)/tasks
 	$(Q)rm -f $(BDIR)/*.filelist*
 	$(Q)rm -f  $(BDIR)/packages-stamp $(BDIR)/upgrade-stamp $(BDIR)/md5-check
 
@@ -294,11 +304,12 @@ $(BDIR)/rawlist:
 		ARCHUNDEFS="$$ARCHUNDEFS -U $$ARCH"; \
 	done; \
 	if [ "$(SOURCEONLY)"x != "yes"x ] ; then \
-		cat $(TASK) | \
+		cat $(TASKDIR)/$(TASK) | \
 		cpp -nostdinc -nostdinc++ -P -undef $$ARCHDEFS \
 	   		$$ARCHUNDEFS -U i386 -U linux -U unix \
 		-DFORCENONUSONCD1=0 \
-		-I $(BASEDIR)/tasks -I $(BDIR) - - >> $(BDIR)/rawlist; \
+		-I $(TASKDIR) -I $(DYNTASKDIR) -I $(BDIR) - - \
+		>> $(BDIR)/rawlist; \
 	fi
 
 # If we're *only* doing source, then we need to build a list of all the
@@ -320,7 +331,7 @@ $(BDIR)/rawlist-exclude:
 			cpp -nostdinc -nostdinc++ -P -undef $$ARCHDEFS \
 			$$ARCHUNDEFS -U i386 -U linux -U unix \
 			-DFORCENONUSONCD1=0 \
-			-I $(BASEDIR)/tasks -I $(BDIR) - - >> $(BDIR)/rawlist-exclude; \
+			-I $(TASKDIR) -I $(BDIR) - - >> $(BDIR)/rawlist-exclude; \
 	else \
 		echo > $(BDIR)/rawlist-exclude; \
 	fi
@@ -386,10 +397,7 @@ mirrorcheck: ok
 	done
 
 update-popcon:
-	$(update_popcon) tasks/popularity-contest-$(CODENAME)
-
-update-tasks:
-	$(update_tasks) $(CODENAME)
+	$(update_popcon) tasks/$(CODENAME)/popularity-contest
 
 # Little trick to simplify things
 official_images: ok init packagelists image-trees images
diff --git a/build.sh b/build.sh
index 95829b2..70c1722 100755
--- a/build.sh