From 0e8082555689d90db0ed2b554b4280b054178746 Mon Sep 17 00:00:00 2001 From: Benjamin Drung Date: Fri, 6 Jun 2014 11:25:32 +0200 Subject: [PATCH] debian_build.py: Rename archive01 to apt01. --- debian_build.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/debian_build.py b/debian_build.py index c01145b..d59a8a6 100755 --- a/debian_build.py +++ b/debian_build.py @@ -104,10 +104,10 @@ def getopts(): return parser.parse_args() -def upload_to_archive01(archive01_target, archive01_dist, changes_file, logger): +def upload_to_apt_repository(apt_target, apt_dist, changes_file, logger): try: - # Change distribution for archive01 in changes file - cmd = ['sed', '-i', r's/^\(Distribution: \).*$/\1' + archive01_dist + '/', + # Change distribution for new apt repository in changes file + cmd = ['sed', '-i', r's/^\(Distribution: \).*$/\1' + apt_dist + '/', changes_file] command = ' '.join(cmd) logger.debug('Executing "{command}" ...'.format(command=command)) @@ -117,7 +117,7 @@ def upload_to_archive01(archive01_target, archive01_dist, changes_file, logger): logger.warn('%s failed.' % command) return - cmd = ['dput', archive01_target, changes_file] + cmd = ['dput', apt_target, changes_file] command = ' '.join(cmd) logger.debug('Executing "{command}" ...'.format(command=command)) if subprocess.call(cmd) == 0: @@ -125,7 +125,7 @@ def upload_to_archive01(archive01_target, archive01_dist, changes_file, logger): else: logger.warn('%s failed.' % command) except Exception as error: - logger.warning("Experimental upload to http://archive01.pb.local failed. " + logger.warning("Experimental upload to http://apt01.pb.local failed. " "See above for details.", exc_info=error) @@ -214,8 +214,8 @@ if __name__ == '__main__': new_version = curr_version + options.version_suffix pb_suite = 'master-{dist}'.format(dist=curr_dist) reprepro_base = '/srv/pb-{dist}'.format(dist=curr_dist) - archive01_dist = curr_dist - archive01_target = "archive01-debian" + apt_dist = curr_dist + apt_target = "apt01-debian" # replace valid debian version chars that are invalid for git tagging new_tag = curr_version.replace('~', '_').replace(':', ',') @@ -271,8 +271,8 @@ if __name__ == '__main__': ) pb_suite = 'develop-{dist}'.format(dist=curr_dist) reprepro_base = '/srv/pb-{dist}'.format(dist=curr_dist) - archive01_dist = curr_dist + '-dev' - archive01_target = "archive01-debian" + apt_dist = curr_dist + '-dev' + apt_target = "apt01-debian" # reset actions # .. always include successful build packages into CIDB if curr_dist == 'squeeze': @@ -299,8 +299,8 @@ if __name__ == '__main__': suffix=options.version_suffix, ) reprepro_base = '/srv/dev-{dist}'.format(dist=curr_dist) - archive01_dist = curr_dist + "-" + local_branch.replace("/", "-") - archive01_target = "archive01-debian-dev" + apt_dist = curr_dist + "-" + local_branch.replace("/", "-") + apt_target = "apt01-debian-dev" else: logger.error('Don\'t know how to handle branch "{branch}".'.format( @@ -690,7 +690,7 @@ export {builder_env} FORCE_SHELL=TRUE figlet('Upload OK') - upload_to_archive01(archive01_target, archive01_dist, changes_file, logger) + upload_to_apt_repository(apt_target, apt_dist, changes_file, logger) except Exception as error: logger.error('Upload failed. See above for details.', exc_info=error) -- 2.39.5