summaryrefslogtreecommitdiff
path: root/scripts/build
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/build')
-rwxr-xr-xscripts/build/lb_binary_manifest7
-rwxr-xr-xscripts/build/lb_chroot17
-rwxr-xr-xscripts/build/lb_chroot_install-packages10
-rwxr-xr-xscripts/build/lb_chroot_local-packagelists25
-rwxr-xr-xscripts/build/lb_chroot_local-tasklists25
-rwxr-xr-xscripts/build/lb_chroot_packagelists12
-rwxr-xr-xscripts/build/lb_clean2
7 files changed, 62 insertions, 36 deletions
diff --git a/scripts/build/lb_binary_manifest b/scripts/build/lb_binary_manifest
index 0ae9051d8..e80d7808b 100755
--- a/scripts/build/lb_binary_manifest
+++ b/scripts/build/lb_binary_manifest
@@ -61,10 +61,9 @@ case "${LB_INITRAMFS}" in
esac
# Add filesystem.packages
-Chroot chroot "dpkg-query -W" > binary/"${INITFS}"/filesystem.${SUFFIX}
-
-# Copy manifest as build output.
-cp binary/"${INITFS}"/filesystem.${SUFFIX} binary.${SUFFIX}
+cp binary.packages.live "binary/${INITFS}/filesystem.${SUFFIX}"
+echo "$(diff binary.packages.live binary.packages.install | awk '/^< / { print $2 }')" \
+ > "binary/${INITFS}/filesystem.${SUFFIX}-remove"
# Creating stage file
Create_stagefile .stage/binary_manifest
diff --git a/scripts/build/lb_chroot b/scripts/build/lb_chroot
index 0b9e39fd2..eb4781dc0 100755
--- a/scripts/build/lb_chroot
+++ b/scripts/build/lb_chroot
@@ -55,11 +55,18 @@ lb chroot_sources install ${*}
lb chroot_linux-image ${*}
lb chroot_preseed ${*}
lb chroot_local-preseed ${*}
-lb chroot_packagelists ${*}
-lb chroot_local-packagelists ${*}
-lb chroot_local-packages ${*}
-lb chroot_install-packages ${*}
-lb chroot_local-tasklists ${*}
+
+for _PASS in install live
+do
+ lb chroot_packagelists ${_PASS} ${*}
+ lb chroot_local-packagelists ${_PASS} ${*}
+ lb chroot_local-packages ${_PASS} ${*}
+ lb chroot_install-packages ${_PASS} ${*}
+ lb chroot_local-tasklists ${_PASS} ${*}
+
+ Chroot chroot "dpkg-query -W" > binary.packages.${_PASS}
+done
+
lb chroot_local-includes ${*}
lb chroot_local-patches ${*}
lb chroot_local-hooks ${*}
diff --git a/scripts/build/lb_chroot_install-packages b/scripts/build/lb_chroot_install-packages
index a0e2684d2..cd3c17825 100755
--- a/scripts/build/lb_chroot_install-packages
+++ b/scripts/build/lb_chroot_install-packages
@@ -17,6 +17,10 @@ set -e
DESCRIPTION="$(Echo 'install queued packages into chroot')"
HELP=""
USAGE="${PROGRAM} [--force]"
+USAGE="${PROGRAM} {install|live} [--force]"
+
+_PASS="${1}"
+shift
Arguments "${@}"
@@ -24,13 +28,13 @@ Arguments "${@}"
Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
Set_defaults
-Echo_message "Begin installing packages..."
+Echo_message "Begin installing packages (${_PASS} pass)..."
# Requiring stage file
Require_stagefile .stage/config .stage/bootstrap
# Checking stage file
-Check_stagefile .stage/chroot_install-packages
+Check_stagefile .stage/chroot_install-packages.${PASS}
# Checking lock file
Check_lockfile .lock
@@ -63,4 +67,4 @@ then
fi
# Creating stage file
-Create_stagefile .stage/chroot_install-packages
+Create_stagefile .stage/chroot_install-packages.${_PASS}
diff --git a/scripts/build/lb_chroot_local-packagelists b/scripts/build/lb_chroot_local-packagelists
index 2f1da90c0..20566e9ab 100755
--- a/scripts/build/lb_chroot_local-packagelists
+++ b/scripts/build/lb_chroot_local-packagelists
@@ -16,7 +16,10 @@ set -e
# Setting static variables
DESCRIPTION="$(Echo 'queue install of local package lists into chroot')"
HELP=""
-USAGE="${PROGRAM} [--force]"
+USAGE="${PROGRAM} {install|live} [--force]"
+
+_PASS="${1}"
+shift
Arguments "${@}"
@@ -24,13 +27,13 @@ Arguments "${@}"
Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
Set_defaults
-Echo_message "Begin queueing installation of local package lists..."
+Echo_message "Begin queueing installation of local package lists (${_PASS} pass)..."
# Requiring stage file
Require_stagefile .stage/config .stage/bootstrap
# Checking stage file
-Check_stagefile .stage/chroot_local-packagelists
+Check_stagefile .stage/chroot_local-packagelists.${PASS}
# Checking lock file
Check_lockfile .lock
@@ -38,15 +41,19 @@ Check_lockfile .lock
# Creating lock file
Create_lockfile .lock
-if ls config/chroot_local-packagelists/*.list > /dev/null 2>&1
+if ls config/chroot_local-packagelists/*.list > /dev/null 2>&1 || \
+ ls config/chroot_local-packagelists/*.list.${_PASS} > /dev/null 2>&1
then
- for LIST in config/chroot_local-packagelists/*.list
+ for LIST in config/chroot_local-packagelists/*.list config/chroot_local-packagelists/*.list.${_PASS}
do
- # Generating local package list
- Expand_packagelist "$(basename ${LIST})" "config/chroot_local-packagelists" \
- >> chroot/root/chroot_packages
+ if [ -e "${LIST}" ]
+ then
+ # Generating local package list
+ Expand_packagelist "$(basename ${LIST})" "config/chroot_local-packagelists" \
+ >> chroot/root/chroot_packages
+ fi
done
# Creating stage file
- Create_stagefile .stage/chroot_local-packagelists
+ Create_stagefile .stage/chroot_local-packagelists.${_PASS}
fi
diff --git a/scripts/build/lb_chroot_local-tasklists b/scripts/build/lb_chroot_local-tasklists
index 98bf353ac..2eef3553a 100755
--- a/scripts/build/lb_chroot_local-tasklists
+++ b/scripts/build/lb_chroot_local-tasklists
@@ -16,7 +16,10 @@ set -e
# Setting static variables
DESCRIPTION="$(Echo 'install local task lists into chroot')"
HELP=""
-USAGE="${PROGRAM} [--force]"
+USAGE="${PROGRAM} {install|live} [--force]"
+
+_PASS="${1}"
+shift
Arguments "${@}"
@@ -24,13 +27,13 @@ Arguments "${@}"
Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
Set_defaults
-Echo_message "Begin installation of local task lists..."
+Echo_message "Begin installation of local task lists (${_PASS} pass)..."
# Requiring stage file
Require_stagefile .stage/config .stage/bootstrap
# Checking stage file
-Check_stagefile .stage/chroot_local-tasklists
+Check_stagefile .stage/chroot_local-tasklists.${_PASS}
# Checking lock file
Check_lockfile .lock
@@ -38,13 +41,17 @@ Check_lockfile .lock
# Creating lock file
Create_lockfile .lock
-if ls config/chroot_local-tasklists/*.list > /dev/null 2>&1
+if ls config/chroot_local-tasklists/*.list > /dev/null 2>&1 || \
+ ls config/chroot_local-tasklists/*.list.${_PASS} > /dev/null 2>&1
then
- for LIST in config/chroot_local-tasklists/*.list
+ for LIST in config/chroot_local-tasklists/*.list config/chroot_local-tasklists/*.list.${_PASS}
do
- # Generating local task list
- Expand_packagelist "$(basename ${LIST})" "config/chroot_local-tasklists" \
- >> chroot/root/chroot_tasks
+ if [ -e "${LIST}" ]
+ then
+ # Generating local task list
+ Expand_packagelist "$(basename ${LIST})" "config/chroot_local-tasklists" \
+ >> chroot/root/chroot_tasks
+ fi
done
# Restoring cache
@@ -137,5 +144,5 @@ then
Save_cache cache/packages_chroot
# Creating stage file
- Create_stagefile .stage/chroot_local-tasklists
+ Create_stagefile .stage/chroot_local-tasklists.${_PASS}
fi
diff --git a/scripts/build/lb_chroot_packagelists b/scripts/build/lb_chroot_packagelists
index d3b178b50..4525465f6 100755
--- a/scripts/build/lb_chroot_packagelists
+++ b/scripts/build/lb_chroot_packagelists
@@ -16,7 +16,10 @@ set -e
# Setting static variables
DESCRIPTION="$(Echo 'queue install of package lists into chroot')"
HELP=""
-USAGE="${PROGRAM} [--force]"
+USAGE="${PROGRAM} {install|live} [--force]"
+
+_PASS="${1}"
+shift
Arguments "${@}"
@@ -24,13 +27,13 @@ Arguments "${@}"
Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
Set_defaults
-Echo_message "Begin queueing installation of package lists..."
+Echo_message "Begin queueing installation of package lists (${_PASS} pass)..."
# Requiring stage file
Require_stagefile .stage/config .stage/bootstrap
# Checking stage file
-Check_stagefile .stage/chroot_packagelists
+Check_stagefile .stage/chroot_packagelists.${_PASS}
# Checking lock file
Check_lockfile .lock
@@ -40,7 +43,6 @@ Create_lockfile .lock
if [ -n "${LB_PACKAGE_LISTS}" ] && [ "${LB_PACKAGE_LISTS}" != "none" ]
then
-
for LIST in ${LB_PACKAGE_LISTS}
do
# Generating package list
@@ -48,5 +50,5 @@ then
done
# Creating stage file
- Create_stagefile .stage/chroot_packagelists
+ Create_stagefile .stage/chroot_packagelists.${_PASS}
fi
diff --git a/scripts/build/lb_clean b/scripts/build/lb_clean
index d690a3aec..bbf3e470d 100755
--- a/scripts/build/lb_clean
+++ b/scripts/build/lb_clean
@@ -95,7 +95,7 @@ do
rm -f binary*.img
rm -f binary*.tar.gz
rm -f binary.sh
- rm -f binary.list binary.packages md5sum.txt
+ rm -f binary.list binary.packages binary.packages.install binary.packages.live md5sum.txt
rm -rf binary
rm -rf tftpboot