[SCM] ci-tooling packaging branch, master, updated. 1042ba92e05fa573a1a8af0667852e926052729e

Rohan Garg rohangarg-guest at moszumanska.debian.org
Wed Dec 3 17:38:49 UTC 2014


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

The following commit has been merged in the master branch:
commit 1042ba92e05fa573a1a8af0667852e926052729e
Author: Rohan Garg <rohan at kde.org>
Date:   Wed Dec 3 18:34:37 2014 +0100

    Make sure we split first and then strip whitespaces and what not
    
    This is primarily done because if we strip Source: foo
 then
    split it, we get an extra whitespace. Instead we can just split
    first and strip out things later.
    
    Add some additional error handling.
---
 dci/build.rb | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/dci/build.rb b/dci/build.rb
index b945afa..abfdffc 100644
--- a/dci/build.rb
+++ b/dci/build.rb
@@ -14,8 +14,8 @@ logger = Logger.new(STDOUT)
 if not ARGV[1].end_with? '.changes'
     logger.fatal("#{ARGV[1]} is not an actual changes file. Abort!")
 else
-    package_name = `grep Source #{ARGV[1]}`.strip.split(':')[-1]
-    package_version = `grep Version #{ARGV[1]}`.strip.split(':')[-1]
+    package_name = `grep Source #{ARGV[1]}`.split(':')[-1].strip
+    package_version = `grep Version #{ARGV[1]}`.split(':')[-1].strip
 
     result_dir = "/tmp/build/#{package_name}"
 
@@ -33,8 +33,8 @@ else
     logger.info("Extracting source")
     Dir.mktmpdir { |dir|
         Dir.chdir(dir) {
-          system("dcmd cp -v #{ARGV[1]} #{dir}")
-          system("dpkg-source -x *.dsc")
+          raise "Can't copy changes!" unless system("dcmd cp -v #{ARGV[1]} #{dir}")
+          raise "Can't extract dsc!" unless system("dpkg-source -x *.dsc")
 
           package_folder = Dir.glob("#{package_name}*").select { |fn| File.directory? fn }
           Dir.chdir(package_folder[0]) {

-- 
ci-tooling packaging



More information about the pkg-kde-commits mailing list