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

Harald Sitter apachelogger-guest at moszumanska.debian.org
Fri Oct 16 08:40:07 UTC 2015


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

The following commit has been merged in the master branch:
commit 13ec8ec2dfccd3daa0a9c21d47995954729caab2
Author: Harald Sitter <sitter at kde.org>
Date:   Fri Oct 16 10:17:43 2015 +0200

    properly implement tarball origification including copying
---
 lib/ci/tarball.rb       | 2 +-
 test/test_ci_tarball.rb | 9 +++++++++
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/lib/ci/tarball.rb b/lib/ci/tarball.rb
index 857c42a..85312f7 100644
--- a/lib/ci/tarball.rb
+++ b/lib/ci/tarball.rb
@@ -35,7 +35,7 @@ module CI
       match = name.match(/(?<name>.+)-(?<version>[\d.]+)\.(?<ext>tar(.*))/)
       old_path = @path
       @path = "#{dir}/#{match[:name]}_#{match[:version]}.orig.#{match[:ext]}"
-      FileUtils.cp(old_path, @path) if File.exist?(@path)
+      FileUtils.cp(old_path, @path) if File.exist?(old_path)
       self
     end
 
diff --git a/test/test_ci_tarball.rb b/test/test_ci_tarball.rb
index 6406fc2..121882b 100644
--- a/test/test_ci_tarball.rb
+++ b/test/test_ci_tarball.rb
@@ -38,5 +38,14 @@ module CI
       assert_path_exist('test-1')
       assert_path_exist('test-1/test-flat')
     end
+
+    def test_copy
+      FileUtils.cp_r(Dir["#{data}/*"], Dir.pwd)
+      t = Tarball.new('test-1.tar.xz')
+      assert_false(t.orig?)
+      t.origify!
+      assert_equal('test_1.orig.tar.xz', File.basename(t.path))
+      assert_path_exist('test_1.orig.tar.xz')
+    end
   end
 end

-- 
ci-tooling packaging



More information about the pkg-kde-commits mailing list