[SCM] ci-tooling packaging branch, master, updated. 9b0ba6d47bbc090429d36782b5bafe4d5e0f3f67

Harald Sitter apachelogger-guest at moszumanska.debian.org
Sat May 2 16:32:30 UTC 2015


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

The following commit has been merged in the master branch:
commit 9b0ba6d47bbc090429d36782b5bafe4d5e0f3f67
Author: Harald Sitter <sitter at kde.org>
Date:   Sat May 2 18:32:26 2015 +0200

    try a different xapian override
    
    the previous one didn't work because the package actually always forces
    a run on new installs, so that's not working for us.
    instead install a fake package instead. it should still satisfy all deps
    but make it absolutely certain that the database build wont run
---
 kci/install_check.rb | 26 ++++++++++++++++++++------
 1 file changed, 20 insertions(+), 6 deletions(-)

diff --git a/kci/install_check.rb b/kci/install_check.rb
index 0e9b52c..92182b6 100755
--- a/kci/install_check.rb
+++ b/kci/install_check.rb
@@ -4,6 +4,7 @@ require 'fileutils'
 require 'logger'
 require 'logger/colors'
 require 'open3'
+require 'tmpdir'
 
 require_relative 'lib/lp'
 require_relative 'lib/retry'
@@ -188,12 +189,25 @@ File.write('/etc/dpkg/dpkg.cfg.d/02apt-speedup', "force-unsafe-io
")
 # anything, intead it just craps out if a wordlist provider is installed but
 # there is no wordlist -.-
 system('apt-get install wamerican')
-# Prevent xapian from running its postinst cache generation.
-# The postinst only triggers a full indexing iff there is no directory yet.
-# The only other two options for a cache build to trigger are actually trying
-# to use the cache (which ought not happen as part of the test) or through the
-# cron (which also ought not happen as there is no crond).
-FileUtils.mkpath('/var/lib/apt-xapian-index')
+# Prevent xapian from slowing down the test.
+# Install a fake package to prevent it from installing and doing anything.
+# This does render it non-functional but since we do not require the database
+# anyway this is the apparently only way we can make sure that it doesn't
+# create its stupid database. The CI hosts have really bad IO performance making
+# a full index take more than half an hour.
+Dir.mktmpdir do |tmpdir|
+  Dir.chdir(tmpdir) do
+    Dir.mkdir('apt-xapian-index')
+    Dir.mkdir('apt-xapian-index/DEBIAN')
+    File.write('apt-xapian-index/DEBIAN/control', <<-EOF.gsub(/^\s+/, ''))
+    Package: apt-xapian-index
+    Version: 999:999
+    Architecture: all
+    EOF
+    system('dpkg-deb -b apt-xapian-index xapian.deb')
+    DPKG.dpkg(['-i', 'xapian.deb'])
+  end
+end
 # Disable manpage database updates
 Open3.popen3('debconf-set-selections') do |stdin, _stdout, stderr, wait_thr|
   stdin.puts('man-db man-db/auto-update boolean false')

-- 
ci-tooling packaging



More information about the pkg-kde-commits mailing list