diff --git a/debian/bin/buildcheck.py b/debian/bin/buildcheck.py index 38241df87..8cad29989 100755 --- a/debian/bin/buildcheck.py +++ b/debian/bin/buildcheck.py @@ -172,6 +172,8 @@ class CheckImage(object): self.dir = dir self.arch, self.featureset, self.flavour = arch, featureset, flavour + self.changelog = Changelog(version=VersionLinux)[0] + self.config_entry_build = config.merge('build', arch, featureset, flavour) self.config_entry_image = config.merge('image', arch, featureset, flavour) @@ -204,7 +206,20 @@ class CheckImage(object): out.write('Image too large (%d > %d)! Refusing to continue.\n' % (size, value)) return 1 - out.write('Image fits (%d <= %d). Continuing.\n' % (size, value)) + # 1% overhead is desirable in order to cope with growth + # through the lifetime of a stable release. Warn if this is + # not the case. + usage = (float(size)/value) * 100.0 + out.write('Image size %d/%d, using %.2f%%. ' % (size, value, usage)) + if size > value: + sys.write('Too large. Refusing to continue.\n') + return 1 + elif usage >= 99.0: + out.write('Under 1%% space in %s. ' % self.changelog.distribution) + else: + out.write('Image fits. ') + out.write('Continuing.\n') + return 0 diff --git a/debian/changelog b/debian/changelog index 6492cda1a..ae585760f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -14,6 +14,9 @@ linux (3.16.7-ckt2-2) UNRELEASED; urgency=medium OMAP5_DSS_HDMI, DISPLAY_ENCODER_TPD12S015, DISPLAY_CONNECTOR_HDMI, USB_DWC3_OMAP, EXTCON_PALMAS, TI_EMIF and DDR. Based on a patch from Chen Baozi (Closes: #772953) + * [armel] Change configuration to reduce kernel image size + - Warn if image size leaves less than 1% spare capacity in the flash. This + allows some slack for growth over the lifetime of a stable release. -- Ben Hutchings Sat, 13 Dec 2014 11:45:48 +0000