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

Rohan Garg rohangarg-guest at moszumanska.debian.org
Thu Mar 26 15:51:20 UTC 2015


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

The following commit has been merged in the master branch:
commit 8cdb6a82dec437d5ed2600a0274e94a90813331f
Author: Rohan Garg <rohan at garg.io>
Date:   Thu Mar 26 16:50:45 2015 +0100

    Make sure we look in the right place for Debian releases
---
 dci/mozilla.rb | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/dci/mozilla.rb b/dci/mozilla.rb
index f55dbe8..969d7be 100644
--- a/dci/mozilla.rb
+++ b/dci/mozilla.rb
@@ -13,11 +13,11 @@ fail 'Need a release to build for!' unless ARGV[2]
 $logger = DCILogger.instance
 
 PACKAGE = ARGV[1]
-RELEASE = ARGV[2]
+release = ARGV[2]
 
 $logger.info("Building #{PACKAGE}")
 
-def package_releases
+def package_releases(release)
   require 'nokogiri'
   threads = []
   ubuntu_versions = []
@@ -43,13 +43,15 @@ def package_releases
   end
 
   threads << Thread.new do
-    `rmadison -u ubuntu -a amd64 -s #{RELEASE} #{PACKAGE}`.to_str.each_line do | line |
+    release = UBUNTU_RELEASES[-1] if DEBIAN_RELEASES.include? release
+
+    `rmadison -u ubuntu -a amd64 -s #{release} #{PACKAGE}`.to_str.each_line do |line|
       match_data = line.match('(\d+[.]\d+)')
       ubuntu_versions <<  match_data[0].to_f unless match_data.nil?
     end
 
     # Make sure we take the updates suite into account too
-    `rmadison -u ubuntu -a amd64 -s #{RELEASE}-updates #{PACKAGE}`.to_str.each_line do | line |
+    `rmadison -u ubuntu -a amd64 -s #{release}-updates #{PACKAGE}`.to_str.each_line do |line|
       match_data = line.match('(\d+[.]\d+)')
       ubuntu_versions <<  match_data[0].to_f unless match_data.nil?
     end
@@ -66,7 +68,7 @@ end
 def bump_version
   changelog = Changelog.new
   version = "#{changelog.version(Changelog::EPOCH)}1000~#{changelog.version(Changelog::BASE)}"
-  if DEBIAN_RELEASES.include? RELEASE
+  if DEBIAN_RELEASES.include? release
     version += '-1'
     File.open('debian/config/mozconfig.in', 'a') { |f|
       f.puts("ac_add_options --enable-gstreamer=1.0
")
@@ -193,7 +195,7 @@ system("apt-get -y build-dep #{PACKAGE}")
 UBUNTU_RELEASES = `ubuntu-distro-info -a`.split
 DEBIAN_RELEASES = `debian-distro-info -a`.split
 
-release_info = package_releases
+release_info = package_releases(release)
 if release_info[:ubuntu] < release_info[:upstream]
   $logger.error("Can't build new #{PACKAGE}, Ubuntu hasn't updated the package!")
   exit 0
@@ -202,14 +204,14 @@ end
 `rm -rf build`
 Dir.mkdir('build')
 Dir.chdir('build') do
-  dci_run_cmd("pull-lp-source -m http://127.0.0.1:3142/ubuntu #{PACKAGE} #{RELEASE}")
+  dci_run_cmd("pull-lp-source -m http://127.0.0.1:3142/ubuntu #{PACKAGE} #{release}")
 
   build_firefox(release_info) if PACKAGE == 'firefox'
   build_thunderbird(release_info) if PACKAGE == 'thunderbird'
 
   src_dir = Dir["#{PACKAGE}-*"][0]
   Dir.chdir(src_dir) do
-    `dch --release --distribution #{RELEASE} ""`
+    `dch --release --distribution #{release} ""`
     # Needs full source upload because version 1000 doesn't exist in Ubuntu
     dci_run_cmd('dpkg-buildpackage -S -sa -uc -us')
   end

-- 
ci-tooling packaging



More information about the pkg-kde-commits mailing list