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

Harald Sitter apachelogger-guest at moszumanska.debian.org
Mon Mar 16 11:11:28 UTC 2015


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

The following commit has been merged in the master branch:
commit 32fac332e6fb80bd1362dbcad45b0be8445bd5c6
Author: Harald Sitter <sitter at kde.org>
Date:   Mon Mar 16 11:47:04 2015 +0100

    do not set upstream_scm if the package is native
---
 lib/projects.rb                                          | 13 ++++++++-----
 test/data/test_projects/{quilt => native}/debian/control |  0
 test/data/test_projects/native/debian/source/format      |  1 +
 test/data/test_projects/test_native                      |  1 +
 test/test_projects.rb                                    | 16 ++++++++++++++++
 5 files changed, 26 insertions(+), 5 deletions(-)

diff --git a/lib/projects.rb b/lib/projects.rb
index 316949d..d74530e 100644
--- a/lib/projects.rb
+++ b/lib/projects.rb
@@ -5,6 +5,7 @@ require 'fileutils'
 
 require_relative 'ci/upstream_scm'
 require_relative 'debian/control'
+require_relative 'debian/source'
 
 class Project
   # Name of the thing (e.g. the repo name)
@@ -90,11 +91,13 @@ class Project
           @series_branches << branch.gsub('refs/remotes/origin/', '')
         end
 
-        @upstream_scm = UpstreamSCM.new(name, Dir.pwd)
-        # FIXME: why is this not a repo side override?
-        if component == 'qt'
-          @upstream_scm.instance_variable_set(:@url, "https://gitorious.org/qt/#{name}.git")
-          @upstream_scm.instance_variable_set(:@branch, '5.4')
+        unless Debian::Source.new(Dir.pwd).format.type == :native
+          @upstream_scm = UpstreamSCM.new(name, Dir.pwd)
+          # FIXME: why is this not a repo side override?
+          if component == 'qt'
+            @upstream_scm.instance_variable_set(:@url, "https://gitorious.org/qt/#{name}.git")
+            @upstream_scm.instance_variable_set(:@branch, '5.4')
+          end
         end
 
         # FIXME: Probably should be converted to a symbol at a later point
diff --git a/test/data/test_projects/quilt/debian/control b/test/data/test_projects/native/debian/control
similarity index 100%
copy from test/data/test_projects/quilt/debian/control
copy to test/data/test_projects/native/debian/control
diff --git a/test/data/test_projects/native/debian/source/format b/test/data/test_projects/native/debian/source/format
new file mode 100644
index 0000000..89ae9db
--- /dev/null
+++ b/test/data/test_projects/native/debian/source/format
@@ -0,0 +1 @@
+3.0 (native)
diff --git a/test/data/test_projects/test_native b/test/data/test_projects/test_native
new file mode 120000
index 0000000..9b01495
--- /dev/null
+++ b/test/data/test_projects/test_native
@@ -0,0 +1 @@
+native
\ No newline at end of file
diff --git a/test/test_projects.rb b/test/test_projects.rb
index 966fdaa..b522504 100644
--- a/test/test_projects.rb
+++ b/test/test_projects.rb
@@ -103,6 +103,22 @@ class ProjectTest < Test::Unit::TestCase
     end
   end
 
+  def test_native
+    name = 'tn'
+    component = 'tc'
+
+    gitrepo = create_fake_git(name: name, component: component, branches: %w(kubuntu_unstable))
+    assert_not_nil(gitrepo)
+    assert_not_equal(gitrepo, '')
+
+    Dir.mktmpdir(self.class.to_s) do |tmpdir|
+      Dir.chdir(tmpdir) do
+        project = Project.new(name, component, gitrepo, type: 'unstable')
+        assert_nil(project.upstream_scm)
+      end
+    end
+  end
+
   def test_array_init_unstable
     # FIXME: this still goes through git.debian
     reference_projects = %w(kinfocenter gwenview)

-- 
ci-tooling packaging



More information about the pkg-kde-commits mailing list