summaryrefslogtreecommitdiff
path: root/scripts/build/chroot_firmware
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/build/chroot_firmware')
-rwxr-xr-xscripts/build/chroot_firmware20
1 files changed, 18 insertions, 2 deletions
diff --git a/scripts/build/chroot_firmware b/scripts/build/chroot_firmware
index 4a65d552a..7fdd7605d 100755
--- a/scripts/build/chroot_firmware
+++ b/scripts/build/chroot_firmware
@@ -79,9 +79,25 @@ Firmware_List_From_Contents "${LB_PARENT_MIRROR_CHROOT}" "${LB_PARENT_DISTRIBUTI
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).
+ # Avoid downloading things twice if distributions are identical
+ DERIVATIVE_ARCHIVE_AREAS=""
+ if [ "${LB_DISTRIBUTION_CHROOT}" != "${LB_PARENT_DISTRIBUTION_CHROOT}" ]
+ then
+ DERIVATIVE_ARCHIVE_AREAS="${LB_ARCHIVE_AREAS}"
+ else
+ for _ARCHIVE_AREA in ${LB_ARCHIVE_AREAS}
+ do
+ if ! In_list ${_ARCHIVE_AREA} "${LB_PARENT_ARCHIVE_AREAS}"
+ then
+ DERIVATIVE_ARCHIVE_AREAS="${DERIVATIVE_ARCHIVE_AREAS} ${_ARCHIVE_AREA}"
+ fi
+ done
+ fi
- Firmware_List_From_Contents "${LB_MIRROR_CHROOT}" "${LB_DISTRIBUTION_CHROOT}" "${LB_ARCHIVE_AREAS}"
+ if [ ! -z "${DERIVATIVE_ARCHIVE_AREAS}" ]
+ then
+ Firmware_List_From_Contents "${LB_MIRROR_CHROOT}" "${LB_DISTRIBUTION_CHROOT}" "${DERIVATIVE_ARCHIVE_AREAS}"
+ fi
fi
# Drop section and keep package names only