Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4649)

Unified Diff: chrome/installer/linux/flock_make_package.py

Issue 1311543003: Add Linux build packaging targets to GN (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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:])

Powered by Google App Engine
This is Rietveld 408576698