Attempt to restrict task installation to the native architecture.

ubuntu/trusty
Colin Watson 13 years ago
parent 31d3235a6e
commit 80c59a14fa

1
debian/changelog vendored

@ -6,6 +6,7 @@ livecd-rootfs (2.76) UNRELEASED; urgency=low
- Fix installation of ubuntu-server fstab removal hook.
- Pass --architectures to 'lb config', to make it easier to build images
for a different architecture.
- Attempt to restrict task installation to the native architecture.
-- Colin Watson <cjwatson@ubuntu.com> Thu, 23 Aug 2012 09:43:38 +0100

@ -39,8 +39,26 @@ add_task ()
shift
local task
# The removal of direct task installation support from live-build
# poses some problems. If the chroot has multiarch configured - for
# example, if we're building for amd64 - then dumpavail will show
# foreign-architecture packages which will have their own Task
# lines, but which we don't want to install. (Compare
# PackageContainerInterface::FromTask in apt, which restricts task
# expansion to the native architecture.) We therefore restrict our
# search to stanzas with Architecture: $ARCH or all.
#
# However, even this may not be accurate enough. At the moment I
# have no idea what happens if an Architecture: all package has
# different Task fields on different architectures. This is
# probably a lurking timebomb that we need to fix. In the meantime,
# the Architecture restriction at least saves us from abject
# failure.
for task; do
echo "!chroot chroot apt-cache dumpavail | grep-dctrl -nsPackage -wFTask $task" >> "config/package-lists/livecd-rootfs.list.chroot_$pass"
# We need a ridiculous number of backslashes to protect
# 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"
done
}

Loading…
Cancel
Save