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

Harald Sitter apachelogger-guest at moszumanska.debian.org
Tue Apr 28 10:31:41 UTC 2015


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

The following commit has been merged in the master branch:
commit 8336051017d7e02b1165125bb278fd21cb2309fe
Author: Harald Sitter <sitter at kde.org>
Date:   Tue Apr 28 12:31:38 2015 +0200

    revise source composition to possibly work for natives
    
    if there is no source dir we assume that the job only has a packaging
    SCM set which would make it a native job. in that case copy only
    the packaging directory and use that as source (also don't create an
    orig tar).
    if there is a source dir we copy as before but only selectively pick
    the debian/ subdirectory out of packaging. this should hopefully enable
    building of full import packaging.
---
 kci/builder.rb | 41 ++++++++++++++++++++++++++---------------
 1 file changed, 26 insertions(+), 15 deletions(-)

diff --git a/kci/builder.rb b/kci/builder.rb
index c3262a7..dc04065 100755
--- a/kci/builder.rb
+++ b/kci/builder.rb
@@ -78,26 +78,37 @@ changelog = Changelog.new('packaging')
 version = CI::BuildVersion.new(changelog)
 source_name = changelog.name
 
-# copy sources around
 FileUtils.rm_r('build') if File.exist?('build')
 FileUtils.mkpath('build/source/')
-`cp -rv source/* build/source/`
 
-Dir.chdir('build/source') do
-  FileUtils.rm_rf(Dir.glob('**/.bzr'))
-  FileUtils.rm_rf(Dir.glob('**/.git'))
-  FileUtils.rm_rf(Dir.glob('**/.svn'))
-end
+# copy upstream sources around
+if Dir.exist?('source')
+  abort 'Failed to copy source' unless system('cp -rv source/* build/source/')
+  Dir.chdir('build/source') do
+    FileUtils.rm_rf(Dir.glob('**/.bzr'))
+    FileUtils.rm_rf(Dir.glob('**/.git'))
+    FileUtils.rm_rf(Dir.glob('**/.svn'))
+  end
 
-# create orig tar
-Dir.chdir('build/') do
-  tar = "#{source_name}_#{version.tar}.orig.tar"
-  abort 'Failed to create a tarball' unless system("tar -cf #{tar} source")
-  abort 'Failed to compress the tarball' unless system("xz -6 #{tar}")
-end
+  # create orig tar
+  Dir.chdir('build/') do
+    tar = "#{source_name}_#{version.tar}.orig.tar"
+    abort 'Failed to create a tarball' unless system("tar -cf #{tar} source")
+    abort 'Failed to compress the tarball' unless system("xz -6 #{tar}")
+  end
 
-# Copy some more
-`cp -rv packaging/* build/source/`
+  # Copy packaging
+  unless system('cp -rv packaging/debian build/source/')
+    abort 'Failed to copy packaging'
+  end
+else
+  # This is a native package as we have no upstream source directory.
+  # TODO: quite possibly this should be porperly validated via source format and
+  #       or changelog version format.
+  unless system('cp -rv packaging/* build/source/')
+    abort 'Failed to copy packaging'
+  end
+end
 
 # Create changelog entry
 Dir.chdir('build/source/') do

-- 
ci-tooling packaging



More information about the pkg-kde-commits mailing list