diff options
author | Daniel Baumann <daniel@debian.org> | 2012-06-04 10:41:57 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2012-06-04 11:55:18 +0200 |
commit | ead507b47ce7f51ff89fc2701c54e681447f096e (patch) | |
tree | 52e346b368ee4b40f8d15a575695bf7be31a4e11 /scripts/build/lb_binary_debian-installer | |
parent | 4007e00a56c2664a23acbcac98299e6729d7b289 (diff) | |
download | vyos-live-build-ead507b47ce7f51ff89fc2701c54e681447f096e.tar.gz vyos-live-build-ead507b47ce7f51ff89fc2701c54e681447f096e.zip |
Making firmware package assembling a bit more robust.
Diffstat (limited to 'scripts/build/lb_binary_debian-installer')
-rwxr-xr-x | scripts/build/lb_binary_debian-installer | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/scripts/build/lb_binary_debian-installer b/scripts/build/lb_binary_debian-installer index 31370c036..60cdfacfa 100755 --- a/scripts/build/lb_binary_debian-installer +++ b/scripts/build/lb_binary_debian-installer @@ -413,19 +413,27 @@ then # Assumption: firmware packages install files into /lib/firmware # Get all firmware packages names - FIRMWARE_PACKAGES="$(wget ${WGET_OPTIONS} ${LB_PARENT_MIRROR_CHROOT}/dists/${LB_PARENT_DISTRIBUTION}/Contents-${LB_ARCHITECTURES}.gz -O - | gunzip -c | awk '/^lib\/firmware/ { print $2 }' | sort -u)" + mkdir -p cache/contents.binary + wget ${WGET_OPTIONS} ${LB_PARENT_MIRROR_CHROOT}/dists/${LB_PARENT_DISTRIBUTION}/Contents-${LB_ARCHITECTURES}.gz -O - | gunzip -c > cache/contents.binary/contents.${LB_PARENT_DISTRIBUTION}.${LB_ARCHITECTURES} + + FIRMWARE_PACKAGES="" + FIRMWARE_PACKAGES="$(awk '/^lib\/firmware/ { print $2 }' cache/contents.binary/contents.${LB_PARENT_DISTRIBUTION}.${LB_ARCHITECTURES} | sort -u)" if [ "${LB_DERIVATIVE}" = "true" ] then - FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} $(wget ${WGET_OPTIONS} ${LB_MIRROR_CHROOT}/dists/${LB_DISTRIBUTION}/Contents-${LB_ARCHITECTURES}.gz -O - | gunzip -c | awk '/^lib\/firmware/ { print $2 }' | sort -u)" + wget {WGET_OPTIONS} ${LB_MIRROR_CHROOT}/dists/${LB_DISTRIBUTION}/Contents-${LB_ARCHITECTURES}.gz -O - | gunzip -c > cache/contents.binary/contents.${LB_DISTRIBUTION}.${LB_ARCHITECTURES} + + FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} $(awk '/^lib\/firmware/ { print $2 }' cache/contents.binary/contents.${LB_DISTRIBUTION}.${LB_ARCHITECTURES} | sort -u)" fi # Filter out contrib packages if contrib is not enabled if ! echo ${LB_ARCHIVE_AREAS} | grep -qs contrib then + _FIRMWARE_PACKAGES="" + for _PACKAGE in ${FIRMWARE_PACKAGES} do - _FIRMWARE_PACKAGES="${_FIRMWARE_PACKAGES} $(echo ${_PACKAGE} | grep -v '^contrib/')" + _FIRMWARE_PACKAGES="${_FIRMWARE_PACKAGES} $(echo ${_PACKAGE} | sed -e 's|^contrib/.*$||')" done FIRMWARE_PACKAGES="${_FIRMWARE_PACKAGES}" @@ -434,9 +442,11 @@ then # Filter out non-free packages if non-free is not enabled if ! echo ${LB_ARCHIVE_AREAS} | grep -qs non-free then + _FIRMWARE_PACKAGES="" + for _PACKAGE in ${FIRMWARE_PACKAGES} do - _FIRMWARE_PACKAGES="${_FIRMWARE_PACKAGES} $(echo ${_PACKAGE} | grep -v '^non-free/')" + _FIRMWARE_PACKAGES="${_FIRMWARE_PACKAGES} $(echo ${_PACKAGE} | sed -e 's|^non-free/.*$||')" done FIRMWARE_PACKAGES="${_FIRMWARE_PACKAGES}" |