From 6e553abcba39654ca4d2b02e7453a5958aad856b Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Tue, 13 Sep 2011 17:59:05 +0200 Subject: [PATCH] support profitbricks suites --- build.py | 10 +++++++++- lib/git_buildpackage.py | 4 +++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/build.py b/build.py index 93f7d9c..ec6986e 100755 --- a/build.py +++ b/build.py @@ -410,11 +410,19 @@ if __name__ == '__main__': else: raise Exception('No git_committer_email found') + if options.distribution in ('unstable' , 'experimental', 'pre-staging'): + pb_suite='pre-staging' + elif options.distribution in ('testing', 'staging'): + pb_suite='staging' + elif options.distribution in ('production', 'production-proposed-updates'): + pb_suite='production-proposed-updates' + gbp = git_buildpackage.GitBuildPackage( upstream_branch=GIT_UPSTREAM_BRANCH, debian_branch=GIT_DEBIAN_BRANCH, dist='squeeze', - arch='amd64' + arch='amd64', + pb_suite=pb_suite ) logger.info('starting git-buildpackage') diff --git a/lib/git_buildpackage.py b/lib/git_buildpackage.py index b54c6f0..65bfa8f 100644 --- a/lib/git_buildpackage.py +++ b/lib/git_buildpackage.py @@ -15,11 +15,12 @@ BIN_SUDO = '/usr/bin/sudo' # --git-debian-branch=debian --git-tag class GitBuildPackage(object): def __init__(self, upstream_branch=None, - debian_branch=None, dist=None, arch=None): + debian_branch=None, dist=None, arch=None, pb_suite=None): self.upstream_branch = upstream_branch self.debian_branch = debian_branch self.dist = dist self.arch = arch + self.pb_suite = pb_suite def build(self): @@ -33,6 +34,7 @@ class GitBuildPackage(object): env = os.environ env['DIST'] = self.dist + env['PB_SUITE'] = self.pb_suite cmdobj = subprocess.Popen( cmd, -- 2.39.5