summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2026-09-04 11:21:22 +0200
committerChristian Breunig <christian@breunig.cc>2026-09-04 11:21:22 +0200
commite8e28f49f97807d119903cfef93fe13585422bf6 (patch)
tree1cc50d5ee529d52ccf6dfb621571f8cb7b5ecd42 /scripts
parente93197a7f18470107eaa30fc13623f10f6da0c34 (diff)
downloadvyos-build-e8e28f49f97807d119903cfef93fe13585422bf6.tar.gz
vyos-build-e8e28f49f97807d119903cfef93fe13585422bf6.zip
T9277: add noticable warning when installing debug packages
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/image-build/build-vyos-image16
1 files changed, 16 insertions, 0 deletions
diff --git a/scripts/image-build/build-vyos-image b/scripts/image-build/build-vyos-image
index 40d9cfdf..0f9e1ef8 100755
--- a/scripts/image-build/build-vyos-image
+++ b/scripts/image-build/build-vyos-image
@@ -783,6 +783,22 @@ Pin-Priority: 600
for f in local_packages:
shutil.copy(f, os.path.join(defaults.LOCAL_PACKAGES_PATH, os.path.basename(f)))
+ ## T9277: Debug packages are installed on purpose - placing a .deb into
+ ## packages/ is a deliberate act - but linux-image-*-dbg alone expands to
+ ## ~2.3 GB in the rootfs, so make the cost impossible to miss.
+ debug_packages = [f for f in local_packages
+ if re.search(r'-dbg(sym)?_', os.path.basename(f))]
+ if debug_packages:
+ print("W: " + "=" * 60)
+ print(f"W: Installing {len(debug_packages)} debug package(s) from packages/:")
+ for f in sorted(debug_packages):
+ size_mb = os.path.getsize(f) / (1024 * 1024)
+ print(f"W: {os.path.basename(f)} ({size_mb:.1f} MB deb)")
+ print("W: Debug symbols expand significantly in the rootfs and will")
+ print("W: noticeably increase the image size. Remove them from packages/")
+ print("W: if this was unintended.")
+ print("W: " + "=" * 60)
+
## Build the image
print("I: Starting image build")
if debug: