From patchwork Tue Sep 28 13:18:25 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Whitcroft X-Patchwork-Id: 65968 X-Patchwork-Delegate: leann.ogasawara@canonical.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 3784DB7105 for ; Tue, 28 Sep 2010 23:18:37 +1000 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1P0a4i-0001pO-Sf; Tue, 28 Sep 2010 14:18:28 +0100 Received: from adelie.canonical.com ([91.189.90.139]) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1P0a4h-0001p6-Fp for kernel-team@lists.ubuntu.com; Tue, 28 Sep 2010 14:18:27 +0100 Received: from hutte.canonical.com ([91.189.90.181]) by adelie.canonical.com with esmtp (Exim 4.69 #1 (Debian)) id 1P0a4h-0006E0-Dy for ; Tue, 28 Sep 2010 14:18:27 +0100 Received: from 212-139-221-210.dynamic.dsl.as9105.com ([212.139.221.210] helo=localhost.localdomain) by hutte.canonical.com with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1P0a4h-0000p9-9w for kernel-team@lists.ubuntu.com; Tue, 28 Sep 2010 14:18:27 +0100 From: Andy Whitcroft To: kernel-team@lists.ubuntu.com Subject: [PATCH 1/1] UBUNTU: reduce disk usage during buildd builds Date: Tue, 28 Sep 2010 14:18:25 +0100 Message-Id: <1285679905-29131-2-git-send-email-apw@canonical.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1285679905-29131-1-git-send-email-apw@canonical.com> References: <1285679905-29131-1-git-send-email-apw@canonical.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com BugLink: http://bugs.launchpad.net/bugs/645653 For each flavour build we keep all of intermediate trees intact. This allows simple incremental updates in a development environment but leads to very large disk footprints on the build. For Maverick with three flavours we are seeing 19GB for i386 and 25GB for amd64. Anything over 15GB is likely to run the buildds out of disk and fail the build. When building on a buildd (in full_build=true mode) clean out the main build tree and the package tree for the debugging deb. This reduces consumption to more like 10GB maximum regardless of the flavour count. Signed-off-by: Andy Whitcroft Acked-by: Stefan Bader --- debian/rules.d/2-binary-arch.mk | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk index 1d26496..c66973d 100644 --- a/debian/rules.d/2-binary-arch.mk +++ b/debian/rules.d/2-binary-arch.mk @@ -267,6 +267,7 @@ endif binary-%: pkgimg = $(bin_pkg_name)-$* binary-%: pkghdr = $(hdrs_pkg_name)-$* binary-%: dbgpkg = $(bin_pkg_name)-$*-dbgsym +binary-%: dbgpkgdir = $(CURDIR)/debian/$(bin_pkg_name)-$*-dbgsym binary-%: install-% dh_testdir dh_testroot @@ -334,6 +335,12 @@ ifneq ($(skipdbg),true) # Now, the package wont get into the archive, but it will get put # into the debug system. endif +ifneq ($(full_build),false) + # Clean out this flavours build directory. + rm -rf $(builddir)/build-$* + # Clean out the debugging package source directory. + rm -rf $(dbgpkgdir) +endif $(stampdir)/stamp-flavours: @echo $(flavours) > $@