[SCM] ci-tooling packaging branch, master, updated. 6a85d1f37f1826210013b3003ec32b27b01cdc1b

Harald Sitter apachelogger-guest at moszumanska.debian.org
Tue Mar 17 13:37:16 UTC 2015


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

The following commit has been merged in the master branch:
commit 6a85d1f37f1826210013b3003ec32b27b01cdc1b
Author: Harald Sitter <sitter at kde.org>
Date:   Tue Mar 17 14:37:13 2015 +0100

    change datastructure returned by missing_modules
    
    now returns a hash mapping package to module so one knows where the stuff
    is missing
---
 kci/qml_dep_verify.rb                | 15 +++++++++------
 lib/qml_dependency_verifier.rb       |  6 ++++--
 test/test_qml_dependency_verifier.rb |  6 +++++-
 3 files changed, 18 insertions(+), 9 deletions(-)

diff --git a/kci/qml_dep_verify.rb b/kci/qml_dep_verify.rb
index 19cffcf..b3c5220 100755
--- a/kci/qml_dep_verify.rb
+++ b/kci/qml_dep_verify.rb
@@ -14,11 +14,14 @@ log = Logger.new(STDOUT)
 log.progname = 'QML Dep'
 log.level = Logger::INFO
 
-missing_modules.uniq! { |mod| { mod.identifier => mod.version } }
-missing_modules.each do |mod|
-  log.warn "#{mod} not found."
-  log.info '  looked for:'
-  mod.import_paths.each do |path|
-    log.info "    - #{path}"
+missing_modules.each do |package, modules|
+  log.warn "#{package} has missing dependencies..."
+  modules.uniq! { |mod| { mod.identifier => mod.version } }
+  modules.each do |mod|
+    log.info "  #{mod} not found."
+    log.info '    looked for:'
+    mod.import_paths.each do |path|
+      log.info "      - #{path}"
+    end
   end
 end
diff --git a/lib/qml_dependency_verifier.rb b/lib/qml_dependency_verifier.rb
index 880964c..8de8f3c 100644
--- a/lib/qml_dependency_verifier.rb
+++ b/lib/qml_dependency_verifier.rb
@@ -96,7 +96,7 @@ class QMLDependencyVerifier
     ## - Purge the package and purge the now autoremovable sources. This should lead
     ##   to an almost prestine environment again for the next package. Ideally we'd
     ##   spin up a new container but that appears a bit of a waste of time.
-    missing_modules = []
+    missing_modules = {}
     binaries.each do |package, version|
       @log.info "Checking #{package}: #{version}"
       # FIXME: need to fail otherwise, the results will be skewed
@@ -134,7 +134,9 @@ class QMLDependencyVerifier
             break if found
           end
         end
-        missing_modules << mod unless found
+        next if found
+        missing_modules[package] ||= []
+        missing_modules[package] << mod
       end
 
       # FIXME: need to fail otherwise, the results will be skewed
diff --git a/test/test_qml_dependency_verifier.rb b/test/test_qml_dependency_verifier.rb
index 7efca16..472285b 100644
--- a/test/test_qml_dependency_verifier.rb
+++ b/test/test_qml_dependency_verifier.rb
@@ -84,7 +84,11 @@ class QMLDependencyVerifierTest < Test::Unit::TestCase
         missing = QMLDependencyVerifier.new.missing_modules
         assert_equal(1, missing.size, 'More things missing than expected' \
                                       " #{missing}")
-        missing = missing[0]
+        assert(missing.key?('plasma-widgets-addons'))
+        missing = missing.fetch('plasma-widgets-addons')
+        assert_equal(1, missing.size, 'More modules missing than expected' \
+                     " #{missing}")
+        missing = missing.first
         assert_equal('QtWebKit', missing.identifier)
       end
     end

-- 
ci-tooling packaging



More information about the pkg-kde-commits mailing list