From: Holger Levsen Date: Wed, 19 Oct 2011 14:20:31 +0000 (+0200) Subject: make-kpkg: use overlay-dirs X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=a5ebc403d76e7dd7b592fbb0bbfaabd7bcabbb7f;p=profitbricks%2Fjenkins-build-scripts.git make-kpkg: use overlay-dirs --- diff --git a/kernel_build.py b/kernel_build.py index fb5e7a9..3877f9b 100644 --- a/kernel_build.py +++ b/kernel_build.py @@ -145,6 +145,7 @@ def build_kernel_with_pbuilder(revision, pbuilder_script, dist='stable'): '--git-branch-name', '%s' %(GIT_BRANCH_NAME), '--revision', '%s' %(revision), '--dist', '%s' %(dist), + '--overlay-dir', '%s' % os.path.join(CWD,'kernel-package-overlay'), ] os.environ.update({'DIST': '%s' %(dist)}) diff --git a/kernel_inpbuilder.py b/kernel_inpbuilder.py index 65602d4..5d1d148 100644 --- a/kernel_inpbuilder.py +++ b/kernel_inpbuilder.py @@ -129,6 +129,14 @@ def getopts(): help='Set the distribution. Default: %default' ) + parser.add_option( + '--overlay-dir', + dest='overlay-dir', + default=None, + metavar='OVERLAY_DIR', + help='Set the overlay-dir for make-kpkg Default: %default' + ) + return parser.parse_args() def git_clone_remote_repository(url, destination): @@ -199,7 +207,7 @@ def git_checkout_branch(): ) return True -def build_kernel(flavour, revision, parallel_jobs='auto', distcc=False): +def build_kernel(flavour, revision, overlay_dir, parallel_jobs='auto', distcc=False): if parallel_jobs == 'auto': parallel_jobs = DEFAULT_PARALLEL_JOBS else: @@ -208,7 +216,8 @@ def build_kernel(flavour, revision, parallel_jobs='auto', distcc=False): cmd = [MAKE_KPKG, '-j', '%s' %(parallel_jobs), '--arch', '%s' %(BUILD_ARCH), '--rootcmd', 'fakeroot', '--append-to-version', '-%s' %(flavour), - '--initrd', '--arch_in_name' + '--initrd', '--arch_in_name', + '--overlay-dir' % overlay_dir, ] # add targets cmd += [ 'kernel_debug', 'kernel_image', 'kernel_source', 'modules' ] @@ -414,7 +423,7 @@ if __name__ == '__main__': logger.error('Error during installation of extra kernel modules') exit(ERROR) - if not build_kernel(kernel_flavour, REVISION): + if not build_kernel(kernel_flavour, REVISION, options.overlay_dir): exit(ERROR) else: ftp = FTP(