summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorJan Blunck <jblunck@infradead.org>2014-07-10 11:42:21 +0200
committerJan Blunck <jblunck@infradead.org>2014-07-10 11:42:21 +0200
commitb6843f33786e56b55bad2a7903cf6d64c6bc70b2 (patch)
treecee5bbf58e21d68a17402f9ac3b1cc9086bb2270 /Build
parent47f3515c412468cad9020c68883d115309362ebc (diff)
livebuild: Introduce build-packages:livebuild Project Configuration variable
This variable can be used to override the list of dependencies that live-build expects to have available in the buildroot. Signed-off-by: Jan Blunck <jblunck@infradead.org>
Diffstat (limited to 'Build')
-rw-r--r--Build/LiveBuild.pm23
1 files changed, 14 insertions, 9 deletions
diff --git a/Build/LiveBuild.pm b/Build/LiveBuild.pm
index ab27273..379869c 100644
--- a/Build/LiveBuild.pm
+++ b/Build/LiveBuild.pm
@@ -71,16 +71,21 @@ sub parse {
# check that directory layout matches live-build directory structure
- # TODO: add dependency injection package based on $LB_DISTRIBUTION
- my @packages = ( 'live-build-desc-wheezy' );
-
+ # defaults live-build package dependencies base on 4.0~a26 gathered with:
+ # $ grep Check_package -r /usr/lib/live/build
my @lb4_requirements = (
- 'live-boot', 'live-config', 'e2fsprogs', 'squashfs-tools', 'mtd-tools',
- 'dosfstools', 'parted', 'grub', 'syslinux', 'syslinux-common',
- 'librsvg2-bin', 'xorriso', 'zsync', 'apt-utils', 'dctrl-tools',
- 'debconf', 'wget' );
-
- push @packages, @lb4_requirements;
+ 'apt-utils', 'dctrl-tools', 'debconf', 'dosfstools', 'e2fsprogs', 'grub',
+ 'librsvg2-bin', 'live-boot', 'live-config', 'mtd-tools', 'parted',
+ 'squashfs-tools', 'syslinux', 'syslinux-common', 'wget', 'xorriso',
+ 'zsync' );
+
+ # dependency injection based on live-build version
+ my @packages = @{$config->{'substitute'}->{'build-packages:livebuild'} || []};
+ push @packages, @lb4_requirements unless @packages;
+
+ # always require the list of packages required by live-boot for
+ # bootstrapping the target distribution image (e.g. with debootstrap)
+ push @packages, ( 'live-build-desc' );
for my $file ($tar->list_files('')) {
next unless $file =~ /^config\/package-lists\/.*\.list.*/;