From 013845dbfbbcc9cbb1b56a51a17525b917ee9141 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Thu, 3 Nov 2011 17:28:00 +0100 Subject: [PATCH] build sources as part of the regular kernel build again --- kernel_build.py | 32 -------------------------------- kernel_inpbuilder.py | 25 +++++-------------------- 2 files changed, 5 insertions(+), 52 deletions(-) diff --git a/kernel_build.py b/kernel_build.py index d3838a1..2a3b55f 100644 --- a/kernel_build.py +++ b/kernel_build.py @@ -14,9 +14,6 @@ from logging import Formatter import kernel_persistence import urllib -JOB_URL = 'http://rwittler:MiMaMopel@jenkins:80/job/%(flavour)s-source/buildWithParameters?' -JOB_DELAY = '0sec' - CWD = os.environ.get('WORKSPACE') BUILD_NUMBER = os.environ.get('BUILD_NUMBER') BUILD_ID = os.environ.get('BUILD_ID') @@ -73,11 +70,6 @@ def send_email(result): def build_kernel_with_pbuilder(revision, pbuilder_script, dist='stable'): pbuilder_script = os.path.abspath(pbuilder_script) - if os.environ.get('SOURCE_BUILD'): - SOURCE_BUILD='--source-only=True' - else: - SOURCE_BUILD='' - cmd = [ SUDO, PBUILDER, @@ -98,7 +90,6 @@ def build_kernel_with_pbuilder(revision, pbuilder_script, dist='stable'): '--revision', '%s' %(revision), '--dist', '%s' %(dist), '--overlay-dir', '%s' % os.path.join(CWD,'kernel-package-overlay'), - SOURCE_BUILD ] os.environ.update({'DIST': '%s' %(dist)}) @@ -165,27 +156,4 @@ if __name__ == '__main__': dist='stable'): exit_error() - # trigger source build - logger.info('Triggering source build now') - flavour=GIT_REPO_NAME[6:-4] - urlencode_expansion_dict = { - 'flavour': 'linux-%s' % flavour - } - url = HudsonUrl() - data = urllib.urlencode( - ( - ('GIT_REPO_PATH', GIT_REPO_PATH), - ('DISTRIBUTION', pb_suite), - ('delay', JOB_DELAY) - ) - ) - ret = url.open(JOB_URL %(urlencode_expansion_dict) + '%s' %(data)) - - if ret.code == 200: - logger.info('jenkins url called successfully.') - else: - logger.info('URL was %s' % JOB_URL %(urlencode_expansion_dict) + '%s' %(data)) - logger.info('jenkins sends the following: %s' %(ret.read()) ) - exit_error() - exit_ok() diff --git a/kernel_inpbuilder.py b/kernel_inpbuilder.py index b0c6769..9fb12bd 100644 --- a/kernel_inpbuilder.py +++ b/kernel_inpbuilder.py @@ -137,14 +137,6 @@ def getopts(): help='Set the overlay-dir for make-kpkg Default: %default' ) - parser.add_option( - '--source-only', - dest='source_only', - default=False, - metavar='SOURCE_ONLY', - help='If set, only build source packages. Default: %default' - ) - return parser.parse_args() def git_clone_remote_repository(url, destination): @@ -458,19 +450,12 @@ if __name__ == '__main__': logger.info('Running %s' % cmd) os.system(cmd) - if options.source_only: - # only build source - logger.info('Lets build only sources') - if not build_kernel(kernel_flavour, REVISION, OVERLAY_DIR, [ 'kernel_source' ]): - exit(ERROR) - else: - # build binaries and modules - if not build_kernel(kernel_flavour, REVISION, OVERLAY_DIR, [ 'kernel_debug', 'kernel_image' ]): + if not build_kernel(kernel_flavour, REVISION, OVERLAY_DIR, [ 'kernel_image', 'kernel_source', 'kernel_debug' ]): + exit(ERROR) + if has_extra_modules(): + if not install_extra_modules(): + logger.error('Error during installation of extra kernel modules') exit(ERROR) - if has_extra_modules(): - if not install_extra_modules(): - logger.error('Error during installation of extra kernel modules') - exit(ERROR) if not build_kernel(kernel_flavour, REVISION, OVERLAY_DIR, [ 'modules' ]): exit(ERROR) -- 2.39.5