summaryrefslogtreecommitdiff
path: root/scripts/build
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2012-11-02 11:50:44 +0100
committerDaniel Baumann <daniel@debian.org>2012-11-02 11:57:41 +0100
commitce36fd703f9205095bde179cbf2c6e355d519435 (patch)
tree1310f2fae9857f95c96eff08aa0023d4fe39a95d /scripts/build
parent0863d00128f20030dd9b8f8c6bea42efc61355a1 (diff)
downloadvyos-live-build-ce36fd703f9205095bde179cbf2c6e355d519435.tar.gz
vyos-live-build-ce36fd703f9205095bde179cbf2c6e355d519435.zip
Workarounding recent archive changes wrt/ content files until #692111 is fixed.
Diffstat (limited to 'scripts/build')
-rwxr-xr-xscripts/build/binary_debian-installer48
-rwxr-xr-xscripts/build/chroot_linux-image46
2 files changed, 34 insertions, 60 deletions
diff --git a/scripts/build/binary_debian-installer b/scripts/build/binary_debian-installer
index c7d764476..e18c32d2d 100755
--- a/scripts/build/binary_debian-installer
+++ b/scripts/build/binary_debian-installer
@@ -408,7 +408,6 @@ then
DI_PACKAGES="${DI_PACKAGES} console-setup keyboard-configuration kbd"
;;
esac
-
# Include firmware packages
if [ "${LB_FIRMWARE_BINARY}" = "true" ]
then
@@ -416,46 +415,33 @@ then
# Get all firmware packages names
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
- 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 _PARENT_ARCHIVE_AREA in ${LB_PARENT_ARCHIVE_AREAS}
+ do
+ wget ${WGET_OPTIONS} ${LB_PARENT_MIRROR_CHROOT}/dists/${LB_PARENT_DISTRIBUTION}/${_PARENT_ARCHIVE_AREA}/Contents-${LB_ARCHITECTURES}.gz -O - | gunzip -c > cache/contents.binary/contents.${LB_PARENT_DISTRIBUTION}.${_PARENT_ARCHIVE_AREA}.${LB_ARCHITECTURES}
- for _PACKAGE in ${FIRMWARE_PACKAGES}
- do
- _FIRMWARE_PACKAGES="${_FIRMWARE_PACKAGES} $(echo ${_PACKAGE} | sed -e 's|^contrib/.*$||')"
- done
+ FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} $(awk '/^lib\/firmware/ { print $2 }' cache/contents.binary/contents.${LB_PARENT_DISTRIBUTION}.${_PARENT_ARCHIVE_AREA}.${LB_ARCHITECTURES} | sort -u)"
- FIRMWARE_PACKAGES="${_FIRMWARE_PACKAGES}"
- fi
+ if [ "${_PARENT_ARCHIVE_AREA}" = "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"
+ fi
+ done
- # Filter out non-free packages if non-free is not enabled
- if ! echo ${LB_ARCHIVE_AREAS} | grep -qs non-free
+ if [ "${LB_DERIVATIVE}" = "true" ]
then
- _FIRMWARE_PACKAGES=""
+ # FIXME: account for the fact that PARENT_DISTRIBUTION and DISTRIBUTION might be the same (to not have overlapping cache files for contents).
- for _PACKAGE in ${FIRMWARE_PACKAGES}
+ for _ARCHIVE_AREA in ${LB_ARCHIVE_AREAS}
do
- _FIRMWARE_PACKAGES="${_FIRMWARE_PACKAGES} $(echo ${_PACKAGE} | sed -e 's|^non-free/.*$||')"
- done
-
- FIRMWARE_PACKAGES="${_FIRMWARE_PACKAGES}"
+ wget ${WGET_OPTIONS} ${LB_MIRROR_CHROOT}/dists/${LB_DISTRIBUTION}/${_ARCHIVE_AREA}/Contents-${LB_ARCHITECTURES}.gz -O - | gunzip -c > cache/contents.binary/contents.${LB_DISTRIBUTION}.${_ARCHIVE_AREA}.${LB_ARCHITECTURES}
- else
- # Manually add firmware-linux/non-free meta package
- FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} firmware-linux"
+ FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} $(awk '/^lib\/firmware/ { print $2 }' cache/contents.binary/contents.${LB_DISTRIBUTION}.${_ARCHIVE_AREA}.${LB_ARCHITECTURES} | sort -u)"
+ done
fi
# Drop section and keep package names only
diff --git a/scripts/build/chroot_linux-image b/scripts/build/chroot_linux-image
index 045182822..6e46b8542 100755
--- a/scripts/build/chroot_linux-image
+++ b/scripts/build/chroot_linux-image
@@ -60,45 +60,33 @@ then
# Get all firmware packages names
mkdir -p cache/contents.chroot
- wget ${WGET_OPTIONS} ${LB_PARENT_MIRROR_CHROOT}/dists/${LB_PARENT_DISTRIBUTION}/Contents-${LB_ARCHITECTURES}.gz -O - | gunzip -c > cache/contents.chroot/contents.${LB_PARENT_DISTRIBUTION}.${LB_ARCHITECTURES}
FIRMWARE_PACKAGES=""
- FIRMWARE_PACKAGES="$(awk '/^lib\/firmware/ { print $2 }' cache/contents.chroot/contents.${LB_PARENT_DISTRIBUTION}.${LB_ARCHITECTURES} | sort -u)"
- if [ "${LB_DERIVATIVE}" = "true" ]
- then
- wget {WGET_OPTIONS} ${LB_MIRROR_CHROOT}/dists/${LB_DISTRIBUTION}/Contents-${LB_ARCHITECTURES}.gz -O - | gunzip -c > cache/contents.chroot/contents.${LB_DISTRIBUTION}.${LB_ARCHITECTURES}
-
- FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} $(awk '/^lib\/firmware/ { print $2 }' cache/contents.chroot/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 _PARENT_ARCHIVE_AREA in ${LB_PARENT_ARCHIVE_AREAS}
+ do
+ wget ${WGET_OPTIONS} ${LB_PARENT_MIRROR_CHROOT}/dists/${LB_PARENT_DISTRIBUTION}/${_PARENT_ARCHIVE_AREA}/Contents-${LB_ARCHITECTURES}.gz -O - | gunzip -c > cache/contents.chroot/contents.${LB_PARENT_DISTRIBUTION}.${_PARENT_ARCHIVE_AREA}.${LB_ARCHITECTURES}
- for _PACKAGE in ${FIRMWARE_PACKAGES}
- do
- _FIRMWARE_PACKAGES="${_FIRMWARE_PACKAGES} $(echo ${_PACKAGE} | sed -e 's|^contrib/.*$||')"
- done
+ FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} $(awk '/^lib\/firmware/ { print $2 }' cache/contents.chroot/contents.${LB_PARENT_DISTRIBUTION}.${_PARENT_ARCHIVE_AREA}.${LB_ARCHITECTURES} | sort -u)"
- FIRMWARE_PACKAGES="${_FIRMWARE_PACKAGES}"
- fi
+ if [ "${_PARENT_ARCHIVE_AREA}" = "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"
+ fi
+ done
- # Filter out non-free packages if non-free is not enabled
- if ! echo ${LB_ARCHIVE_AREAS} | grep -qs non-free
+ if [ "${LB_DERIVATIVE}" = "true" ]
then
- _FIRMWARE_PACKAGES=""
+ # FIXME: account for the fact that PARENT_DISTRIBUTION and DISTRIBUTION might be the same (to not have overlapping cache files for contents).
- for _PACKAGE in ${FIRMWARE_PACKAGES}
+ for _ARCHIVE_AREA in ${LB_ARCHIVE_AREAS}
do
- _FIRMWARE_PACKAGES="${_FIRMWARE_PACKAGES} $(echo ${_PACKAGE} | sed -e 's|^non-free/.*$||')"
- done
+ wget ${WGET_OPTIONS} ${LB_MIRROR_CHROOT}/dists/${LB_DISTRIBUTION}/${_ARCHIVE_AREA}/Contents-${LB_ARCHITECTURES}.gz -O - | gunzip -c > cache/contents.chroot/contents.${LB_DISTRIBUTION}.${_ARCHIVE_AREA}.${LB_ARCHITECTURES}
- FIRMWARE_PACKAGES="${_FIRMWARE_PACKAGES}"
- else
- # Manually add firmware-linux/non-free meta package
- FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} firmware-linux"
+ FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} $(awk '/^lib\/firmware/ { print $2 }' cache/contents.chroot/contents.${LB_DISTRIBUTION}.${_ARCHIVE_AREA}.${LB_ARCHITECTURES} | sort -u)"
+ done
fi
# Drop section and keep package names only