summaryrefslogtreecommitdiff
path: root/scripts/build
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2010-10-28 09:51:55 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 19:20:34 +0100
commit3df7f06c17afff66c7c94f278863c2759572ca6c (patch)
treef740f004ea2a2430f325adb86e38ef37a221c43a /scripts/build
parent38b9fb600d7fdfd39219d690240234378bcd27f4 (diff)
downloadvyos-live-build-3df7f06c17afff66c7c94f278863c2759572ca6c.tar.gz
vyos-live-build-3df7f06c17afff66c7c94f278863c2759572ca6c.zip
Shuffeling dpkg tmpfs hack arround in preparation for generic tmpfs support.
Diffstat (limited to 'scripts/build')
-rwxr-xr-xscripts/build/lb_chroot4
-rwxr-xr-xscripts/build/lb_chroot_tmpfs (renamed from scripts/build/lb_chroot_dpkg_tmpfs)13
2 files changed, 11 insertions, 6 deletions
diff --git a/scripts/build/lb_chroot b/scripts/build/lb_chroot
index 2fe7283a9..a5e83f044 100755
--- a/scripts/build/lb_chroot
+++ b/scripts/build/lb_chroot
@@ -42,7 +42,7 @@ lb chroot_selinuxfs install ${*}
lb chroot_sysfs install ${*}
lb chroot_debianchroot install ${*}
lb chroot_dpkg install ${*}
-lb chroot_dpkg_tmpfs install ${*}
+lb chroot_tmpfs install ${*}
lb chroot_sysv-rc install ${*}
lb chroot_upstart install ${*}
lb chroot_hosts install ${*}
@@ -79,7 +79,7 @@ lb chroot_resolv remove ${*}
lb chroot_hosts remove ${*}
lb chroot_sysv-rc remove ${*}
lb chroot_upstart remove ${*}
-lb chroot_dpkg_tmpfs remove ${*}
+lb chroot_tmpfs remove ${*}
lb chroot_dpkg remove ${*}
lb chroot_debianchroot remove ${*}
lb chroot_sysfs remove ${*}
diff --git a/scripts/build/lb_chroot_dpkg_tmpfs b/scripts/build/lb_chroot_tmpfs
index db3b8bf68..411452c52 100755
--- a/scripts/build/lb_chroot_dpkg_tmpfs
+++ b/scripts/build/lb_chroot_tmpfs
@@ -14,7 +14,7 @@ set -e
. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
# Setting static variables
-DESCRIPTION="$(Echo 'manage /var/lib/dpkg')"
+DESCRIPTION="$(Echo 'use tmpfs to speedup the build')"
HELP=""
USAGE="${PROGRAM} {install|remove} [--force]"
@@ -24,6 +24,11 @@ Arguments "${@}"
Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
Set_defaults
+if [ "${LB_BUILD_WITH_TMPFS}" != "true" ]
+then
+ exit 0
+fi
+
# Requiring stage file
Require_stagefile .stage/config .stage/bootstrap
@@ -32,7 +37,7 @@ case "${1}" in
Echo_message "Configuring tmpfs for /var/lib/dpkg"
# Checking stage file
- Check_stagefile .stage/chroot_dpkg_tmpfs
+ Check_stagefile .stage/chroot_tmpfs
# Checking lock file
Check_lockfile .lock
@@ -47,7 +52,7 @@ case "${1}" in
rm -rf chroot/var/lib/dpkg.tmp
# Creating stage file
- Create_stagefile .stage/chroot_dpkg_tmpfs
+ Create_stagefile .stage/chroot_tmpfs
;;
remove)
@@ -66,7 +71,7 @@ case "${1}" in
mv chroot/var/lib/dpkg.tmp chroot/var/lib/dpkg
# Removing stage file
- rm -f .stage/chroot_dpkg_tmpfs
+ rm -f .stage/chroot_tmpfs
;;
*)