[SCM] ci-tooling packaging branch, master, updated. 06f30016449983fac0f68c52adda2da8585d6f53
Harald Sitter
apachelogger-guest at moszumanska.debian.org
Fri Oct 16 10:05:06 UTC 2015
Gitweb-URL: http://git.debian.org/?p=pkg-kde/ci-tooling.git;a=commitdiff;h=06f3001
The following commit has been merged in the master branch:
commit 06f30016449983fac0f68c52adda2da8585d6f53
Author: Harald Sitter <sitter at kde.org>
Date: Fri Oct 16 12:05:00 2015 +0200
make sure we trip over bogus tar names properly
NB we want to trip over tars with strings in their name and so forth
for now we have no way to handle them reasonably so best fail until we
have a case where we can figure out how to best behave
---
lib/ci/tarball.rb | 1 +
test/test_ci_tarball.rb | 5 +++++
2 files changed, 6 insertions(+)
diff --git a/lib/ci/tarball.rb b/lib/ci/tarball.rb
index 0f6c9d0..8589e5c 100644
--- a/lib/ci/tarball.rb
+++ b/lib/ci/tarball.rb
@@ -33,6 +33,7 @@ module CI
name = File.basename(@path)
dir = File.dirname(@path)
match = name.match(/(?<name>.+)-(?<version>[\d.]+)\.(?<ext>tar(.*))/)
+ fail "Could not parse tarball #{name}" unless match
old_path = @path
@path = "#{dir}/#{match[:name]}_#{match[:version]}.orig.#{match[:ext]}"
FileUtils.cp(old_path, @path) if File.exist?(old_path)
diff --git a/test/test_ci_tarball.rb b/test/test_ci_tarball.rb
index b513ae5..d9a76b3 100644
--- a/test/test_ci_tarball.rb
+++ b/test/test_ci_tarball.rb
@@ -26,6 +26,11 @@ module CI
assert_equal('d_1.0.orig.tar', File.basename(t.path))
t = Tarball.new('a-1.0.tar').origify
assert_equal('a_1.0.orig.tar', File.basename(t.path))
+
+ # fail
+ assert_raise RuntimeError do
+ Tarball.new('a.tar').origify
+ end
end
def test_extract
--
ci-tooling packaging
More information about the pkg-kde-commits
mailing list