From 7bbc73edec5b41879aa00c60f73e517f3799e21e Mon Sep 17 00:00:00 2001 From: Frans Pop Date: Sun, 28 Dec 2008 13:18:09 +0000 Subject: [PATCH] update_tasks: give priority to key packages for secondary tasks Even for secondary tasks it makes sense to include their Key packages before their regular packages. --- debian/changelog | 6 +++- tasks/README.tasksel | 25 +++++++++-------- tools/update_tasks | 65 +++++++++++++++++++++++++++----------------- 3 files changed, 59 insertions(+), 37 deletions(-) diff --git a/debian/changelog b/debian/changelog index e86a3a30..a6600a68 100644 --- a/debian/changelog +++ b/debian/changelog @@ -70,6 +70,8 @@ debian-cd (3.1.0) UNRELEASED; urgency=low maintaining the lists a lot less painful. Closes: #506616. * Indicate which tasks are "secondary" by adding a "-" suffix in task.list.* files instead of hardcoding it in update_tasks. Closes: #506668. + * Add new file tasks/README.tasksel to document the way tasksel tasks are + used when determining the order in which packages are added to images. * Update list of languages supported by tasksel and D-I for Lenny. * Add support for a separate 'LXDE desktop environment' CD. * Add support for a 'light desktop environment' CD (LXDE + Xfce). @@ -90,8 +92,10 @@ debian-cd (3.1.0) UNRELEASED; urgency=low excluding them also means they get excluded from DVD1; - remove xen/vserver linux-image packages as they do not get included on CD1 anyway. + * Give priority to Key packages over regular packages for secondary tasks + (similar to what we already did for primary tasks). - -- Frans Pop Fri, 05 Dec 2008 10:04:03 +0100 + -- Frans Pop Sun, 28 Dec 2008 14:09:50 +0100 debian-cd (3.0.5) unstable; urgency=low diff --git a/tasks/README.tasksel b/tasks/README.tasksel index 624ecf5f..8a4825c0 100644 --- a/tasks/README.tasksel +++ b/tasks/README.tasksel @@ -24,10 +24,13 @@ The general sequence in which packages are added for "complete" images is: only language desktop tasks that correspond to a primary task are included c) Regular packages from primary tasksel tasks - d) Regular packages from language tasks (as in 4) - e) Any packages from secondary tasksel tasks - f) Any packages from language tasks corresponding to secondary tasksel + d) Regular packages from language tasks + e) Key packages from secondary tasksel tasks + f) Key packages from language tasks corresponding to secondary tasksel tasks + g) Regular packages from secondary tasksel tasks + h) Regular packages from language tasks corresponding to secondary + tasksel tasks 5) Other packages in the order of their popularity (popcon score) A tasksel task is defined as "secondary" by adding a '-' after its name @@ -66,19 +69,19 @@ the subdirectory tasks under the working directory for the build): - task.languages copy of the actual language list to be used to add language tasks (see "Language list used at build time" below) -- task.gen.[generic|].essential: +- task.gen.[generic|].primary: contains primary tasks from task.list.[generic|] followed by corresponding language tasks -- task.gen.[generic|].full: - copy of task.gen.[generic|].essential; followed by secondary - tasks from tasks from task.list.[generic|] and corresponding - language tasks +- task.gen.[generic|].secondary: + contains secondary tasks from task.list.[generic|] and + corresponding language tasks - task-essential-[generic|]: - list of key packages based on task.gen.[generic|].essential; + list of key packages based on task.gen.[generic|].primary; corresponds to 3a/3b from overview above - task-full-[generic|]: - list of packages based on task.gen.[generic|].full; - corresponds to 3c-3f from overview above + list of packages based on both task.gen.[generic|].primary and + task.gen.[generic|].secondary; corresponds to 3c-3h from overview + above The generation of these files is done early in a build by the script tools/update_tasks. diff --git a/tools/update_tasks b/tools/update_tasks index 04b78f98..b8a44f56 100755 --- a/tools/update_tasks +++ b/tools/update_tasks @@ -27,38 +27,36 @@ expand_task_list () { langlist=$3 # Filter out comments, empty lines and secondary tasks - task_essential="$(grep -Ev "^(#.*)?(.*-)?[[:space:]]*$" $tasklist)" + task_primary="$(grep -Ev "^(#.*)?(.*-)?[[:space:]]*$" $tasklist)" # Select only secondary tasks - task_extra="$(grep -Ev "^(#.*)?[[:space:]]*$" $tasklist | \ + task_secondary="$(grep -Ev "^(#.*)?[[:space:]]*$" $tasklist | \ grep -E "(.*-)[[:space:]]*$" | sed "s/[[:space:]]\+-.*$//")" - echo "# Main tasks" >$outbase.essential - echo "$task_essential" >>$outbase.essential + echo "# Primary main tasks" >$outbase.primary + echo "$task_primary" >>$outbase.primary - echo >>$outbase.essential - echo "# Main language tasks" >>$outbase.essential - for task in "" $(echo "$task_essential" | grep "^desktop" || true) \ - $(echo "$task_essential" | grep -- "-desktop" || true); do + echo >>$outbase.primary + echo "# Primary language tasks" >>$outbase.primary + for task in "" $(echo "$task_primary" | grep "^desktop" || true) \ + $(echo "$task_primary" | grep -- "-desktop" || true); do for language in $(cat $langlist); do echo $language${task:+-$task} done - done >>$outbase.essential + done >>$outbase.primary - cp $outbase.essential $outbase.full + rm -f $outbase.secondary + if [ "$task_secondary" ]; then + echo "# Secondary main tasks" >$outbase.secondary + echo "$task_secondary" >>$outbase.secondary - if [ "$task_extra" ]; then - echo >>$outbase.full - echo "# Extra tasks" >>$outbase.full - echo "$task_extra" >>$outbase.full - - echo >>$outbase.full - echo "# Extra language tasks" >>$outbase.full - for task in $(echo "$task_extra" | grep "^desktop" || true) \ - $(echo "$task_extra" | grep -- "-desktop" || true); do + echo >>$outbase.secondary + echo "# Secondary language tasks" >>$outbase.secondary + for task in $(echo "$task_secondary" | grep "^desktop" || true) \ + $(echo "$task_secondary" | grep -- "-desktop" || true); do for language in $(cat $langlist); do - echo $language${task:+-$task} + echo $language-$task done - done >>$outbase.full + done >>$outbase.secondary fi } @@ -102,7 +100,7 @@ update_full_list () { } } next - }' | sort -n | cut -d: -f2 > $file + }' | sort -n | cut -d: -f2 >> $file } update_essential_list () { @@ -148,7 +146,7 @@ update_essential_list () { } } next - }' | sort -s -n -k1 | cut -d: -f2 > $file + }' | sort -s -n -k1 | cut -d: -f2 >> $file } # We need to gunzip a copy of the appropriate Packages.gz file @@ -171,15 +169,32 @@ for tlist in task.list.*; do expand_task_list task.gen.$variant $tlist $TDIR/languages + # Create (empty) output files + : >task-essential-$variant + : >task-full-$variant + update_essential_list \ task-essential-$variant \ - task.gen.$variant.essential \ + task.gen.$variant.primary \ $TDIR/tasksel update_full_list \ task-full-$variant \ - task.gen.$variant.full \ + task.gen.$variant.primary \ $TMP_PKG + + # Now add packages for secondary tasks; start with Key packages again + if [ -e task.gen.$variant.secondary ]; then + update_essential_list \ + task-full-$variant \ + task.gen.$variant.secondary \ + $TDIR/tasksel + + update_full_list \ + task-full-$variant \ + task.gen.$variant.secondary \ + $TMP_PKG + fi done rm -rf $TDIR