From f6838fd4e5da99d47cce6de13c11ddabf946cd81 Mon Sep 17 00:00:00 2001 From: Benjamin Drung Date: Thu, 24 Jul 2014 01:31:43 +0200 Subject: [PATCH] debian_build.py: Use correct changes filename. --- debian_build.py | 17 +---------------- lib/sbuild.py | 5 +++++ 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/debian_build.py b/debian_build.py index a4692a0..ed2dc95 100755 --- a/debian_build.py +++ b/debian_build.py @@ -728,22 +728,7 @@ export {builder_env} FORCE_SHELL=TRUE dpkg_build_version = dpkg_build_version.split(":", 1)[1] # construct path for changes file - changes_file = os.path.join( - ENV['WORKSPACE'], - '../build-area/result/', - '{name}_{version}_amd64.changes'.format( - name=curr_name, - version=dpkg_build_version, - ) - ) - - # display changes file - fh = open(changes_file, 'r') - logger.info('Content of {file}\n{content}'.format( - file=changes_file, - content=fh.read(), - )) - fh.close() + changes_file = builder.changes_file # upload to Debian archive if not upload_to_apt_repository(apt_target, changes_file, logger): diff --git a/lib/sbuild.py b/lib/sbuild.py index 521099c..60de654 100644 --- a/lib/sbuild.py +++ b/lib/sbuild.py @@ -44,6 +44,11 @@ class Sbuild(object): ] return result + @property + def changes_file(self): + changes_filename = os.path.splitext(self.dsc_file)[0] + '_' + self.arch + '.changes' + return os.path.join(self.dsc_dir, changes_filename) + def build(self): ''' TODO -- 2.39.5