firmware: reorder firmware list construction

the 'manually add firmware-linux package' bit was stuck inbetween the
parent and non-parent logic, which was especially unhelpful before we
de-duplicated the logic into a common function.

Gbp-Dch: Short
This commit is contained in:
Lyndon Brown 2020-02-11 18:08:43 +00:00 committed by Luca Boccassi
parent aa745de0bb
commit 94d126c043
2 changed files with 6 additions and 6 deletions

View File

@ -58,11 +58,9 @@ mkdir -p cache/contents.chroot
FIRMWARE_PACKAGES=""
Firmware_List_From_Contents "${LB_PARENT_MIRROR_CHROOT}" "${LB_PARENT_DISTRIBUTION_CHROOT}" "${LB_PARENT_ARCHIVE_AREAS}"
# Manually add firmware-linux/non-free meta package
if echo ${LB_PARENT_ARCHIVE_AREAS} | grep -qs "non-free"
then
# Manually add firmware-linux/non-free meta package
if [ "${LB_DERIVATIVE}" != "true" ]
then
FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} firmware-linux"
@ -77,6 +75,8 @@ then
fi
fi
Firmware_List_From_Contents "${LB_PARENT_MIRROR_CHROOT}" "${LB_PARENT_DISTRIBUTION_CHROOT}" "${LB_PARENT_ARCHIVE_AREAS}"
if [ "${LB_DERIVATIVE}" = "true" ]
then
# FIXME: account for the fact that PARENT_DISTRIBUTION and DISTRIBUTION might be the same (to not have overlapping cache files for contents).

View File

@ -346,11 +346,9 @@ then
FIRMWARE_PACKAGES=""
Firmware_List_From_Contents "${LB_PARENT_MIRROR_CHROOT}" "${LB_PARENT_DISTRIBUTION_CHROOT}" "${LB_PARENT_ARCHIVE_AREAS}"
# Manually add firmware-linux/non-free meta package
if echo ${LB_PARENT_ARCHIVE_AREAS} | grep -qs "non-free"
then
# Manually add firmware-linux/non-free meta package
if [ "${LB_DERIVATIVE}" != "true" ]
then
FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} firmware-linux"
@ -365,6 +363,8 @@ then
fi
fi
Firmware_List_From_Contents "${LB_PARENT_MIRROR_CHROOT}" "${LB_PARENT_DISTRIBUTION_CHROOT}" "${LB_PARENT_ARCHIVE_AREAS}"
if [ "${LB_DERIVATIVE}" = "true" ]
then
# FIXME: account for the fact that PARENT_DISTRIBUTION and DISTRIBUTION might be the same (to not have overlapping cache files for contents).