]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
deal with epochs
authorHolger Levsen <holger@layer-acht.org>
Mon, 19 Sep 2011 08:39:15 +0000 (10:39 +0200)
committerHolger Levsen <holger@layer-acht.org>
Mon, 19 Sep 2011 08:39:15 +0000 (10:39 +0200)
debian_build.py

index b940e7b39410d42f01a5bcaed4634db4a9577c29..1f38caf7e6a95f8f40f0b6d8395cd13ecaec0fef 100755 (executable)
@@ -489,11 +489,15 @@ if __name__ == '__main__':
         try:
             create_dput_cfg()
             changes_file =  os.path.join(GIT_TARGET_WORKSPACE, 'build-area/result/', '%s_%s_amd64.changes' % (pkg_name, version))
-            dput_package_upload(changes_file)
-
+            # strip epoch
+            if ":" in changes_file:
+                changes_file = changes_file.split(":", 1)[1]
+            # display changes file
             fh = open(changes_file, 'r')
             logger.info('%s' % (fh.read()))
             fh.close()
+            # upload
+            dput_package_upload(changes_file)
             exit_ok()
         except Exception, error:
             logger.exception(error)