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.
This commit is contained in:
Frans Pop 2008-12-28 13:18:09 +00:00
parent ef7d2a8032
commit 7bbc73edec
3 changed files with 59 additions and 37 deletions

6
debian/changelog vendored
View File

@ -70,6 +70,8 @@ debian-cd (3.1.0) UNRELEASED; urgency=low
maintaining the lists a lot less painful. Closes: #506616. maintaining the lists a lot less painful. Closes: #506616.
* Indicate which tasks are "secondary" by adding a "-" suffix in task.list.* * Indicate which tasks are "secondary" by adding a "-" suffix in task.list.*
files instead of hardcoding it in update_tasks. Closes: #506668. 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. * 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 separate 'LXDE desktop environment' CD.
* Add support for a 'light desktop environment' CD (LXDE + Xfce). * 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; excluding them also means they get excluded from DVD1;
- remove xen/vserver linux-image packages as they do not get included on - remove xen/vserver linux-image packages as they do not get included on
CD1 anyway. CD1 anyway.
* Give priority to Key packages over regular packages for secondary tasks
(similar to what we already did for primary tasks).
-- Frans Pop <fjp@debian.org> Fri, 05 Dec 2008 10:04:03 +0100 -- Frans Pop <fjp@debian.org> Sun, 28 Dec 2008 14:09:50 +0100
debian-cd (3.0.5) unstable; urgency=low debian-cd (3.0.5) unstable; urgency=low

View File

@ -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 only language desktop tasks that correspond to a primary task are
included included
c) Regular packages from primary tasksel tasks c) Regular packages from primary tasksel tasks
d) Regular packages from language tasks (as in 4) d) Regular packages from language tasks
e) Any packages from secondary tasksel tasks e) Key packages from secondary tasksel tasks
f) Any packages from language tasks corresponding to secondary tasksel f) Key packages from language tasks corresponding to secondary tasksel
tasks 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) 5) Other packages in the order of their popularity (popcon score)
A tasksel task is defined as "secondary" by adding a '-' after its name 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 - task.languages
copy of the actual language list to be used to add language tasks copy of the actual language list to be used to add language tasks
(see "Language list used at build time" below) (see "Language list used at build time" below)
- task.gen.[generic|<desktop>].essential: - task.gen.[generic|<desktop>].primary:
contains primary tasks from task.list.[generic|<desktop>] followed by contains primary tasks from task.list.[generic|<desktop>] followed by
corresponding language tasks corresponding language tasks
- task.gen.[generic|<desktop>].full: - task.gen.[generic|<desktop>].secondary:
copy of task.gen.[generic|<desktop>].essential; followed by secondary contains secondary tasks from task.list.[generic|<desktop>] and
tasks from tasks from task.list.[generic|<desktop>] and corresponding corresponding language tasks
language tasks
- task-essential-[generic|<desktop>]: - task-essential-[generic|<desktop>]:
list of key packages based on task.gen.[generic|<desktop>].essential; list of key packages based on task.gen.[generic|<desktop>].primary;
corresponds to 3a/3b from overview above corresponds to 3a/3b from overview above
- task-full-[generic|<desktop>]: - task-full-[generic|<desktop>]:
list of packages based on task.gen.[generic|<desktop>].full; list of packages based on both task.gen.[generic|<desktop>].primary and
corresponds to 3c-3f from overview above task.gen.[generic|<desktop>].secondary; corresponds to 3c-3h from overview
above
The generation of these files is done early in a build by the script The generation of these files is done early in a build by the script
tools/update_tasks. tools/update_tasks.

View File

@ -27,38 +27,36 @@ expand_task_list () {
langlist=$3 langlist=$3
# Filter out comments, empty lines and secondary tasks # Filter out comments, empty lines and secondary tasks
task_essential="$(grep -Ev "^(#.*)?(.*-)?[[:space:]]*$" $tasklist)" task_primary="$(grep -Ev "^(#.*)?(.*-)?[[:space:]]*$" $tasklist)"
# Select only secondary tasks # Select only secondary tasks
task_extra="$(grep -Ev "^(#.*)?[[:space:]]*$" $tasklist | \ task_secondary="$(grep -Ev "^(#.*)?[[:space:]]*$" $tasklist | \
grep -E "(.*-)[[:space:]]*$" | sed "s/[[:space:]]\+-.*$//")" grep -E "(.*-)[[:space:]]*$" | sed "s/[[:space:]]\+-.*$//")"
echo "# Main tasks" >$outbase.essential echo "# Primary main tasks" >$outbase.primary
echo "$task_essential" >>$outbase.essential echo "$task_primary" >>$outbase.primary
echo >>$outbase.essential echo >>$outbase.primary
echo "# Main language tasks" >>$outbase.essential echo "# Primary language tasks" >>$outbase.primary
for task in "" $(echo "$task_essential" | grep "^desktop" || true) \ for task in "" $(echo "$task_primary" | grep "^desktop" || true) \
$(echo "$task_essential" | grep -- "-desktop" || true); do $(echo "$task_primary" | grep -- "-desktop" || true); do
for language in $(cat $langlist); do for language in $(cat $langlist); do
echo $language${task:+-$task} echo $language${task:+-$task}
done 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.secondary
echo >>$outbase.full echo "# Secondary language tasks" >>$outbase.secondary
echo "# Extra tasks" >>$outbase.full for task in $(echo "$task_secondary" | grep "^desktop" || true) \
echo "$task_extra" >>$outbase.full $(echo "$task_secondary" | grep -- "-desktop" || true); do
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
for language in $(cat $langlist); do for language in $(cat $langlist); do
echo $language${task:+-$task} echo $language-$task
done done
done >>$outbase.full done >>$outbase.secondary
fi fi
} }
@ -102,7 +100,7 @@ update_full_list () {
} }
} }
next next
}' | sort -n | cut -d: -f2 > $file }' | sort -n | cut -d: -f2 >> $file
} }
update_essential_list () { update_essential_list () {
@ -148,7 +146,7 @@ update_essential_list () {
} }
} }
next 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 # 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 expand_task_list task.gen.$variant $tlist $TDIR/languages
# Create (empty) output files
: >task-essential-$variant
: >task-full-$variant
update_essential_list \ update_essential_list \
task-essential-$variant \ task-essential-$variant \
task.gen.$variant.essential \ task.gen.$variant.primary \
$TDIR/tasksel $TDIR/tasksel
update_full_list \ update_full_list \
task-full-$variant \ task-full-$variant \
task.gen.$variant.full \ task.gen.$variant.primary \
$TMP_PKG $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 done
rm -rf $TDIR rm -rf $TDIR