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

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


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

The following commit has been merged in the master branch:
commit 31603f49bb1a2b54f9555c8043870460d1c5ec9b
Author: Harald Sitter <sitter at kde.org>
Date:   Mon Oct 5 14:19:53 2015 +0200

    move defines out of Builder.run
---
 kci/builder.rb | 304 ++++++++++++++++++++++++++++-----------------------------
 1 file changed, 152 insertions(+), 152 deletions(-)

diff --git a/kci/builder.rb b/kci/builder.rb
index f3de3f0..992bc5e 100755
--- a/kci/builder.rb
+++ b/kci/builder.rb
@@ -214,34 +214,6 @@ class Builder
       end
     end
 
-    # Upload
-    def timeout_spawn(cmd, timeout)
-      thread = Thread.new do
-        loop do
-          warn '---- ps aux ----'
-          warn `ps aux |grep dput`
-          warn '----'
-          sleep 60
-        end
-      end
-
-      pid = Process.spawn(cmd, pgroup: true)
-      begin
-        puts "waitpid with timeout"
-        Timeout.timeout(timeout) do
-          Process.waitpid(pid, 0)
-          puts "return wait pid"
-          return ($?.exitstatus == 0)
-        end
-      rescue Timeout::Error
-        puts "timeout error"
-        Process.kill(15, -Process.getpgid(pid))
-        return false
-      end
-    ensure
-      thread.kill
-    end
-
     Dir.chdir('build/source/') do
       changelog = Changelog.new
       # Upload likes to get stuck, so we do timeout control to prevent all of
@@ -288,130 +260,6 @@ class Builder
       exit 0
     end
 
-    def segmentify(data, start_marker, end_marker)
-      warn 'Compatibility function segmentify called. BuildLogSegmenter should be' \
-           ' used instead.'
-      BuildLogSegmenter.segmentify(data, start_marker, end_marker)
-    end
-
-    def puts_kci(type, str)
-      Lint::ResultLogger.puts_kci(type, str)
-    end
-
-    def puts_error(str)
-      puts_kci('E', str)
-    end
-
-    def puts_warning(str)
-      puts_kci('W', str)
-    end
-
-    def puts_info(str)
-      puts_kci('I', str)
-    end
-
-    def ignore?(array_of_ignores, thing_to_check)
-      array_of_ignores.each do |possibly_ignore|
-        if thing_to_check == possibly_ignore ||
-           thing_to_check.start_with?(possibly_ignore) ||
-           thing_to_check.start_with?(possibly_ignore.chomp('*'))
-          return true
-        end
-      end
-      false
-    end
-
-    def puts_cmake(data, source_name)
-      # Bit of compat code. Very lovely... NOT
-      parser = CMakeParser.new(data)
-      unless parser.valid
-        puts_info 'CMakeParser could not parse the log correctly. Aborting parser.'
-        return
-      end
-      missing = parser.missing
-      warnings = parser.warnings
-      disabled_features = parser.disabled_features
-
-      puts 'KCI::CMAKE'
-
-      # Force an ignore on Qt5TextToSpeech, it's not released as of right now.
-      # 2015-03-05
-      ignore_missing = %w(Qt5TextToSpeech)
-      cmake_ignore_path = "#{@workspace_path}/packaging/debian/meta/cmake-ignore"
-      if File.exist?(cmake_ignore_path)
-        ignore_missing += File.read(cmake_ignore_path).strip.split("
")
-      end
-
-      missing.each do |dep|
-        next if ignore?(ignore_missing, dep)
-        puts_warning("Missing Dep: #{dep}")
-      end
-
-      warnings.each do |warning|
-        puts_warning(warning)
-      end
-
-      disabled_features.each do |disabled_feature|
-        next if ignore?(ignore_missing, disabled_feature)
-        puts_warning("Disabled Feature: #{disabled_feature}")
-      end
-    end
-
-    def puts_list_missing(data)
-      data = segmentify(data, "=== Start list-missing
", "=== End list-missing
")
-      return if data.empty?
-      puts 'KCI::MISSING'
-      data.each do |line|
-        # Missing files are always considered errors
-        puts_error(line)
-      end
-    end
-
-    def puts_lintian(data, args = {})
-      data = segmentify(data, "=== Start lintian
", "=== End lintian
")
-      return if data.empty?
-      puts 'KCI::LINTIAN'
-      data.each do |line|
-        next if line.start_with?('warning: ') # random warnings from lintian itself
-
-        # Package names can easily go beyond what shit can suck on, so gag it.
-        next if line.include?('source-package-component-has-long-file-name')
-        next if line.include?('package-has-long-file-name')
-
-        # We really do not care about standards versions for now. They only ever get
-        # bumped by the pkg-kde team anyway.
-        next if line.include?('out-of-date-standards-version')
-        next if line.include?('newer-standards-version')
-
-        # We package an enormous amount of GUI apps without manpages (in fact
-        # they arguably wouldn't even make sense what with being GUI apps). So
-        # ignore any and all manpage warnings to save Harald from having to override
-        # them in every single application repository.
-        next if line.include?('binary-without-manpage')
-
-        # Fuck you
-        next if line.include?('debian-revision-should-not-be-zero')
-        next if line.include?('bad-distribution-in-changes-file wily')
-        next if line.include?('not-binnmuable-any-depends-all')
-
-        # Do not print symbols warnings if we already auto-updated.
-        if args[:updated_symbols] &&
-           line.include?('symbols-file-contains-current-version-with-debian-revision')
-          next
-        end
-
-        case line[0..1]
-        when 'W:'
-          puts_warning(line)
-          next
-        when 'E:'
-          puts_error(line)
-          next
-        end
-        puts_info(line)
-      end
-    end
-
     # We need discrete arrays of both logs and architectures they represent
     # to make sure we process them in the correct order when updating symbols.
     logs = []
@@ -525,6 +373,158 @@ class Builder
       end
     end
   end
+
+  # Upload
+  def self.timeout_spawn(cmd, timeout)
+    thread = Thread.new do
+      loop do
+        warn '---- ps aux ----'
+        warn `ps aux |grep dput`
+        warn '----'
+        sleep 60
+      end
+    end
+
+    pid = Process.spawn(cmd, pgroup: true)
+    begin
+      puts "waitpid with timeout"
+      Timeout.timeout(timeout) do
+        Process.waitpid(pid, 0)
+        puts "return wait pid"
+        return ($?.exitstatus == 0)
+      end
+    rescue Timeout::Error
+      puts "timeout error"
+      Process.kill(15, -Process.getpgid(pid))
+      return false
+    end
+  ensure
+    thread.kill
+  end
+
+  def self.segmentify(data, start_marker, end_marker)
+    warn 'Compatibility function segmentify called. BuildLogSegmenter should be' \
+         ' used instead.'
+    BuildLogSegmenter.segmentify(data, start_marker, end_marker)
+  end
+
+  def self.puts_kci(type, str)
+    Lint::ResultLogger.puts_kci(type, str)
+  end
+
+  def self.puts_error(str)
+    puts_kci('E', str)
+  end
+
+  def self.puts_warning(str)
+    puts_kci('W', str)
+  end
+
+  def self.puts_info(str)
+    puts_kci('I', str)
+  end
+
+  def self.ignore?(array_of_ignores, thing_to_check)
+    array_of_ignores.each do |possibly_ignore|
+      if thing_to_check == possibly_ignore ||
+         thing_to_check.start_with?(possibly_ignore) ||
+         thing_to_check.start_with?(possibly_ignore.chomp('*'))
+        return true
+      end
+    end
+    false
+  end
+
+  def self.puts_cmake(data, source_name)
+    # Bit of compat code. Very lovely... NOT
+    parser = CMakeParser.new(data)
+    unless parser.valid
+      puts_info 'CMakeParser could not parse the log correctly. Aborting parser.'
+      return
+    end
+    missing = parser.missing
+    warnings = parser.warnings
+    disabled_features = parser.disabled_features
+
+    puts 'KCI::CMAKE'
+
+    # Force an ignore on Qt5TextToSpeech, it's not released as of right now.
+    # 2015-03-05
+    ignore_missing = %w(Qt5TextToSpeech)
+    cmake_ignore_path = "#{@workspace_path}/packaging/debian/meta/cmake-ignore"
+    if File.exist?(cmake_ignore_path)
+      ignore_missing += File.read(cmake_ignore_path).strip.split("
")
+    end
+
+    missing.each do |dep|
+      next if ignore?(ignore_missing, dep)
+      puts_warning("Missing Dep: #{dep}")
+    end
+
+    warnings.each do |warning|
+      puts_warning(warning)
+    end
+
+    disabled_features.each do |disabled_feature|
+      next if ignore?(ignore_missing, disabled_feature)
+      puts_warning("Disabled Feature: #{disabled_feature}")
+    end
+  end
+
+  def self.puts_list_missing(data)
+    data = segmentify(data, "=== Start list-missing
", "=== End list-missing
")
+    return if data.empty?
+    puts 'KCI::MISSING'
+    data.each do |line|
+      # Missing files are always considered errors
+      puts_error(line)
+    end
+  end
+
+  def self.puts_lintian(data, args = {})
+    data = segmentify(data, "=== Start lintian
", "=== End lintian
")
+    return if data.empty?
+    puts 'KCI::LINTIAN'
+    data.each do |line|
+      next if line.start_with?('warning: ') # random warnings from lintian itself
+
+      # Package names can easily go beyond what shit can suck on, so gag it.
+      next if line.include?('source-package-component-has-long-file-name')
+      next if line.include?('package-has-long-file-name')
+
+      # We really do not care about standards versions for now. They only ever get
+      # bumped by the pkg-kde team anyway.
+      next if line.include?('out-of-date-standards-version')
+      next if line.include?('newer-standards-version')
+
+      # We package an enormous amount of GUI apps without manpages (in fact
+      # they arguably wouldn't even make sense what with being GUI apps). So
+      # ignore any and all manpage warnings to save Harald from having to override
+      # them in every single application repository.
+      next if line.include?('binary-without-manpage')
+
+      # Fuck you
+      next if line.include?('debian-revision-should-not-be-zero')
+      next if line.include?('bad-distribution-in-changes-file wily')
+      next if line.include?('not-binnmuable-any-depends-all')
+
+      # Do not print symbols warnings if we already auto-updated.
+      if args[:updated_symbols] &&
+         line.include?('symbols-file-contains-current-version-with-debian-revision')
+        next
+      end
+
+      case line[0..1]
+      when 'W:'
+        puts_warning(line)
+        next
+      when 'E:'
+        puts_error(line)
+        next
+      end
+      puts_info(line)
+    end
+  end
 end
 
 if __FILE__ == $PROGRAM_NAME

-- 
ci-tooling packaging



More information about the pkg-kde-commits mailing list