summaryrefslogtreecommitdiff
path: root/scripts/image-build
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2026-09-14 11:46:19 +0100
committerGitHub <noreply@github.com>2026-09-14 11:46:19 +0100
commit7a5205d66cf20f2edff3e96d7e8d6f14d4f90df8 (patch)
treea8bdd618f1cec84f06510ade3aaa8735d89f14e6 /scripts/image-build
parent1bae4beea17f1228d4afe7007244584f3b885eac (diff)
parent51313ee0f53b98dbb61d9774ebc6a11207a2b53f (diff)
downloadvyos-build-7a5205d66cf20f2edff3e96d7e8d6f14d4f90df8.tar.gz
vyos-build-7a5205d66cf20f2edff3e96d7e8d6f14d4f90df8.zip
Merge pull request #1291 from c-po/image-size
T9277: image: further reduced installed and ISO image size
Diffstat (limited to 'scripts/image-build')
-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 ea8d2f4c..00b63bfc 100755
--- a/scripts/image-build/build-vyos-image
+++ b/scripts/image-build/build-vyos-image
@@ -789,6 +789,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: