Shuffeling dpkg tmpfs hack arround in preparation for generic tmpfs support.
This commit is contained in:
parent
55c277027e
commit
933d803877
|
@ -842,6 +842,8 @@ Set_defaults ()
|
|||
# Setting chroot option
|
||||
LB_BUILD_WITH_CHROOT="${LB_BUILD_WITH_CHROOT:-true}"
|
||||
|
||||
LB_BUILD_WITH_TMPFS="${LB_BUILD_WITH_TMPFS:-false}"
|
||||
|
||||
# Setting debian-installer option
|
||||
LB_DEBIAN_INSTALLER="${LB_DEBIAN_INSTALLER:-false}"
|
||||
|
||||
|
|
|
@ -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 ${*}
|
||||
|
|
|
@ -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
|
||||
;;
|
||||
|
||||
*)
|
Loading…
Reference in New Issue