Index: chrome/installer/linux/flock_make_package.py |
diff --git a/chrome/installer/linux/flock_make_package.py b/chrome/installer/linux/flock_make_package.py |
new file mode 100644 |
index 0000000000000000000000000000000000000000..8dfc0899d8edd93fd21c480e59db2b069312452d |
--- /dev/null |
+++ b/chrome/installer/linux/flock_make_package.py |
@@ -0,0 +1,21 @@ |
+# Copyright 2015 The Chromium Authors. All rights reserved. |
+# Use of this source code is governed by a BSD-style license that can be |
+# found in the LICENSE file. |
+ |
+# Linux package generation is serialized because it creates large numbers of |
+# temporary files that can overload the /tmp partition on the builders. |
+# See https://codereview.chromium.org/243019 |
+# |
+# This script does a flock to serialize, and then runs the given shell |
+# script with the given parameters. |
+# |
+# Usage: |
+# flock_make_package.py <lockfile> <shell_script> [<args_to_script>*] |
Lei Zhang
2015/08/28 23:17:02
Might be nice to use this with GYP as well for con
|
+ |
+import subprocess |
+import sys |
+ |
+if len(sys.argv) < 3: |
+ print "Incorrect args." |
+ sys.exit(1) |
+subprocess.call(["flock", "--", sys.argv[1], "bash"] + sys.argv[2:]) |