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

Harald Sitter apachelogger-guest at moszumanska.debian.org
Thu Feb 26 08:42:36 UTC 2015


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

The following commit has been merged in the master branch:
commit ce6cd1bca11481d4676d4ad017d02ce3055b6031
Author: Harald Sitter <sitter at kde.org>
Date:   Thu Feb 26 09:21:41 2015 +0100

    expand expunge with more options
    
    - keep merger
    - select which type to expunge
    - select which series to expunge
---
 kci/expunge.rb | 28 +++++++++++++++++++++++-----
 1 file changed, 23 insertions(+), 5 deletions(-)

diff --git a/kci/expunge.rb b/kci/expunge.rb
index 2285091..a58d567 100755
--- a/kci/expunge.rb
+++ b/kci/expunge.rb
@@ -10,7 +10,7 @@ require_relative '../lib/lp'
 
 # FIXME: codedup
 DISTRIBUTIONS = %w(utopic vivid)
-TYPES = %w(unstable stable)
+TYPES = %w(stable unstable)
 
 options = OpenStruct.new
 OptionParser.new do |opts|
@@ -19,11 +19,29 @@ OptionParser.new do |opts|
   opts.on('-p SOURCEPACKAGE', 'Source package name [default: ARGV[0]]') do |v|
     options.source = v
   end
+
+  opts.on('--keep-merger', 'Do not expunge merger') do
+    options.keep_merger = true
+  end
+
+  opts.on('--type [TYPE]', TYPES, 'Choose type to expunge (or multiple)') do |v|
+    options.types ||= [] << v.to_s
+  end
+
+  opts.on('--dist [DIST]', DISTRIBUTIONS.map(&:to_sym),
+          'Choose series to expunge (or multiple)') do |v|
+    options.dists ||= [] << v.to_s
+  end
 end.parse!
 
 fail 'Need a project name as argument' unless ARGV[0]
 options.name = ARGV[0]
+
+# Defaults
 options.source ||= options.name
+options.keep_merger ||= false
+options.types ||= TYPES
+options.dists ||= DISTRIBUTIONS
 
 log = Logger.new(STDOUT)
 log.level = Logger::DEBUG
@@ -33,12 +51,12 @@ log.progname = $PROGRAM_NAME
 
 # FIXME: codedup from update-projects logic
 job_names = []
-DISTRIBUTIONS.each do |d|
-  TYPES.each do |t|
+options.dists.each do |d|
+  options.types.each do |t|
     job_names << "#{d}_#{t}_#{options.name}"
   end
 end
-job_names << "merger_#{options.name}"
+job_names << "merger_#{options.name}" unless options.keep_merger
 
 log.info 'JENKINS'
 Jenkins.job.list_all.each do |name|
@@ -53,7 +71,7 @@ log.info 'PPA'
 statuses = %w(Pending Published Superseded Obsolete)
 Launchpad.authenticate
 statuses.each do |status|
-  TYPES.each do |type|
+  options.types.each do |type|
     ppa = Launchpad::Rubber.from_path("~kubuntu-ci/+archive/ubuntu/#{type}")
     sources = ppa.getPublishedSources(source_name: options.source,
                                       status: status)

-- 
ci-tooling packaging



More information about the pkg-kde-commits mailing list