3
# lh_chroot_localpackageslists(1) - install local packages lists into chroot
4
# Copyright (C) 2006-2007 Daniel Baumann <daniel@debian.org>
6
# live-helper comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
7
# This is free software, and you are welcome to redistribute it
8
# under certain conditions; see COPYING for details.
12
# Source common functions
13
for FUNCTION in /usr/share/live-helper/functions/*.sh
18
# Set static variables
19
DESCRIPTION="install local packages into chroot"
21
USAGE="${PROGRAM} [--force]"
25
Echo_debug "Init ${PROGRAM}"
27
# Reading configuration files
28
Read_conffile config/common
29
Read_conffile config/bootstrap
30
Read_conffile config/chroot
31
Read_conffile config/binary
32
Read_conffile config/source
35
Breakpoint "chroot_localpackageslists: Init"
37
# Requiring stage file
38
Require_stagefile .stage/bootstrap
41
Check_stagefile .stage/chroot_localpackageslists
49
if ls config/chroot_localpackageslists/* &> /dev/null
52
Restore_cache cache/packages_localpackageslists
54
for PACKAGESLIST in config/chroot_localpackageslists/*
56
# Copying package list
57
grep -v "^#" "${PACKAGESLIST}" > chroot/root/"`basename ${PACKAGESLIST}`"
59
# Installing package list
62
Chroot "xargs --arg-file=/root/`basename ${PACKAGESLIST}` apt-get install --yes"
66
Chroot "xargs --arg-file=/root/`basename ${PACKAGESLIST}` aptitude install --assume-yes"
70
# Removing package list
71
rm -f chroot/root/"`basename ${PACKAGESLIST}`"
75
Save_cache cache/packages_localpackageslists
78
Create_stagefile .stage/chroot_localpackageslists