[SCM] ci-tooling packaging branch, master, updated. 0435269d2e35c76dc67c2e1d93901027f1d722d7

Harald Sitter apachelogger-guest at moszumanska.debian.org
Wed May 13 21:16:57 UTC 2015


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

The following commit has been merged in the master branch:
commit 0435269d2e35c76dc67c2e1d93901027f1d722d7
Author: Harald Sitter <sitter at kde.org>
Date:   Wed May 13 23:16:52 2015 +0200

    get published sources with exact_match when applicable
    
    as it turns out without setting exact_match
    
    plasma-workspace-wallpapers would match a search for plasma-workspace,
    which is mostly meh but usually shouldn't have a negative impact.
    to be on the safe side, change all queries that can easily be matching
    more than intended (which mostly are queries of the name+version kind as
    name can easily match more than intended while most other attributes
    actually are pretty all-or-nothing such as series)
---
 kci/expunge.rb          | 3 ++-
 kci/ppa-copy-all.rb     | 3 ++-
 kci/ppa-copy-package.rb | 3 ++-
 kci/ppa_promote.rb      | 8 +++++---
 kci/tarbuild.rb         | 5 +++--
 5 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/kci/expunge.rb b/kci/expunge.rb
index f615fae..d96d9ff 100755
--- a/kci/expunge.rb
+++ b/kci/expunge.rb
@@ -72,7 +72,8 @@ statuses.each do |status|
   options.types.each do |type|
     ppa = Launchpad::Rubber.from_path("~kubuntu-ci/+archive/ubuntu/#{type}")
     sources = ppa.getPublishedSources(source_name: options.source,
-                                      status: status)
+                                      status: status,
+                                      exact_match: true)
     sources.each do |s|
       log.info "-- deleting :: #{s.display_name} --"
       s.requestDeletion!(removal_comment: 'expunge.rb')
diff --git a/kci/ppa-copy-all.rb b/kci/ppa-copy-all.rb
index 30c3707..1def7c1 100755
--- a/kci/ppa-copy-all.rb
+++ b/kci/ppa-copy-all.rb
@@ -57,7 +57,8 @@ threads = []
       begin
         unless target_ppa.getPublishedSources(distro_series: series,
                                               source_name: s.source_package_name,
-                                              version: s.source_package_version).empty?
+                                              version: s.source_package_version,
+                                              exact_match: true).empty?
           log.warn "Skipping #{s.display_name}; already there"
           next
         end
diff --git a/kci/ppa-copy-package.rb b/kci/ppa-copy-package.rb
index a58e09b..2551b58 100755
--- a/kci/ppa-copy-package.rb
+++ b/kci/ppa-copy-package.rb
@@ -54,7 +54,8 @@ series = Launchpad::Rubber.from_url("https://api.launchpad.net/devel/ubuntu/#{di
 
 source_ppa.getPublishedSources(source_name: source.name,
                                version: source.version,
-                               distro_series: series).each do |s|
+                               distro_series: series,
+                               exact_match: true).each do |s|
   target_ppa.copyPackage!(from_archive: source_ppa,
                           source_name: s.source_package_name,
                           version: s.source_package_version,
diff --git a/kci/ppa_promote.rb b/kci/ppa_promote.rb
index 0e6b556..ef73828 100755
--- a/kci/ppa_promote.rb
+++ b/kci/ppa_promote.rb
@@ -47,12 +47,13 @@ module VerifablePPA
   end
 
   def source_exist?(name, version)
-    sources = getPublishedSources(source_name: name, version: version)
+    sources = getPublishedSources(source_name: name, version: version,
+                                  exact_match: true)
     sources.reject! { |s| !EXISTING_STATES.include?(s.status) }
     return true if sources.size == 1
     if sources.size > 1
       LOG.error "Found more than one matching source for #{name}=#{version}"
-      LOG.error sources.join($/)
+      LOG.error sources
       fail "Found more than one matching source for #{name}=#{version}"
     end
     false
@@ -72,7 +73,8 @@ class Archive
     # making the unfiltered list grow larger and larger every time.
     %i(Pending Published Superseded Obsolete).each do |status|
       sources = @ppa.getPublishedSources(status: status,
-                                         distro_series: @series)
+                                         distro_series: @series,
+                                         exact_match: true)
       source_queue = Queue.new(sources)
       BlockingThreadPool.run(WIPE_THREAD_COUNT) do
         until source_queue.empty?
diff --git a/kci/tarbuild.rb b/kci/tarbuild.rb
index 2b3f042..e606dfe 100755
--- a/kci/tarbuild.rb
+++ b/kci/tarbuild.rb
@@ -29,8 +29,9 @@ end
 ppa = Launchpad::Rubber::from_url("https://api.launchpad.net/devel/~kubuntu-ci/+archive/ubuntu/stage")
 distro_series = Launchpad::Rubber::from_url("https://api.launchpad.net/devel/ubuntu/#{DISTRIB_CODENAME}")
 begin
-    source = ppa.getPublishedSources(:source_name => source_name,
-                                     :distro_series => distro_series)[0] # This is sorted
+    source = ppa.getPublishedSources(source_name: source_name,
+                                     distro_series: distro_series,
+                                     exact_match: true)[0] # This is sorted
 rescue
     # no source in ppa yet
     puts "Found no previous upload in PPA..."

-- 
ci-tooling packaging



More information about the pkg-kde-commits mailing list