|
|
@ -556,11 +556,39 @@ snap_from_seed() {
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
seed_from_task ()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
# Retrieve the name of the seed from a task name
|
|
|
|
|
|
|
|
local task=$1
|
|
|
|
|
|
|
|
local seed
|
|
|
|
|
|
|
|
local seedfile
|
|
|
|
|
|
|
|
local seedfiles
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
seedfile="$(grep -lE "^Task-Key: +${task}\$" config/germinate-output/*seedtext|head -1)"
|
|
|
|
|
|
|
|
if [ -n "$seedfile" ]; then
|
|
|
|
|
|
|
|
basename $seedfile .seedtext
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
seedfiles="$(grep -lE "^Task-Per-Derivative: *1\$" config/germinate-output/*seedtext)"
|
|
|
|
|
|
|
|
if [ -n "$seedfiles" ]; then
|
|
|
|
|
|
|
|
for seed in $(echo $seedfiles | xargs basename -s .seedtext); do
|
|
|
|
|
|
|
|
if [ ${PROJECT}-${seed} = $task ]; then
|
|
|
|
|
|
|
|
echo ${seed}
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
done
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
add_task ()
|
|
|
|
add_task ()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
local pass="$1"
|
|
|
|
local pass="$1"
|
|
|
|
shift
|
|
|
|
shift
|
|
|
|
local task
|
|
|
|
local task
|
|
|
|
|
|
|
|
local snap_list_file
|
|
|
|
|
|
|
|
local snap_list_files
|
|
|
|
|
|
|
|
local curseed
|
|
|
|
|
|
|
|
|
|
|
|
# The removal of direct task installation support from live-build
|
|
|
|
# The removal of direct task installation support from live-build
|
|
|
|
# poses some problems. If the chroot has multiarch configured - for
|
|
|
|
# poses some problems. If the chroot has multiarch configured - for
|
|
|
@ -577,12 +605,32 @@ add_task ()
|
|
|
|
# probably a lurking timebomb that we need to fix. In the meantime,
|
|
|
|
# probably a lurking timebomb that we need to fix. In the meantime,
|
|
|
|
# the Architecture restriction at least saves us from abject
|
|
|
|
# the Architecture restriction at least saves us from abject
|
|
|
|
# failure.
|
|
|
|
# failure.
|
|
|
|
|
|
|
|
#
|
|
|
|
|
|
|
|
# We want as well to grab the snap list for each PASS. Resolve for all
|
|
|
|
|
|
|
|
# given task, and deduplicate them to generate snaps for the PASS.
|
|
|
|
|
|
|
|
|
|
|
|
for task; do
|
|
|
|
for task; do
|
|
|
|
# We need a ridiculous number of backslashes to protect
|
|
|
|
# We need a ridiculous number of backslashes to protect
|
|
|
|
# parentheses from eval.
|
|
|
|
# parentheses from eval.
|
|
|
|
echo "!chroot chroot apt-cache dumpavail | grep-dctrl -nsPackage \\\\\\( -XFArchitecture $ARCH -o -XFArchitecture all \\\\\\) -a -wFTask $task" >> "config/package-lists/livecd-rootfs.list.chroot_$pass"
|
|
|
|
echo "!chroot chroot apt-cache dumpavail | grep-dctrl -nsPackage \\\\\\( -XFArchitecture $ARCH -o -XFArchitecture all \\\\\\) -a -wFTask $task" >> "config/package-lists/livecd-rootfs.list.chroot_$pass"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
curseed=$(seed_from_task ${task})
|
|
|
|
|
|
|
|
if [ -z "${curseed}" ]; then
|
|
|
|
|
|
|
|
echo "W: No seed matching task ${task}"
|
|
|
|
|
|
|
|
continue
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
snap_list_file="config/package-lists/seed.${curseed}.snaplist.full"
|
|
|
|
|
|
|
|
snap_from_seed "${curseed}" $snap_list_file
|
|
|
|
|
|
|
|
if [ -e "$snap_list_file" ]; then
|
|
|
|
|
|
|
|
snap_list_files="${snap_list_files} $snap_list_file"
|
|
|
|
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
done
|
|
|
|
|
|
|
|
# The snap list is one line, and could be duplicated between seeds via inheritance.
|
|
|
|
|
|
|
|
# Uniquely sort them and store them back in one line.
|
|
|
|
|
|
|
|
if [ -n "${snap_list_files}" ]; then
|
|
|
|
|
|
|
|
cat ${snap_list_files}|xargs -n1|sort -u > "config/package-lists/livecd-rootfs.snaplist.chroot_${pass}.full"
|
|
|
|
|
|
|
|
rm ${snap_list_files}
|
|
|
|
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
add_package ()
|
|
|
|
add_package ()
|
|
|
|