[SCM] ci-tooling packaging branch, master, updated. e7139b7669f0b5fb4bad3c0cf5e125bc28ed1ced
Harald Sitter
apachelogger-guest at moszumanska.debian.org
Thu Mar 12 13:56:29 UTC 2015
Gitweb-URL: http://git.debian.org/?p=pkg-kde/ci-tooling.git;a=commitdiff;h=e7139b7
The following commit has been merged in the master branch:
commit e7139b7669f0b5fb4bad3c0cf5e125bc28ed1ced
Author: Harald Sitter <sitter at kde.org>
Date: Thu Mar 12 14:56:25 2015 +0100
we actually promote sources, so make install_check write a suitable file
---
kci/install_check.rb | 32 ++++++++++++++++++++++++--------
kci/ppa_promote.rb | 2 +-
2 files changed, 25 insertions(+), 9 deletions(-)
diff --git a/kci/install_check.rb b/kci/install_check.rb
index f0e5dad..490c7f1 100755
--- a/kci/install_check.rb
+++ b/kci/install_check.rb
@@ -27,7 +27,6 @@ class CiPPA
@type = type
@series = series
@added = false
- @packages = {}
end
def add
@@ -42,22 +41,39 @@ class CiPPA
@added = software_properties(:remove)
end
+ def ppa_sources
+ return @ppa_sources if @ppa_sources
+ series = Launchpad::Rubber.from_path("ubuntu/#{@series}")
+ ppa = Launchpad::Rubber.from_path("~kubuntu-ci/+archive/ubuntu/#{@type}")
+ @ppa_sources = ppa.getPublishedSources(status: 'Published',
+ distro_series: series)
+ end
+
+ def sources
+ return @sources if @sources
+
+ LOG.info "Getting sources list for PPA #{@type}."
+
+ @sources = {}
+ ppa_sources.each do |s|
+ @sources[s.source_package_name] = s.source_package_version
+ end
+ @sources
+ end
+
def packages
- return @packages unless @packages.empty?
+ return @packages if @packages
LOG.info "Building package list for PPA #{@type}."
+ # FIXME: arch hardcode, this is the install host arch not arch all
series = Launchpad::Rubber.from_path("ubuntu/#{@series}")
- # FIXME: arch hardcode
host_arch = Launchpad::Rubber.from_url("#{series.self_link}/amd64")
- ppa = Launchpad::Rubber.from_path("~kubuntu-ci/+archive/ubuntu/#{@type}")
packages = {}
- sources = ppa.getPublishedSources(status: 'Published',
- distro_series: series)
source_queue = Queue.new
- sources.each { |s| source_queue << s }
+ ppa_sources.each { |s| source_queue << s }
binary_queue = Queue.new
BlockingThreadPool.run(8) do
until source_queue.empty?
@@ -215,6 +231,6 @@ unless live_ppa.purge
end
LOG.info "writing package list in #{Dir.pwd}"
-File.write('package-list.json', JSON.generate(live_ppa.packages))
+File.write('sources-list.json', JSON.generate(live_ppa.sources))
exit 0
diff --git a/kci/ppa_promote.rb b/kci/ppa_promote.rb
index 603f038..193aace 100755
--- a/kci/ppa_promote.rb
+++ b/kci/ppa_promote.rb
@@ -65,7 +65,7 @@ class Archive
end
end
-packages = JSON.parse(File.read('package-list.json'))
+packages = JSON.parse(File.read('sources-list.json'))
Launchpad.authenticate
--
ci-tooling packaging
More information about the pkg-kde-commits
mailing list