[SCM] ci-tooling packaging branch, master, updated. 608a977c30f724d0a369654f065f99e3615f1ee0

Harald Sitter apachelogger-guest at moszumanska.debian.org
Tue Mar 17 10:31:10 UTC 2015


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

The following commit has been merged in the master branch:
commit 608a977c30f724d0a369654f065f99e3615f1ee0
Author: Harald Sitter <sitter at kde.org>
Date:   Tue Mar 17 11:31:04 2015 +0100

    add debugging to apt and qml_dep_verify
    
    to make sure it behaves correctly on live. temporary addition only
---
 lib/apt.rb                     |  4 ++++
 lib/qml_dependency_verifier.rb | 12 ++++++++++++
 2 files changed, 16 insertions(+)

diff --git a/lib/apt.rb b/lib/apt.rb
index 615c1cb..9a20425 100644
--- a/lib/apt.rb
+++ b/lib/apt.rb
@@ -1,3 +1,5 @@
+require 'logger'
+
 # Cow powers!
 #
 # This module provides access to apt by catching method missing and passing the
@@ -44,6 +46,7 @@ module Apt
   # Abstract base for apt execution.
   module Abstrapt
     def self.run(cmd, operation, *caller_args)
+      @log ||= Logger.new(STDOUT)
       injection_args = []
       caller_args.delete_if do |arg|
         next false unless arg.is_a?(Hash)
@@ -56,6 +59,7 @@ module Apt
       args += injection_args
       args << operation
       args += [*caller_args]
+      @log.warn "APT run (#{cmd}, #{args})"
       system(cmd, *args)
     end
 
diff --git a/lib/qml_dependency_verifier.rb b/lib/qml_dependency_verifier.rb
index 5093887..10771e8 100644
--- a/lib/qml_dependency_verifier.rb
+++ b/lib/qml_dependency_verifier.rb
@@ -1,3 +1,6 @@
+require 'logger'
+require 'logger/colors'
+
 require_relative 'apt'
 require_relative 'dpkg'
 require_relative 'lp'
@@ -35,6 +38,12 @@ class QMLDependencyVerifier
     'org.kde.plasma.configuration' => 'plasma-framework'
   }
 
+  def initialize
+    @log = Logger.new(STDOUT)
+    @log.level = Logger::INFO
+    @log.progname = self.class.to_s
+  end
+
   def source
     ## Read source defintion
     @source ||= JSON.parse(File.read('source.json'), object_class: Source)
@@ -61,6 +70,7 @@ class QMLDependencyVerifier
       end
       packages[binary.binary_package_name] = binary.binary_package_version
     end
+    @log.info "Built package hash: #{packages}"
     packages
   end
 
@@ -129,6 +139,8 @@ class QMLDependencyVerifier
       Apt.purge(package)
       Apt::Get.autremove(args: '--purge')
     end
+    @log.info "Done looking for missing modules"
+    @log.info missing_modules
     missing_modules
   end
 end

-- 
ci-tooling packaging



More information about the pkg-kde-commits mailing list