[Piuparts-commits] [SCM] piuparts git repository branch, develop, updated. 0.44-679-g25460c0

Andreas Beckmann debian at abeckmann.de
Tue Jun 5 07:42:19 UTC 2012


The following commit has been merged in the develop branch:
commit 99fc0365a610cde5cfbd5c742ba51b3fe6b53787
Author: Andreas Beckmann <debian at abeckmann.de>
Date:   Sun Jun 3 19:39:59 2012 +0200

    p: set command timeout to 30 minutes
    
    e.g. dist-upgrading texlive-full takes some time ...
    
    Signed-off-by: Andreas Beckmann <debian at abeckmann.de>

diff --git a/debian/changelog b/debian/changelog
index b2725ee..9212e15 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -52,6 +52,7 @@ piuparts (0.45) UNRELEASED; urgency=low
       + /var/lib/openvswitch/(pki/.*)?
       + /var/spool/powerdns/                    (Closes: #531134, #531135)
     - Implement a timeout for commands being run in the chroot.
+    - Set time limit to 30 minutes per command. (Closes: #654423)
   * piuparts.conf:
     - Make master-command a [global] instead of a [section] setting.
       The section name will be given as an argument to this command.
diff --git a/piuparts.py b/piuparts.py
index 54451cc..bb41e36 100644
--- a/piuparts.py
+++ b/piuparts.py
@@ -133,6 +133,7 @@ class Settings:
         self.tmpdir = None
         self.keep_tmpdir = False
         self.max_command_output_size = 3 * 1024 * 1024  # 3 MB (daptup on dist-upgrade)
+        self.max_command_runtime = 30 * 60  # 30 minutes (texlive-full on dist-upgrade)
         self.single_changes_list = False
         self.args_are_package_files = True
         # distro setup
@@ -844,7 +845,7 @@ class Chroot:
                                                  'usr/bin/eatmydata')):
             prefix.append('eatmydata')
         return run(["chroot", self.name] + prefix + command,
-                   ignore_errors=ignore_errors)
+                   ignore_errors=ignore_errors, timeout=settings.max_command_runtime)
 
     def create_apt_sources(self, distro):
         """Create an /etc/apt/sources.list with a given distro."""

-- 
piuparts git repository



More information about the Piuparts-commits mailing list