chiark / gitweb /
extract and build in separate steps so we can do build-deps in between, with a view...
authorIan Jackson <ian@anarres>
Thu, 22 Feb 2007 18:11:50 +0000 (18:11 +0000)
committerIan Jackson <ian@anarres>
Thu, 22 Feb 2007 18:11:50 +0000 (18:11 +0000)
runner/adt-run

index 0cb108a01f7a104f30f463b8028b1b2cccd8c0f3..c5f9dc2d0cb530f79d62ba5e9c1a1b775b0bf49f 100755 (executable)
@@ -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)))