summaryrefslogtreecommitdiff
path: root/scripts/build
diff options
context:
space:
mode:
authorLyndon Brown <jnqnfe@gmail.com>2020-02-10 18:57:18 +0000
committerLuca Boccassi <bluca@debian.org>2020-03-05 22:13:57 +0000
commit4933beffce1f4467bf93ef5fc6711e4d2dff901f (patch)
treeb7f1fb656749616ceb7c63a15e6013d0e6306e34 /scripts/build
parentc53a94932583ad8030594dd021e4a035ffcc872f (diff)
downloadvyos-live-build-4933beffce1f4467bf93ef5fc6711e4d2dff901f.tar.gz
vyos-live-build-4933beffce1f4467bf93ef5fc6711e4d2dff901f.zip
firmware: delete pointlessly cached (large) file after use
the archive content file downloaded to obtain a list of firmware packages is always deleted and downloaded afresh currently. it may not be ideal that we do not make use of the cache here, however while that remains unaddressed, we might as well delete the file after we've used it in order to not pointlessly waste disk space. note that this file is ~613 MB for sid-amd64 currently. Gbp-Dch: Short Closes: #952907
Diffstat (limited to 'scripts/build')
-rwxr-xr-xscripts/build/chroot_firmware2
-rwxr-xr-xscripts/build/installer_debian-installer2
2 files changed, 4 insertions, 0 deletions
diff --git a/scripts/build/chroot_firmware b/scripts/build/chroot_firmware
index 1070ccbae..e644a5584 100755
--- a/scripts/build/chroot_firmware
+++ b/scripts/build/chroot_firmware
@@ -107,6 +107,8 @@ then
FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} $(awk '/^lib\/firmware/ { print $2 }' "${CONTENTS_FILE}" | sort -u)"
fi
+rm -f "${CONTENTS_FILE}"
+
# Drop section and keep package names only
for _PACKAGE in ${FIRMWARE_PACKAGES}
do
diff --git a/scripts/build/installer_debian-installer b/scripts/build/installer_debian-installer
index b4802b3f9..dcfd1792b 100755
--- a/scripts/build/installer_debian-installer
+++ b/scripts/build/installer_debian-installer
@@ -395,6 +395,8 @@ then
FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} $(awk '/^lib\/firmware/ { print $2 }' "${CONTENTS_FILE}" | sort -u)"
fi
+ rm -f "${CONTENTS_FILE}"
+
# Drop section and keep package names only
for _PACKAGE in ${FIRMWARE_PACKAGES}
do