On Sun, 2014-12-14 at 19:26 +0000, Ben Hutchings wrote: > I think it would be better to add an unconditional warning, rather than > an error, when there is < 1% free space left. I realise this will be > easy to ignore but it's still better than an unnecessary failure.
OK, makes sense. Here's what I'm currently running with, I'll push it along with the size reduction stuff. Ian. commit 42c4d12d02edbf8ca065d4d21f8fdc668ec095cc Author: Ian Campbell <i...@debian.org> Date: Mon Dec 15 21:25:38 2014 +0000 [armel] 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. diff --git a/debian/bin/buildcheck.py b/debian/bin/buildcheck.py index 38241df..8cad299 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 6492cda..ae58576 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 <b...@decadent.org.uk> Sat, 13 Dec 2014 11:45:48 +0000 -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org