[SCM] ci-tooling packaging branch, master, updated. f55197dd85b4dc43611ba69d97b19acf06ad922c
Harald Sitter
apachelogger-guest at moszumanska.debian.org
Fri Oct 16 08:40:08 UTC 2015
Gitweb-URL: http://git.debian.org/?p=pkg-kde/ci-tooling.git;a=commitdiff;h=261ed12
The following commit has been merged in the master branch:
commit 261ed12f187c7bd7fde14e2f0f5c98d32ec126eb
Author: Harald Sitter <sitter at kde.org>
Date: Fri Oct 16 10:38:28 2015 +0200
restructure orig source builder to not meddle with fetching or extract
---
lib/ci/orig_source_builder.rb | 13 +++++++++----
test/test_ci_orig_source_builder.rb | 11 +++--------
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/lib/ci/orig_source_builder.rb b/lib/ci/orig_source_builder.rb
index 5f68214..2b2981f 100644
--- a/lib/ci/orig_source_builder.rb
+++ b/lib/ci/orig_source_builder.rb
@@ -22,6 +22,8 @@ module CI
Dir.mkdir('build')
@builddir = File.absolute_path('build')
+ @sourcepath = "#{@builddir}/source" # Created by extract.
+
# FIXME: builder should generate a Source instance
end
@@ -51,6 +53,7 @@ module CI
end
@sourcedir
end
+ deprecate :sourcepath, "#{Tarball}.extract", 2015, 11
def log_change
# FIXME: this has email and fullname from env, see build_source
@@ -74,9 +77,11 @@ module CI
end
end
- def build
- FileUtils.cp_r(Dir.glob("#{@packagingdir}/*"), sourcepath, verbose: true)
- Dir.chdir(sourcepath) do
+ def build(tarball)
+ FileUtils.cp(tarball.path, @builddir)
+ tarball.extract(@sourcepath)
+ FileUtils.cp_r(Dir.glob("#{@packagingdir}/*"), @sourcepath)
+ Dir.chdir(@sourcepath) do
log_change
build_internal
end
@@ -85,7 +90,7 @@ module CI
def build_internal
# FIXME: code copy from build_source
# dpkg-buildpackage
- Dir.chdir(sourcepath) do
+ Dir.chdir(@sourcepath) do
system('update-maintainer')
# Force -sa as reprepreo refuses to accept uploads without orig.
return if system('dpkg-buildpackage', '-us', '-uc', '-S', '-d', '-sa')
diff --git a/test/test_ci_orig_source_builder.rb b/test/test_ci_orig_source_builder.rb
index fc6ce4c..1c657db 100644
--- a/test/test_ci_orig_source_builder.rb
+++ b/test/test_ci_orig_source_builder.rb
@@ -16,16 +16,11 @@ module CI
def test_run
assert_false(Dir.glob('*').empty?)
- builder = OrigSourceBuilder.new
-
- builder.get_tar
- assert_path_exist('build/dragon_15.08.1.orig.tar.xz')
- assert_path_exist('build/dragon-15.08.1.tar.xz')
- assert_path_exist(builder.sourcepath)
- assert_equal("#{Dir.pwd}/build/dragon-15.08.1", builder.sourcepath)
+ tarball = WatchTarFetcher.new('packaging/debian/watch').fetch(Dir.pwd)
- builder.build
+ builder = OrigSourceBuilder.new
+ builder.build(tarball)
# On 14.04 the default was .gz, newer versions may yield .xz
debian_tar = Dir.glob('build/dragon_15.08.1-0kubuntu1.debian.tar.*')
--
ci-tooling packaging
More information about the pkg-kde-commits
mailing list