diff options
author | Lyndon Brown <jnqnfe@gmail.com> | 2020-02-10 16:29:59 +0000 |
---|---|---|
committer | Luca Boccassi <bluca@debian.org> | 2020-03-05 22:13:57 +0000 |
commit | c140efe41e04f24fdd443122176203b68e4978cb (patch) | |
tree | 8a7959ad699414ba919c9185f49f53005e9bfb87 | |
parent | 055907592c851372000a9c12f14e04d299be859c (diff) | |
download | vyos-live-build-c140efe41e04f24fdd443122176203b68e4978cb.tar.gz vyos-live-build-c140efe41e04f24fdd443122176203b68e4978cb.zip |
firmware: avoid building unnecessary lists
-rwxr-xr-x | scripts/build/chroot_firmware | 12 | ||||
-rwxr-xr-x | scripts/build/installer_debian-installer | 12 |
2 files changed, 12 insertions, 12 deletions
diff --git a/scripts/build/chroot_firmware b/scripts/build/chroot_firmware index 2d634d203..2d980e2ac 100755 --- a/scripts/build/chroot_firmware +++ b/scripts/build/chroot_firmware @@ -59,12 +59,12 @@ mkdir -p cache/contents.chroot FIRMWARE_PACKAGES="" -_CONTENTS="$(for _PARENT_ARCHIVE_AREA in ${LB_PARENT_ARCHIVE_AREAS}; do echo ${LB_PARENT_MIRROR_CHROOT}/dists/${LB_PARENT_DISTRIBUTION_CHROOT}/${_PARENT_ARCHIVE_AREA}/Contents-${LB_ARCHITECTURES}.gz; done)" - rm -f cache/contents.chroot/contents.${LB_PARENT_DISTRIBUTION_CHROOT}.${LB_ARCHITECTURES} -for _CONTENT in ${_CONTENTS} +for _PARENT_ARCHIVE_AREA in ${LB_PARENT_ARCHIVE_AREAS} do + _CONTENT="${LB_PARENT_MIRROR_CHROOT}/dists/${LB_PARENT_DISTRIBUTION_CHROOT}/${_PARENT_ARCHIVE_AREA}/Contents-${LB_ARCHITECTURES}.gz" + wget ${WGET_OPTIONS} ${_CONTENT} -O - | gunzip -c >> cache/contents.chroot/contents.${LB_PARENT_DISTRIBUTION_CHROOT}.${LB_ARCHITECTURES} FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} $(awk '/^lib\/firmware/ { print $2 }' cache/contents.chroot/contents.${LB_PARENT_DISTRIBUTION_CHROOT}.${LB_ARCHITECTURES} | sort -u)" @@ -91,12 +91,12 @@ 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). - _CONTENTS="$(for _ARCHIVE_AREA in ${LB_ARCHIVE_AREAS}; do echo ${LB_MIRROR_CHROOT}/dists/${LB_DISTRIBUTION_CHROOT}/${_ARCHIVE_AREA}/Contents-${LB_ARCHITECTURES}.gz; done)" - rm -f cache/contents.chroot/contents.${LB_DISTRIBUTION_CHROOT}.${LB_ARCHITECTURES} - for _CONTENT in ${_CONTENTS} + for _ARCHIVE_AREA in ${LB_ARCHIVE_AREAS} do + _CONTENT="${LB_MIRROR_CHROOT}/dists/${LB_DISTRIBUTION_CHROOT}/${_ARCHIVE_AREA}/Contents-${LB_ARCHITECTURES}.gz" + wget ${WGET_OPTIONS} ${_CONTENT} -O - | gunzip -c >> cache/contents.chroot/contents.${LB_DISTRIBUTION_CHROOT}.${LB_ARCHITECTURES} FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} $(awk '/^lib\/firmware/ { print $2 }' cache/contents.chroot/contents.${LB_DISTRIBUTION_CHROOT}.${LB_ARCHITECTURES} | sort -u)" diff --git a/scripts/build/installer_debian-installer b/scripts/build/installer_debian-installer index f4b272a9b..4990b69a1 100755 --- a/scripts/build/installer_debian-installer +++ b/scripts/build/installer_debian-installer @@ -347,12 +347,12 @@ then FIRMWARE_PACKAGES="" - _CONTENTS="$(for _PARENT_ARCHIVE_AREA in ${LB_PARENT_ARCHIVE_AREAS}; do echo ${LB_PARENT_MIRROR_CHROOT}/dists/${LB_PARENT_DISTRIBUTION_CHROOT}/${_PARENT_ARCHIVE_AREA}/Contents-${LB_ARCHITECTURES}.gz; done)" - rm -f cache/contents.chroot/contents.${LB_PARENT_DISTRIBUTION_CHROOT}.${LB_ARCHITECTURES} - for _CONTENT in ${_CONTENTS} + for _PARENT_ARCHIVE_AREA in ${LB_PARENT_ARCHIVE_AREAS} do + _CONTENT="${LB_PARENT_MIRROR_CHROOT}/dists/${LB_PARENT_DISTRIBUTION_CHROOT}/${_PARENT_ARCHIVE_AREA}/Contents-${LB_ARCHITECTURES}.gz" + wget ${WGET_OPTIONS} ${_CONTENT} -O - | gunzip -c >> cache/contents.chroot/contents.${LB_PARENT_DISTRIBUTION_CHROOT}.${LB_ARCHITECTURES} FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} $(awk '/^lib\/firmware/ { print $2 }' cache/contents.chroot/contents.${LB_PARENT_DISTRIBUTION_CHROOT}.${LB_ARCHITECTURES} | sort -u)" @@ -379,12 +379,12 @@ then then # FIXME: account for the fact that PARENT_DISTRIBUTION and DISTRIBUTION might be the same (to not have overlapping cache files for contents). - _CONTENTS="$(for _ARCHIVE_AREA in ${LB_ARCHIVE_AREAS}; do echo ${LB_MIRROR_CHROOT}/dists/${LB_DISTRIBUTION_CHROOT}/${_ARCHIVE_AREA}/Contents-${LB_ARCHITECTURES}.gz; done)" - rm -f cache/contents.chroot/contents.${LB_DISTRIBUTION_CHROOT}.${LB_ARCHITECTURES} - for _CONTENT in ${_CONTENTS} + for _ARCHIVE_AREA in ${LB_ARCHIVE_AREAS} do + _CONTENT="${LB_MIRROR_CHROOT}/dists/${LB_DISTRIBUTION_CHROOT}/${_ARCHIVE_AREA}/Contents-${LB_ARCHITECTURES}.gz" + wget ${WGET_OPTIONS} ${_CONTENT} -O - | gunzip -c >> cache/contents.chroot/contents.${LB_DISTRIBUTION_CHROOT}.${LB_ARCHITECTURES} FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} $(awk '/^lib\/firmware/ { print $2 }' cache/contents.chroot/contents.${LB_DISTRIBUTION_CHROOT}.${LB_ARCHITECTURES} | sort -u)" |