update_tasks: we can now just loop over existing task.list files
To avoid confusion the intermediate task lists are renamed from task.list.{essential,full} to task.gen.{essential,full}.
This commit is contained in:
parent
086dc76302
commit
06ee64bc28
|
@ -66,18 +66,18 @@ 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.list.[generic|<desktop>].essential:
|
- task.gen.[generic|<desktop>].essential:
|
||||||
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.list.[generic|<desktop>].full:
|
- task.gen.[generic|<desktop>].full:
|
||||||
copy of task.list.[generic|<desktop>].essential; followed by secondary
|
copy of task.gen.[generic|<desktop>].essential; followed by secondary
|
||||||
tasks from tasks from task.list.[generic|<desktop>] and corresponding
|
tasks from tasks from task.list.[generic|<desktop>] and corresponding
|
||||||
language tasks
|
language tasks
|
||||||
- task-essential-[generic|<desktop>]:
|
- task-essential-[generic|<desktop>]:
|
||||||
list of key packages based on task.list.[generic|<desktop>].essential;
|
list of key packages based on task.gen.[generic|<desktop>].essential;
|
||||||
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.list.[generic|<desktop>].full;
|
list of packages based on task.gen.[generic|<desktop>].full;
|
||||||
corresponds to 3c-3f from overview above
|
corresponds to 3c-3f 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
|
||||||
|
|
|
@ -22,8 +22,9 @@ mkdir -p $TDIR
|
||||||
# Secondary tasks are indicated by a "-" suffix in the task.list file
|
# Secondary tasks are indicated by a "-" suffix in the task.list file
|
||||||
# When adding language tasks, 'desktop' is sorted before '*-desktop'
|
# When adding language tasks, 'desktop' is sorted before '*-desktop'
|
||||||
expand_task_list () {
|
expand_task_list () {
|
||||||
tasklist=$1
|
outbase=$1
|
||||||
langlist=$2
|
tasklist=$2
|
||||||
|
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_essential="$(grep -Ev "^(#.*)?(.*-)?[[:space:]]*$" $tasklist)"
|
||||||
|
@ -31,33 +32,33 @@ expand_task_list () {
|
||||||
task_extra="$(grep -Ev "^(#.*)?[[:space:]]*$" $tasklist | \
|
task_extra="$(grep -Ev "^(#.*)?[[:space:]]*$" $tasklist | \
|
||||||
grep -E "(.*-)[[:space:]]*$" | sed "s/[[:space:]]*-.*$//")"
|
grep -E "(.*-)[[:space:]]*$" | sed "s/[[:space:]]*-.*$//")"
|
||||||
|
|
||||||
echo "# Main tasks" >$tasklist.essential
|
echo "# Main tasks" >$outbase.essential
|
||||||
echo "$task_essential" >>$tasklist.essential
|
echo "$task_essential" >>$outbase.essential
|
||||||
|
|
||||||
echo >>$tasklist.essential
|
echo >>$outbase.essential
|
||||||
echo "# Main language tasks" >>$tasklist.essential
|
echo "# Main language tasks" >>$outbase.essential
|
||||||
for task in "" $(echo "$task_essential" | grep "^desktop" || true) \
|
for task in "" $(echo "$task_essential" | grep "^desktop" || true) \
|
||||||
$(echo "$task_essential" | grep -- "-desktop" || true); do
|
$(echo "$task_essential" | 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 >>$tasklist.essential
|
done >>$outbase.essential
|
||||||
|
|
||||||
cp $tasklist.essential $tasklist.full
|
cp $outbase.essential $outbase.full
|
||||||
|
|
||||||
if [ "$task_extra" ]; then
|
if [ "$task_extra" ]; then
|
||||||
echo >>$tasklist.full
|
echo >>$outbase.full
|
||||||
echo "# Extra tasks" >>$tasklist.full
|
echo "# Extra tasks" >>$outbase.full
|
||||||
echo "$task_extra" >>$tasklist.full
|
echo "$task_extra" >>$outbase.full
|
||||||
|
|
||||||
echo >>$tasklist.full
|
echo >>$outbase.full
|
||||||
echo "# Extra language tasks" >>$tasklist.full
|
echo "# Extra language tasks" >>$outbase.full
|
||||||
for task in $(echo "$task_extra" | grep "^desktop" || true) \
|
for task in $(echo "$task_extra" | grep "^desktop" || true) \
|
||||||
$(echo "$task_extra" | grep -- "-desktop" || true); do
|
$(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:+-$task}
|
||||||
done
|
done
|
||||||
done >>$tasklist.full
|
done >>$outbase.full
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -165,22 +166,19 @@ dpkg -x $TASKSEL_DEB $TDIR/tasksel
|
||||||
[ -e task.languages ] || exit 1
|
[ -e task.languages ] || exit 1
|
||||||
grep -Ev "^(#.*)?[[:space:]]*$" task.languages > $TDIR/languages
|
grep -Ev "^(#.*)?[[:space:]]*$" task.languages > $TDIR/languages
|
||||||
|
|
||||||
for variant in generic gnome kde lxde xfce light all; do
|
for tlist in task.list.*; do
|
||||||
if [ ! -e task.list.$variant ]; then
|
variant=${tlist##*.}
|
||||||
echo "Warning: task.list.$variant does not exist; skipping"
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
expand_task_list task.list.$variant $TDIR/languages
|
expand_task_list task.gen.$variant $tlist $TDIR/languages
|
||||||
|
|
||||||
update_essential_list \
|
update_essential_list \
|
||||||
task-essential-$variant \
|
task-essential-$variant \
|
||||||
task.list.$variant.essential \
|
task.gen.$variant.essential \
|
||||||
$TDIR/tasksel
|
$TDIR/tasksel
|
||||||
|
|
||||||
update_full_list \
|
update_full_list \
|
||||||
task-full-$variant \
|
task-full-$variant \
|
||||||
task.list.$variant.full \
|
task.gen.$variant.full \
|
||||||
$TMP_PKG
|
$TMP_PKG
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue