From 31dbf95d865503f7d3c67ed3ded6cb9926dfc3b4 Mon Sep 17 00:00:00 2001 From: jnqnfe Date: Mon, 24 Nov 2014 19:40:30 +0000 Subject: 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 095a7a20e..0e9bf3700 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 7c9091124..f62a17468 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 65631326b..a0868248e 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" ] -- cgit v1.2.3