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

Harald Sitter apachelogger-guest at moszumanska.debian.org
Mon Oct 5 12:21:25 UTC 2015


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

The following commit has been merged in the master branch:
commit a0457b57393f7f252c7095750e80ebd147df7c96
Author: Harald Sitter <sitter at kde.org>
Date:   Mon Oct 5 13:32:20 2015 +0200

    rip out symbols unless we are working on latest KCI series
    
    symbol tracking only makes sense with a consistent stack and gcc version,
    so tracking on multiple series or debian vs kubuntu makes nose sense as
    they'd conflict every once in a while...
---
 lib/ci/build_source.rb                             |  8 +++++
 .../packaging/debian/changelog                     |  0
 .../packaging/debian/control                       |  0
 .../packaging/debian/rules                         |  0
 .../packaging/debian/source/format                 |  0
 .../packaging/debian/source/options                |  2 ++
 .../packaging/debian/symbols}                      |  0
 .../packaging/debian/test.symbols}                 |  0
 .../packaging/debian/test.symbols.armhf}           |  0
 test/data/test_ci_build_source/test_symbols_strip  |  1 +
 test/test_ci_build_source.rb                       | 40 ++++++++++++++++++++++
 11 files changed, 51 insertions(+)

diff --git a/lib/ci/build_source.rb b/lib/ci/build_source.rb
index 6d657df..d5b8ab1 100644
--- a/lib/ci/build_source.rb
+++ b/lib/ci/build_source.rb
@@ -4,6 +4,7 @@ require 'yaml'
 
 require_relative '../debian/changelog'
 require_relative '../debian/source'
+require_relative '../kci'
 require_relative '../os'
 require_relative 'build_version'
 require_relative 'source'
@@ -94,6 +95,13 @@ class VcsSourceBuilder
           file.write("#{package_name}: empty-binary-package
")
         end
       end
+      # Rip out symbol files unless we are on latest
+      unless @release == KCI.latest_series
+        symbols = Dir.glob('debian/symbols') +
+                  Dir.glob('debian/*.symbols') +
+                  Dir.glob('debian/*.symbols.*')
+        symbols.each { |s| FileUtils.rm(s) }
+      end
     end
   end
 
diff --git a/test/data/test_ci_build_source/test_empty_install/packaging/debian/changelog b/test/data/test_ci_build_source/test_symbols_keep/packaging/debian/changelog
similarity index 100%
copy from test/data/test_ci_build_source/test_empty_install/packaging/debian/changelog
copy to test/data/test_ci_build_source/test_symbols_keep/packaging/debian/changelog
diff --git a/test/data/test_ci_build_source/test_empty_install/packaging/debian/control b/test/data/test_ci_build_source/test_symbols_keep/packaging/debian/control
similarity index 100%
copy from test/data/test_ci_build_source/test_empty_install/packaging/debian/control
copy to test/data/test_ci_build_source/test_symbols_keep/packaging/debian/control
diff --git a/test/data/test_ci_build_source/test_build_fail/packaging/debian/rules b/test/data/test_ci_build_source/test_symbols_keep/packaging/debian/rules
similarity index 100%
copy from test/data/test_ci_build_source/test_build_fail/packaging/debian/rules
copy to test/data/test_ci_build_source/test_symbols_keep/packaging/debian/rules
diff --git a/test/data/test_ci_build_source/test_empty_install/packaging/debian/source/format b/test/data/test_ci_build_source/test_symbols_keep/packaging/debian/source/format
similarity index 100%
copy from test/data/test_ci_build_source/test_empty_install/packaging/debian/source/format
copy to test/data/test_ci_build_source/test_symbols_keep/packaging/debian/source/format
diff --git a/test/data/test_ci_build_source/test_symbols_keep/packaging/debian/source/options b/test/data/test_ci_build_source/test_symbols_keep/packaging/debian/source/options
new file mode 100644
index 0000000..874f35c
--- /dev/null
+++ b/test/data/test_ci_build_source/test_symbols_keep/packaging/debian/source/options
@@ -0,0 +1,2 @@
+compression = "gzip"
+compression-level = 1
diff --git a/test/data/test_ci_build_source/test_build_fail/source/README b/test/data/test_ci_build_source/test_symbols_keep/packaging/debian/symbols
similarity index 100%
copy from test/data/test_ci_build_source/test_build_fail/source/README
copy to test/data/test_ci_build_source/test_symbols_keep/packaging/debian/symbols
diff --git a/test/data/test_ci_build_source/test_build_fail/source/README b/test/data/test_ci_build_source/test_symbols_keep/packaging/debian/test.symbols
similarity index 100%
copy from test/data/test_ci_build_source/test_build_fail/source/README
copy to test/data/test_ci_build_source/test_symbols_keep/packaging/debian/test.symbols
diff --git a/test/data/test_ci_build_source/test_build_fail/source/README b/test/data/test_ci_build_source/test_symbols_keep/packaging/debian/test.symbols.armhf
similarity index 100%
copy from test/data/test_ci_build_source/test_build_fail/source/README
copy to test/data/test_ci_build_source/test_symbols_keep/packaging/debian/test.symbols.armhf
diff --git a/test/data/test_ci_build_source/test_symbols_strip b/test/data/test_ci_build_source/test_symbols_strip
new file mode 120000
index 0000000..ebb5dc1
--- /dev/null
+++ b/test/data/test_ci_build_source/test_symbols_strip
@@ -0,0 +1 @@
+test_symbols_keep
\ No newline at end of file
diff --git a/test/test_ci_build_source.rb b/test/test_ci_build_source.rb
index 1b2470a..e4ff1c3 100644
--- a/test/test_ci_build_source.rb
+++ b/test/test_ci_build_source.rb
@@ -1,3 +1,6 @@
+require 'rubygems/package'
+require 'zlib'
+
 require_relative 'lib/assert_system'
 require_relative 'lib/testcase'
 
@@ -42,6 +45,18 @@ class VCSBuilderTest < TestCase
     @time_aliased = false
   end
 
+  def tar_file_list(path)
+    files = []
+    Gem::Package::TarReader.new(Zlib::GzipReader.open(path)).tap do |reader|
+      reader.rewind
+      reader.each do |entry|
+        files << File.basename(entry.full_name) if entry.file?
+      end
+      reader.close
+    end
+    files
+  end
+
   def test_quilt
     copy_data
     s = VcsSourceBuilder.new(release: @release)
@@ -80,4 +95,29 @@ class VCSBuilderTest < TestCase
       s.run
     end
   end
+
+  def test_symbols_keep
+    copy_data
+    VcsSourceBuilder.new(release: KCI.latest_series).run
+    Dir.chdir('build')
+    tar = Dir.glob('*.tar.gz')
+    assert_equal(1, tar.size)
+    files = tar_file_list(tar[0])
+    assert_include(files, 'symbols')
+    assert_include(files, 'test.symbols')
+    assert_include(files, 'test.symbols.armhf')
+  end
+
+  def test_symbols_strip
+    copy_data
+    oldest_series = KCI.series(sort: :descending).keys.last
+    VcsSourceBuilder.new(release: oldest_series).run
+    Dir.chdir('build')
+    tar = Dir.glob('*.tar.gz')
+    assert_equal(1, tar.size)
+    files = tar_file_list(tar[0])
+    assert_not_include(files, 'symbols')
+    assert_not_include(files, 'test.symbols')
+    assert_not_include(files, 'test.symbols.armhf')
+  end
 end

-- 
ci-tooling packaging



More information about the pkg-kde-commits mailing list