On Sun, 2014-12-14 at 17:56 +0000, Ian Campbell wrote: > On Fri, 2014-12-12 at 20:59 +0000, Ben Hutchings wrote: > > That implies we want to allow for about 1% growth > > from the size in the .0 release. > > I'm considering something like this. What do you think? > > diff --git a/debian/bin/buildcheck.py b/debian/bin/buildcheck.py > index a6f6f06..5bb815c 100755 > --- a/debian/bin/buildcheck.py > +++ b/debian/bin/buildcheck.py > @@ -174,6 +174,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) > > @@ -206,7 +208,18 @@ 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. Enforce that > + # development releases leave sufficient overhead. > + soft_value = value * 0.99 > + if size > soft_value: > + out.write('Image has <1%% overhead (%d > %d).' % (size, > soft_value)) > + if self.changelog.distribution in ["unstable", "experimental", > "UNRELEASED"]: > + out.write(' Refusing to continue.\n') > + return 1 > + out.write(' Continuing.\n')
I don't think this distribution condition is right: - If we're nowhere near a release, then it doesn't matter whether images in unstable or experimental nearly fill the space available. The size may go up or down a long way before we release. - If I'm preparing a stable update but don't think it's ready to upload yet then my test build may have distribution=UNRELEASED. 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. Ben. > + out.write('Image fits (%d <= %d, soft %d). Continuing.\n' % (size, > value, soft_value)) > return 0 > > -- Ben Hutchings The two most common things in the universe are hydrogen and stupidity.
signature.asc
Description: This is a digitally signed message part