2009-12-14 08:54:42 -01:00
|
|
|
#!/bin/sh
|
|
|
|
|
2010-09-02 11:12:37 +00:00
|
|
|
## live-build(7) - System Build Scripts
|
2011-01-11 12:49:49 -01:00
|
|
|
## Copyright (C) 2006-2011 Daniel Baumann <daniel@debian.org>
|
2010-09-02 11:12:37 +00:00
|
|
|
##
|
|
|
|
## live-build comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
|
|
|
|
## This is free software, and you are welcome to redistribute it
|
|
|
|
## under certain conditions; see COPYING for details.
|
|
|
|
|
2009-12-14 08:54:42 -01:00
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
# Including common functions
|
2010-09-07 13:11:20 +00:00
|
|
|
. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
|
2009-12-14 08:54:42 -01:00
|
|
|
|
|
|
|
# Setting static variables
|
2010-11-23 10:31:15 -01:00
|
|
|
DESCRIPTION="$(Echo 'queue install of local package lists into chroot')"
|
2009-12-14 08:54:42 -01:00
|
|
|
HELP=""
|
2011-06-11 14:36:44 +00:00
|
|
|
USAGE="${PROGRAM} {install|live} [--force]"
|
|
|
|
|
|
|
|
_PASS="${1}"
|
|
|
|
shift
|
2009-12-14 08:54:42 -01:00
|
|
|
|
|
|
|
Arguments "${@}"
|
|
|
|
|
|
|
|
# Reading configuration files
|
|
|
|
Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
|
|
|
|
Set_defaults
|
|
|
|
|
2011-06-11 14:36:44 +00:00
|
|
|
Echo_message "Begin queueing installation of local package lists (${_PASS} pass)..."
|
2009-12-14 08:54:42 -01:00
|
|
|
|
|
|
|
# Requiring stage file
|
|
|
|
Require_stagefile .stage/config .stage/bootstrap
|
|
|
|
|
|
|
|
# Checking stage file
|
2011-06-11 14:36:44 +00:00
|
|
|
Check_stagefile .stage/chroot_local-packagelists.${PASS}
|
2009-12-14 08:54:42 -01:00
|
|
|
|
|
|
|
# Checking lock file
|
|
|
|
Check_lockfile .lock
|
|
|
|
|
|
|
|
# Creating lock file
|
|
|
|
Create_lockfile .lock
|
|
|
|
|
2011-06-11 14:36:44 +00:00
|
|
|
if ls config/chroot_local-packagelists/*.list > /dev/null 2>&1 || \
|
|
|
|
ls config/chroot_local-packagelists/*.list.${_PASS} > /dev/null 2>&1
|
2009-12-14 08:54:42 -01:00
|
|
|
then
|
2011-06-11 14:36:44 +00:00
|
|
|
for LIST in config/chroot_local-packagelists/*.list config/chroot_local-packagelists/*.list.${_PASS}
|
2009-12-14 08:54:42 -01:00
|
|
|
do
|
2011-06-11 14:36:44 +00:00
|
|
|
if [ -e "${LIST}" ]
|
|
|
|
then
|
|
|
|
# Generating local package list
|
|
|
|
Expand_packagelist "$(basename ${LIST})" "config/chroot_local-packagelists" \
|
|
|
|
>> chroot/root/chroot_packages
|
|
|
|
fi
|
2009-12-14 08:54:42 -01:00
|
|
|
done
|
|
|
|
|
|
|
|
# Creating stage file
|
2011-06-11 14:36:44 +00:00
|
|
|
Create_stagefile .stage/chroot_local-packagelists.${_PASS}
|
2009-12-14 08:54:42 -01:00
|
|
|
fi
|