Commit 29332fdd authored by Tom Anderson's avatar Tom Anderson Committed by Commit Bot

Reland of: Enable parallel Linux package builds

r499086 switched the Linux packaging staging dirs from /tmp to the out
directory.  This means it's no longer necessary to serialize package
builds.

The original CL passed argv[2:] to bash instead of argv[1:].

BUG=758654
R=thestig@chromium.org
TBR=rdevlin.cronin@chromium.org

Change-Id: If6dc9c35edeb60337b944a2a4350875274241747
Reviewed-on: https://chromium-review.googlesource.com/661780Reviewed-by: default avatarLei Zhang <thestig@chromium.org>
Reviewed-by: default avatarThomas Anderson <thomasanderson@chromium.org>
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#501111}
parent 012701d4
......@@ -359,7 +359,7 @@ template("linux_package") {
deb_target_name = "${target_name}_deb"
action(deb_target_name) {
visibility = [ ":*" ]
script = "flock_make_package.py"
script = "make_package.py"
if (current_cpu == "x86") {
deb_arch = "i386"
......@@ -377,7 +377,6 @@ template("linux_package") {
]
args = [
rebase_path("$root_out_dir/linux_package.lock", root_build_dir),
rebase_path("$root_out_dir/installer/debian/build.sh", root_build_dir),
"-a",
build_script_arch,
......@@ -405,7 +404,7 @@ template("linux_package") {
rpm_target_name = "${target_name}_rpm"
action(rpm_target_name) {
visibility = [ ":*" ]
script = "flock_make_package.py"
script = "make_package.py"
if (current_cpu == "x86") {
rpm_arch = "i386"
......@@ -423,7 +422,6 @@ template("linux_package") {
]
args = [
rebase_path("$root_out_dir/linux_package.lock", root_build_dir),
rebase_path("$root_out_dir/installer/rpm/build.sh", root_build_dir),
"-a",
build_script_arch,
......
......@@ -2,20 +2,13 @@
# 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>*]
# make_package.py <shell_script> [<args_to_script>*]
import subprocess
import sys
if len(sys.argv) < 3:
if len(sys.argv) < 2:
print "Incorrect args."
sys.exit(1)
sys.exit(subprocess.call(["flock", "--", sys.argv[1], "bash"] + sys.argv[2:]))
sys.exit(subprocess.call(["bash"] + sys.argv[1:]))
......@@ -176,7 +176,7 @@ template("linux_package") {
deb_target_name = "${target_name}_deb"
action(deb_target_name) {
visibility = [ ":*" ]
script = "//chrome/installer/linux/flock_make_package.py"
script = "//chrome/installer/linux/make_package.py"
deb_arch = "amd64"
inputs = packaging_files_binaries
......@@ -185,7 +185,6 @@ template("linux_package") {
]
args = [
rebase_path("$root_out_dir/linux_package.lock", root_build_dir),
rebase_path("$root_out_dir/app_shell_installer/debian/build.sh",
root_build_dir),
"-a",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment