summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorColin Watson <cjwatson@canonical.com>2011-06-11 13:31:08 +0200
committerDaniel Baumann <daniel@debian.org>2011-06-11 13:31:18 +0200
commit7b84bf949854474368c9690e56d472fc9ba94907 (patch)
tree124bfb3fc127aa51a8d2d29b6f28ffb11e70e778 /scripts
parentdc0775d7aed27fcd0bc442b9d9c5126c66a32768 (diff)
downloadvyos-live-build-7b84bf949854474368c9690e56d472fc9ba94907.tar.gz
vyos-live-build-7b84bf949854474368c9690e56d472fc9ba94907.zip
Use dpkg --force-unsafe-io if available (Closes: #630043).
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build/lb_chroot_dpkg11
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/build/lb_chroot_dpkg b/scripts/build/lb_chroot_dpkg
index 64c808526..819dbdae3 100755
--- a/scripts/build/lb_chroot_dpkg
+++ b/scripts/build/lb_chroot_dpkg
@@ -53,6 +53,14 @@ EOF
chmod 755 chroot/sbin/start-stop-daemon
+ # Disable dpkg syncing
+ if echo 'dpkg --compare-versions "$(dpkg-query -W --showformat="\${Version}" dpkg)" ge 1.15.8.6' | Chroot chroot sh
+ then
+ cat > chroot/etc/dpkg/dpkg.cfg.d/live-build << EOF
+force-unsafe-io
+EOF
+ fi
+
# Manual hacks for special packages
# samhain
@@ -95,6 +103,9 @@ EOF
mv chroot/sbin/start-stop-daemon.orig chroot/sbin/start-stop-daemon
fi
+ # Remove dpkg sync configuration
+ rm -f chroot/etc/dpkg/dpkg.cfg.d/live-build
+
# Removing stage file
rm -f .stage/chroot_dpkg
;;