Example #1
0
def get_environment(env_name, build_architecture):
    name = dbget('env', env_name, 'name')
    repositories = [
        get_repository(name)
        for name in dblrange('env', env_name, 'repositories', 0, -1)
    ]
    if not dbsismember('env', env_name, 'build-architectures',
                       build_architecture):
        raise RuntimeError(
            build_architecture,
            'is not amongst allowed build architectures for %s: %s' %
            (env_name, ', '.join(
                dbsmembers('env', env_name, 'build-architectures'))))
    return Environment(name, repositories, build_architecture)
def get_repository(name):
    return Repository(dbget('repo', name, 'url'),
                      dbget('repo', name, 'suite'),
                      dblrange('repo', name, 'components', 0, -1))
def get_git(env_name, pkgname):
    return dbget('env', env_name, 'gitbase') % pkgname
def get_environment(env_name, build_architecture):
    name = dbget('env', env_name, 'name')
    repositories = [get_repository(name) for name in dblrange('env', env_name, 'repositories', 0, -1)]
    if not dbsismember('env', env_name, 'build-architectures', build_architecture):
        raise RuntimeError(build_architecture, 'is not amongst allowed build architectures for %s: %s' % (env_name, ', '.join(dbsmembers('env', env_name, 'build-architectures'))))
    return Environment(name, repositories, build_architecture)
Example #5
0
def get_git(env_name, pkgname):
    return dbget('env', env_name, 'gitbase') % pkgname
Example #6
0
def get_repository(name):
    return Repository(dbget('repo', name, 'url'), dbget('repo', name, 'suite'),
                      dblrange('repo', name, 'components', 0, -1))