Pass parallel job count to auto-debuild
authorRalf Jung <post@ralfj.de>
Fri, 27 Jul 2012 15:30:50 +0000 (17:30 +0200)
committerRalf Jung <post@ralfj.de>
Fri, 27 Jul 2012 15:30:50 +0000 (17:30 +0200)
build_system.py

index 9a646538f321c1e739777dccd3a2c784c13e2b8a..8ebf6f34aa215149f222b3302d106813f3c6b330 100644 (file)
@@ -50,16 +50,19 @@ try:
                                'name': config['debName'],
                                'email': config['debEMail'],
                        }
-                       self.copyFromModule(module, 'buildDepends')
-                       self.copyFromModule(module, 'binaryDepends')
+                       self.copyOption(config, 'jobs', 'parallelJobs')
+                       self.copyOption(module, 'dbgPackage')
+                       self.copyOption(module, 'buildDepends')
+                       self.copyOption(module, 'binaryDepends')
                        if buildSystem == 'cmake':
-                               self.copyFromModule(module, 'cmakeParameters')
+                               self.copyOption(module, 'cmakeParameters')
                        self.vcs = vcs
                        self.configured = False # make sure configure is called before build/install
 
-               def copyFromModule(self, module, name):
-                       if name in module:
-                               self.autoDebuildConfig[name] = module[name]
+               def copyOption(self, src, name, dstName = None):
+                       if dstName is None: dstName = name # per default, stick with original name
+                       if name in src:
+                               self.autoDebuildConfig[dstName] = src[name]
 
                def configure(self, force=False): # force is ignored
                        self.autoDebuildConfig['version'] = self.vcs.version() # by now, data has been fetched, so this is possible