]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
try to get better version and package names
authorHolger Levsen <holger@layer-acht.org>
Sun, 18 Sep 2011 12:05:58 +0000 (14:05 +0200)
committerHolger Levsen <holger@layer-acht.org>
Sun, 18 Sep 2011 12:05:58 +0000 (14:05 +0200)
kernel_inpbuilder.py

index b71ecd129b2f62a01a56384c149f0e33dc05c6ed..21e8b9fec663a1ca7c86696150e04a7eaee57876 100644 (file)
@@ -196,15 +196,15 @@ def git_checkout_branch():
     )
     return True
 
-def build_kernel(revision, parallel_jobs='auto', distcc=False):
+def build_kernel(version, revision, parallel_jobs='auto', distcc=False):
     if parallel_jobs == 'auto':
         parallel_jobs = DEFAULT_PARALLEL_JOBS
     else:
         parallel_jobs = int(parallel_jobs)
 
     cmd = [MAKE_KPKG, '-j', '%s' %(parallel_jobs), '--arch',
-            '%s' %(BUILD_ARCH), '--rootcmd', 'fakeroot', '--append_to_version',
-            '%s' %(revision), '--initrd', 'kernel_debug',
+            '%s' %(BUILD_ARCH), '--rootcmd', 'fakeroot', '--revision',
+            '%s' %(version), '--initrd', 'kernel_debug',
             'kernel_image', 'kernel_source', 'kernel_headers', 'modules']
 
     logger.info('start compile process')
@@ -277,6 +277,7 @@ def add_local_version_to_config(kernel_build_revision):
                 lino,
                 'CONFIG_LOCALVERSION="%s"\n' %(localversion)
         )
+    logger.info('CONFIG_LOCALVERSION set to %s' % localversion)
 
     try:
         fh = open(KERNEL_CONFIG_PATH, 'w', 1)
@@ -411,7 +412,7 @@ if __name__ == '__main__':
 
     new_version = REVISION
     try:
-        add_local_version_to_config(new_version)
+        kernel_version = add_local_version_to_config(new_version)
     except Exception, error:
         logger.exception(error)
         exit(ERROR)
@@ -429,7 +430,7 @@ if __name__ == '__main__':
             logger.error('Error during installation of extra kernel modules')
             exit(ERROR)
 
-    if not build_kernel(new_version):
+    if not build_kernel(kernel_version, new_version):
         exit(ERROR)
     else:
         ftp = FTP(