[SCM] ci-tooling packaging branch, master, updated. 25da4a7c0bd3bfd102f1a54d86c9baabfd2656b0

Harald Sitter apachelogger-guest at moszumanska.debian.org
Tue Mar 31 10:59:57 UTC 2015


Gitweb-URL: http://git.debian.org/?p=pkg-kde/ci-tooling.git;a=commitdiff;h=25da4a7

The following commit has been merged in the master branch:
commit 25da4a7c0bd3bfd102f1a54d86c9baabfd2656b0
Author: Harald Sitter <sitter at kde.org>
Date:   Tue Mar 31 12:59:52 2015 +0200

    use abort rather than fail
    
    fail will yield exceptions upwards ultimately allowing them to be rescued
    which is not intended here.
    abort prints the msg and exits 1, which is the intended behavior in the
    script
---
 kci/builder.rb | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/kci/builder.rb b/kci/builder.rb
index bbc7fe6..aa880d7 100755
--- a/kci/builder.rb
+++ b/kci/builder.rb
@@ -42,7 +42,7 @@ Project = Struct.new(:series, :stability, :name)
 # get basename, distro series, unstable/stable
 components = ARGV[0].split('_')
 unless components.size == 3
-  fail 'Did not get a valid project identifier via ARGV0'
+  abort 'Did not get a valid project identifier via ARGV0'
 end
 project = Project.new(components[0], components[1], components[2])
 
@@ -53,7 +53,7 @@ File.open('/etc/apt/apt.conf.d/apt-cacher', 'w') do |file|
 end
 
 # PWD
-fail 'Could not change dir to ARGV1' unless Dir.chdir(ARGV[1])
+abort 'Could not change dir to ARGV1' unless Dir.chdir(ARGV[1])
 
 WORKSPACE_PATH = ARGV[1]
 
@@ -89,8 +89,8 @@ end
 # create orig tar
 Dir.chdir('build/') do
   tar = "#{source_name}_#{version.tar}.orig.tar"
-  fail 'Failed to create a tarball' unless system("tar -cf #{tar} source")
-  fail 'Failed to compress the tarball' unless system("xz -6 #{tar}")
+  abort 'Failed to create a tarball' unless system("tar -cf #{tar} source")
+  abort 'Failed to compress the tarball' unless system("xz -6 #{tar}")
 end
 
 # Copy some more
@@ -107,7 +107,7 @@ Dir.chdir('build/source/') do
   args << '-v' << version.full
   args << '-D' << project.series
   args << '"Automatic Kubuntu Build"'
-  fail 'Failed to create changelog entry' unless system(env, 'dch', *args)
+  abort 'Failed to create changelog entry' unless system(env, 'dch', *args)
 end
 
 # Rip out locale install
@@ -155,7 +155,7 @@ end
 Dir.chdir('build/source/') do
   system('update-maintainer')
   unless system("dpkg-buildpackage -S -k#{KEYID}")
-    fail 'Failed to build source package'
+    abort 'Failed to build source package'
   end
 end
 
@@ -195,9 +195,9 @@ Dir.chdir('build/source/') do
     end
     sleep(60) # Sleep for a minute
   end
-  fail '		 !!!!!!!!!!!! dput failed two times !!!!!!!!!!!!' unless success
+  abort '		 !!!!!!!!!!!! dput failed two times !!!!!!!!!!!!' unless success
   Dir.chdir('../..') do # main dir
-    fail 'PPA Interaction Failed' unless system("#{File.expand_path(File.dirname(__FILE__))}/ppa-wait.py #{changelog.name} #{changelog.version} #{project.stability}")
+    abort 'PPA Interaction Failed' unless system("#{File.expand_path(File.dirname(__FILE__))}/ppa-wait.py #{changelog.name} #{changelog.version} #{project.stability}")
     # Write upload data to file, we perhaps want to do something outside the
     # build container.
     data = { :name => changelog.name,

-- 
ci-tooling packaging



More information about the pkg-kde-commits mailing list