[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=1f19492

The following commit has been merged in the master branch:
commit 1f19492bd058cc4270bb85cf0a5a7c61eeed9c4e
Author: Harald Sitter <sitter at kde.org>
Date:   Fri Oct 16 11:58:57 2015 +0200

    make sure we can parse dfsg'd versions properly
---
 lib/ci/tarball.rb       | 3 ++-
 test/test_ci_tarball.rb | 2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/ci/tarball.rb b/lib/ci/tarball.rb
index 85312f7..0f6c9d0 100644
--- a/lib/ci/tarball.rb
+++ b/lib/ci/tarball.rb
@@ -59,7 +59,8 @@ module CI
     end
 
     def self.orig?(path)
-      !File.basename(path).match(/(.+)_([\d.]+)\.orig\.tar(.*)/).nil?
+      # FIXME: copied from debian::version's upstream regex
+      !File.basename(path).match(/(.+)_([A-Za-z0-9.+:~-]+?)\.orig\.tar(.*)/).nil?
     end
   end
 end
diff --git a/test/test_ci_tarball.rb b/test/test_ci_tarball.rb
index 121882b..b513ae5 100644
--- a/test/test_ci_tarball.rb
+++ b/test/test_ci_tarball.rb
@@ -17,6 +17,8 @@ module CI
       assert_false(Tarball.orig?('b_1.0.tar'))
       assert_false(Tarball.orig?('c-1.0.orig.tar'))
       assert(Tarball.orig?('d_1.0.orig.tar'))
+      # More advanced but valid version with characters and a plus
+      assert(Tarball.orig?('qtbase-opensource-src_5.5.1+dfsg.orig.tar.xz'))
     end
 
     def test_origify

-- 
ci-tooling packaging



More information about the pkg-kde-commits mailing list