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

Rohan Garg rohangarg-guest at moszumanska.debian.org
Mon Mar 16 14:41:39 UTC 2015


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

The following commit has been merged in the master branch:
commit 5fe1b2b99e91c2fa2c0dc3806bfda3149f43d272
Author: Rohan Garg <rohan at garg.io>
Date:   Mon Mar 16 15:41:09 2015 +0100

    Refactor a bit so that we do the right thing for native packages
---
 dci/source.rb | 20 +++++++-------------
 1 file changed, 7 insertions(+), 13 deletions(-)

diff --git a/dci/source.rb b/dci/source.rb
index 59cc0c4..183e75b 100644
--- a/dci/source.rb
+++ b/dci/source.rb
@@ -64,16 +64,12 @@ dci_run_cmd('apt-get -y install devscripts lsb-release locales libdistro-info-pe
 Dir.chdir(ARGV[1]) do
   # Get source name and what not
 
-  if File.exist? 'source/debian/source/format'
-    PACKAGING_DIR = 'source/'
-  else
-    PACKAGING_DIR = 'packaging/'
-  end
-
+  PACKAGING_DIR = 'packaging'
+  source_dir = 'source'
   Dir.chdir(PACKAGING_DIR) do
     s = Debian::Source.new(Dir.pwd)
     $logger.info "Building package of #{s.format.type} type"
-    FORMAT = s.format.type
+    source_dir = PACKAGING_DIR if s.format.type == :native
   end
 
   fail 'Source contains packaging but is not a native package' unless defined? PACKAGING_DIR
@@ -105,7 +101,7 @@ Dir.chdir(ARGV[1]) do
   tar_version = "#{cl.version(Changelog::BASE)}#{version_suffix}"
   version += '-1' unless FORMAT == 'native'
 
-  Dir.chdir('source/') do
+  Dir.chdir(source_dir) do
     FileUtils.rm_rf(Dir.glob('**/.bzr'))
     FileUtils.rm_rf(Dir.glob('**/.git'))
     FileUtils.rm_rf(Dir.glob('**/.svn'))
@@ -117,16 +113,14 @@ Dir.chdir(ARGV[1]) do
   fail 'Failed to create a tarball' unless system("tar -cf #{tar} source")
   fail 'Failed to compress the tarball' unless system("xz -6 #{tar}")
 
-  system('cp -aR packaging/debian source/') if FORMAT == 'quilt'
+  system("cp -aR #{PACKAGING_DIR}/debian #{source_dir}") if s.format.type == :quilt
 
-  Dir.chdir('source/') do
+  Dir.chdir(source_dir) do
     fail 'Failed to create changelog entry' unless system({ 'DEBFULLNAME' => 'Debian CI',
                                                             'DEBEMAIL' => 'null at debian.org' },
                                                             "dch -b -v #{version} -D #{options[:release]} 'Automatic Debian Build'")
-  end
 
-  # Rip out locale install and upstream patches
-  Dir.chdir('source/') do
+    # Rip out locale install and upstream patches
     Dir.glob('debian/*.install').each do |install_file_path|
       # Strip localized manpages
       # e.g.  usr /share /man /  *  /man 7 /kf5options.7

-- 
ci-tooling packaging



More information about the pkg-kde-commits mailing list