chiark / gitweb /
Merge branch 'deploy' into deploy.gibson
authorMark Wooding <mdw@distorted.org.uk>
Sun, 29 Sep 2019 13:12:58 +0000 (14:12 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 29 Sep 2019 13:12:58 +0000 (14:12 +0100)
* deploy:
  bin/chroot-maint: Prevent debconf from messing things up.
  etc/sbuild.conf.in: Keep failed build trees for diagnostics.

bin/chroot-maint
etc/sbuild.conf.in

index a24d17356f5c628a99b3e8ab5184f6666e1cff7a..2f91e9c54bc087f9114eccee3abcdf2e57db01b9 100755 (executable)
@@ -1477,6 +1477,12 @@ with toplevel_handler(): C = Config()
 CREATE = Tag("CREATE")
 FORCE = Tag("FORCE")
 
+DEBCONF_TWEAKS = """
+        DEBIAN_FRONTEND=noninteractive; export DEBIAN_FRONTEND
+        DEBIAN_PRIORITY=critical export DEBIAN_PRIORITY
+        DEBCONF_NONINTERACTIVE_SEEN=true; export DEBCONF_NONINTERACTIVE_SEEN
+"""
+
 def check_fresh(fresh, update):
   """
   Compare a refresh mode FRESH against an UPDATE time.
@@ -2222,7 +2228,8 @@ class ChrootJob (BaseJob):
 
       ## Finishing touches.
       progress("finishing touches")
-      run_schroot_source(dist, arch, ["eatmydata", "sh", "-e", "-c", """
+      run_schroot_source(dist, arch, ["eatmydata", "sh", "-e", "-c",
+        DEBCONF_TWEAKS + """
         apt-get update
         apt-get -y upgrade
         apt-get -y install "$@"
@@ -2240,7 +2247,8 @@ class ChrootJob (BaseJob):
     with Cleanup() as clean:
       dist, arch = me._dist, me._arch
       clean.enter(lockfile(chroot_src_lockfile(dist, arch)))
-      run_schroot_source(dist, arch, ["eatmydata", "sh", "-e", "-c", """
+      run_schroot_source(dist, arch, ["eatmydata", "sh", "-e", "-c",
+        DEBCONF_TWEAKS + """
         apt-get update
         apt-get -y dist-upgrade
         apt-get -y autoremove
@@ -2311,7 +2319,8 @@ class CrossToolsJob (BaseJob):
       ## Make sure the donor tree is up-to-date, and install the extra
       ## packages we need.
       progress("install tools packages")
-      run_schroot_session(session, ["eatmydata", "sh", "-e", "-c", """
+      run_schroot_session(session, ["eatmydata", "sh", "-e", "-c",
+        DEBCONF_TWEAKS + """
         apt-get update
         apt-get -y upgrade
         apt-get -y install "$@"
index dca002733ee4b69d2ebd5643d8182a4185d6d7ff..963f7d418e596662c20db24b285f2fbe136522c1 100644 (file)
@@ -61,6 +61,11 @@ $build_environment = {
 ## Actually resolve alternatives properly.
 $resolve_alternatives = 1;
 
+## Leave debris for diagnostics.
+$purge_build_deps = "successful";
+$purge_build_directory = "successful";
+$purge_session = "successful";
+
 ## Don't do anything clever if the build dependencies fail.  The clever thing
 ## doesn't work on older distributions.  Also, it takes extra time, and
 ## that's not desirable.