rename some options for a more consistent naming; fix auto-debuild build system
authorRalf Jung <post@ralfj.de>
Wed, 1 Aug 2012 19:37:48 +0000 (21:37 +0200)
committerRalf Jung <post@ralfj.de>
Wed, 1 Aug 2012 19:37:48 +0000 (21:37 +0200)
build_system.py
config.py.sample
kdebuildpy.py
vcs.py

index 2e10aed32425644878128ebe572cf401202c90c7..975c2c558103579cd245a87b9a2e646caea5aecd 100644 (file)
@@ -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',
index 672c79d12e933f9cbc42df8bb220e264d071df2c..8c2487641ce81c0e48e442842607d8e48a083ea9 100644 (file)
@@ -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')
        ]},
 ]
index 91ce798dcd2caaeac6ec131987110d0e36ad57c2..99267e8aecb2129d48b00faeedbb9a40d1b1d176 100755 (executable)
@@ -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 b2387c7f53eb65e2207a9577bdb613652a7ffde0..f40c6e9c4e8915b7549668e49cbf9e9ced0c6346 100644 (file)
--- 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