From: Ralf Jung Date: Wed, 1 Aug 2012 19:37:48 +0000 (+0200) Subject: rename some options for a more consistent naming; fix auto-debuild build system X-Git-Url: https://git.ralfj.de/mass-build.git/commitdiff_plain/e14e79eb3d371385da62524a6555307446296482?hp=0847fb06e91eacd061980ca614957f2134692600 rename some options for a more consistent naming; fix auto-debuild build system --- diff --git a/build_system.py b/build_system.py index 2e10aed..975c2c5 100644 --- a/build_system.py +++ b/build_system.py @@ -49,7 +49,7 @@ try: # create auto-debuild configuration autoDebuildConfig = { 'sourceName': self.module['name'], - 'buildSystem': self.module['build-system'], + 'buildSystem': self.module['buildSystem'], 'debDir': self.debDir, 'buildDir': self.buildFolder, 'name': self.debName, @@ -57,7 +57,7 @@ try: 'parallelJobs': self.jobs, 'version': self.vcs.version() } - if self.autoDebuildConfig['version'] is None: + if autoDebuildConfig['version'] is None: raise Exception("VCS did not provide us with a proper version number, please fix this") # copy some more optional configuration for option in ('dbgPackage', 'binarySkipFiles', 'binaryInstallFiles', 'buildDepends', 'binaryDepends', 'binaryRecommends', diff --git a/config.py.sample b/config.py.sample index 672c79d..8c24876 100644 --- a/config.py.sample +++ b/config.py.sample @@ -9,16 +9,17 @@ installCmdPrefix = [] defaultGitVersion = 'origin/master' # or 'origin/KDE/4.8' or 'v4.8.4' defaultSvnVersion = 'trunk/KDE' # or 'branches/KDE/4.8' or 'tags/KDE/4.8.4' def KDEGitModule(name, version=defaultGitVersion, **module): - module['name'] = 'kde:'+name - module['vcs'] = 'git' + module['name'] = name module['build-system'] = 'cmake' + module['vcs'] = 'git' + module['url'] = 'kde:'+name # relies on the kde: prefix being set up for git module['version'] = version return module def KDESvnModule(name, svnPath=defaultSvnVersion, **module): module['name'] = name - module['vcs'] = 'svn' module['build-system'] = 'cmake' - module['version'] = 'svn://svn.kde.org/home/kde/'+svnPath+'/'+name + module['vcs'] = 'svn' + module['url'] = 'svn://svn.kde.org/home/kde/'+svnPath+'/'+name return module # the modules we are interested in modules = [ @@ -44,6 +45,6 @@ modules = [ ]}, # Extragear {'folder': 'extragear', 'modules': [ - KDEGitModule('networkmanagement', 'v0.9.0.3') + KDEGitModule('networkmanagement', 'v0.9.0.4') ]}, ] diff --git a/kdebuildpy.py b/kdebuildpy.py index 91ce798..99267e8 100755 --- a/kdebuildpy.py +++ b/kdebuildpy.py @@ -35,16 +35,16 @@ class Project: # VCS vcsName = module['vcs'] if vcsName == 'git': - self.vcs = vcs.Git(self.sourceFolder(), module['name'], module['version']) + self.vcs = vcs.Git(self.sourceFolder(), module['url'], module['version']) elif vcsName == 'svn': - self.vcs = vcs.SVN(self.sourceFolder(), module['svn-path'], module.get('versionName')) + self.vcs = vcs.SVN(self.sourceFolder(), module['url'], module.get('versionName')) else: raise Exception("Unknown VCS type "+vcsName) # build system if config.get('buildDeb', False): self.buildSystem = build_system.AutoDebuild(self.sourceFolder(), self.buildFolder(), module, self.vcs, config) else: - buildSystemName = module['build-system'] + buildSystemName = module['buildSystem'] if buildSystemName == 'cmake': self.buildSystem = build_system.CMake(self.sourceFolder(), self.buildFolder(), module, config) else: diff --git a/vcs.py b/vcs.py index b2387c7..f40c6e9 100644 --- a/vcs.py +++ b/vcs.py @@ -54,17 +54,17 @@ class Git: # Fetch updates via SVN class SVN: - def __init__(self, folder, svnPath, versionName): + def __init__(self, folder, url, versionName): self.folder = os.path.abspath(folder) - self.svnPath = svnPath + self.url = url self.versionName = versionName def update(self): if os.path.exists(self.folder): os.chdir(self.folder) # go into repository - subprocess.check_call(['svn', 'switch', self.svnPath]) # and update to the URL we got + subprocess.check_call(['svn', 'switch', self.url]) # and update to the URL we got else: - subprocess.check_call(['svn', 'co', self.svnPath, self.folder])# just download it + subprocess.check_call(['svn', 'co', self.url, self.folder]) # just download it def version(self): return self.versionName