[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=863dc14

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

    sync style with builder
---
 lib/ci/build_source.rb | 88 +++++++++++++++++++++++++++-----------------------
 1 file changed, 47 insertions(+), 41 deletions(-)

diff --git a/lib/ci/build_source.rb b/lib/ci/build_source.rb
index d5b8ab1..1e07366 100644
--- a/lib/ci/build_source.rb
+++ b/lib/ci/build_source.rb
@@ -62,47 +62,6 @@ class VcsSourceBuilder
   def copy_packaging
     # Copy some more
     FileUtils.cp_r(Dir.glob('packaging/*'), 'build/source/', verbose: true)
-
-    # Rip out locale install
-    Dir.chdir('build/source/') do
-      Dir.glob('debian/*.install').each do |install_file_path|
-        # Strip localized manpages
-        # e.g.  usr /share /man /  *  /man 7 /kf5options.7
-        subbed = File.open(install_file_path).read.gsub(%r{^.*usr\/share\/man\/(\*|\w+)\/man\d\/.*$}, '')
-        File.open(install_file_path, 'w') do |f|
-          f << subbed
-        end
-
-        # FIXME: bloody workaround for kconfigwidgets and kdelibs4support
-        # containing legit locale data
-        next if @name == 'kconfigwidgets' ||
-                @name == 'kdelibs4support'
-
-        subbed = File.open(install_file_path).read.gsub(%r{^.*usr\/share\/locale.*$}, '')
-        File.open(install_file_path, 'w') do |f|
-          f << subbed
-        end
-      end
-      # If the package is now empty, lintian override the empty warning
-      # to avoid false positives
-      Dir.glob('debian/*.install').each do |install_file_path|
-        next unless File.open(install_file_path, 'r').read.strip.empty?
-        package_name = File.basename(install_file_path, '.install')
-        lintian_overrides_path = install_file_path.gsub('.install',
-                                                        '.lintian-overrides')
-        puts "#{package_name} is now empty, trying to add lintian override"
-        File.open(lintian_overrides_path, 'a') do |file|
-          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
 
   def log_change
@@ -139,9 +98,56 @@ class VcsSourceBuilder
     copy_source
     create_orig_tar
     copy_packaging
+    mangle!
     log_change
     build
     cleanup
     @source
   end
+
+  private
+
+  def mangle!
+    # Rip out locale install
+    Dir.chdir('build/source/') do
+      Dir.glob('debian/*.install').each do |install_file_path|
+        # Strip localized manpages
+        # e.g.  usr /share /man /  *  /man 7 /kf5options.7
+        man_regex = %r{^.*usr/share/man/(\*|\w+)/man\d/.*$}
+        subbed = File.open(install_file_path).read.gsub(man_regex, '')
+        File.open(install_file_path, 'w') do |f|
+          f << subbed
+        end
+
+        # FIXME: bloody workaround for kconfigwidgets and kdelibs4support
+        # containing legit locale data
+        next if %w(kconfigwidgets kdelibs4support).include?(@name)
+
+        locale_regex = %r{^.*usr/share/locale.*$}
+        subbed = File.open(install_file_path).read.gsub(locale_regex, '')
+        File.open(install_file_path, 'w') do |f|
+          f << subbed
+        end
+      end
+      # If the package is now empty, lintian override the empty warning
+      # to avoid false positives
+      Dir.glob('debian/*.install').each do |install_file_path|
+        next unless File.open(install_file_path, 'r').read.strip.empty?
+        package_name = File.basename(install_file_path, '.install')
+        lintian_overrides_path = install_file_path.gsub('.install',
+                                                        '.lintian-overrides')
+        puts "#{package_name} is now empty, trying to add lintian override"
+        File.open(lintian_overrides_path, 'a') do |file|
+          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
 end

-- 
ci-tooling packaging



More information about the pkg-kde-commits mailing list