From: Ian Jackson Date: Thu, 22 Feb 2007 18:11:50 +0000 (+0000) Subject: extract and build in separate steps so we can do build-deps in between, with a view... X-Git-Tag: converted-from-bzr~32^3~27 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=3571dd1a8e8fe0a5e7bf6f2d8e97a02b4574b1b2;p=autopkgtest.git extract and build in separate steps so we can do build-deps in between, with a view to skipping build-deps and build in future if they aren't needed --- diff --git a/runner/adt-run b/runner/adt-run index 0cb108a..c5f9dc2 100755 --- a/runner/adt-run +++ b/runner/adt-run @@ -1409,22 +1409,6 @@ def build_source(act): print >>dsc_w, 'Binary: none-so-this-is-not-a-package-name' dsc_w.close() - script = binaries.apt_pkg_gdebi_script( - dsc.read(True), [[ - 'from GDebi.DscSrcPackage import DscSrcPackage', - 'd = DscSrcPackage(cache, arg)', - 'res = d.checkDeb()', - ],[ - 'from GDebi.DebPackage import DebPackage', - 'd = DebPackage(cache)', - 'res = d.satisfyDependsStr("build-essential")', - ]]) - - cmdl = ['python','-c',script] - whatp = what+'-builddeps' - rc = testbed.execute(what, cmdl, script=script) - if rc: badpkg('build-depends install failed, exit code %d' % rc) - work = TemporaryDir(what+'-build') script = [ @@ -1459,13 +1443,35 @@ def build_source(act): script += [ 'cd */.', - 'dpkg-checkbuilddeps', 'pwd >&3', - opts.user_wrap('debian/rules build'), ] - result_pwd = source_rules_command(act,script,what,'build',work, + result_pwd = source_rules_command(act,script,what,'extract',work, cwd=initcwd, results_lines=1, xargs=['x',spec]) + script = binaries.apt_pkg_gdebi_script( + dsc.read(True), [[ + 'from GDebi.DscSrcPackage import DscSrcPackage', + 'd = DscSrcPackage(cache, arg)', + 'res = d.checkDeb()', + ],[ + 'from GDebi.DebPackage import DebPackage', + 'd = DebPackage(cache)', + 'res = d.satisfyDependsStr("build-essential")', + ]]) + + cmdl = ['python','-c',script] + whatp = what+'-builddeps' + rc = testbed.execute(what, cmdl, script=script) + if rc: badpkg('build-depends install failed, exit code %d' % rc) + + script = [ + 'cd "$1"', + 'dpkg-checkbuilddeps', + opts.user_wrap('debian/rules build'), + ] + source_rules_command(act,script,what,'build',work, + cwd=initcwd, xargs=['x',result_pwd]) + if os.path.dirname(result_pwd)+'/' != work.read(True): badpkg("results dir `%s' is not in expected parent dir `%s'" % (result_pwd, work.read(True)))