Package: live-build Version: 4.0.3-1 Tags: patch Attached is a patch (based on debian-next) that should hopefully address the derivative-is-based-on fixme relating to installing non-free firmware.
Untested, requires review.
From f625fc30b499a1e808338e7a894c343445e9006f Mon Sep 17 00:00:00 2001 From: jnqnfe <jnq...@gmail.com> Date: Mon, 24 Nov 2014 19:40:30 +0000 Subject: [PATCH] Address "should check that we're building on debian through e.g. a 'derivative-is-based-on' variable or somesuch" fixme. --- functions/defaults.sh | 1 + scripts/build/chroot_firmware | 14 ++++++++++++-- scripts/build/installer_debian-installer | 14 ++++++++++++-- 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/functions/defaults.sh b/functions/defaults.sh index feebdee..c8be5af 100755 --- a/functions/defaults.sh +++ b/functions/defaults.sh @@ -127,6 +127,7 @@ Set_defaults () progress-linux) LB_DISTRIBUTION="${LB_DISTRIBUTION:-baureo}" LB_DERIVATIVE="true" + LB_DERIVATIVE_IS_BASED_ON="debian" ;; ubuntu) diff --git a/scripts/build/chroot_firmware b/scripts/build/chroot_firmware index b2446f7..3f29fd8 100755 --- a/scripts/build/chroot_firmware +++ b/scripts/build/chroot_firmware @@ -69,9 +69,19 @@ done if echo ${LIVE_IMAGE_PARENT_ARCHIVE_AREAS} | grep -qs "non-free" then - # FIXME: should check that we're building on debian through e.g. a 'derivative-is-based-on' variable or somesuch. # Manually add firmware-linux/non-free meta package - FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} firmware-linux" + if [ "${LB_DERIVATIVE}" != "true" ] + then + FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} firmware-linux" + else + case "${LB_DERIVATIVE_IS_BASED_ON}" in + debian) + FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} firmware-linux" + ;; + *) + ;; + esac + fi fi if [ "${LB_DERIVATIVE}" = "true" ] diff --git a/scripts/build/installer_debian-installer b/scripts/build/installer_debian-installer index 6415fff..078f0f8 100755 --- a/scripts/build/installer_debian-installer +++ b/scripts/build/installer_debian-installer @@ -432,9 +432,19 @@ then if echo ${LIVE_IMAGE_PARENT_ARCHIVE_AREAS} | grep -qs "non-free" then - # FIXME: should check that we're building on debian through e.g. a 'derivative-is-based-on' variable or somesuch. # Manually add firmware-linux/non-free meta package - FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} firmware-linux" + if [ "${LB_DERIVATIVE}" != "true" ] + then + FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} firmware-linux" + else + case "${LB_DERIVATIVE_IS_BASED_ON}" in + debian) + FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} firmware-linux" + ;; + *) + ;; + esac + fi fi if [ "${LB_DERIVATIVE}" = "true" ] -- 1.9.4.msysgit.0