| OLD | NEW |
| 1 #!/usr/bin/python2.6 | 1 #!/usr/bin/python2.6 |
| 2 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 2 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 """Program to run emerge in parallel, for significant speedup. | 6 """Program to run emerge in parallel, for significant speedup. |
| 7 | 7 |
| 8 Usage: | 8 Usage: |
| 9 ./parallel_emerge [--board=BOARD] [--workon=PKGS] [--no-workon-deps] | 9 ./parallel_emerge [--board=BOARD] [--workon=PKGS] [--no-workon-deps] |
| 10 [emerge args] package" | 10 [emerge args] package" |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 opts.setdefault("--resume", True) | 349 opts.setdefault("--resume", True) |
| 350 if "--buildpkgonly" in opts: | 350 if "--buildpkgonly" in opts: |
| 351 # --buildpkgonly will not merge anything, so it overrides all binary | 351 # --buildpkgonly will not merge anything, so it overrides all binary |
| 352 # package options. | 352 # package options. |
| 353 for opt in ("--getbinpkg", "--getbinpkgonly", | 353 for opt in ("--getbinpkg", "--getbinpkgonly", |
| 354 "--usepkg", "--usepkgonly"): | 354 "--usepkg", "--usepkgonly"): |
| 355 opts.pop(opt, None) | 355 opts.pop(opt, None) |
| 356 if (settings.get("PORTAGE_DEBUG", "") == "1" and | 356 if (settings.get("PORTAGE_DEBUG", "") == "1" and |
| 357 "python-trace" in settings.features): | 357 "python-trace" in settings.features): |
| 358 portage.debug.set_trace(True) | 358 portage.debug.set_trace(True) |
| 359 # Since we don't have locking around merges, the collision-protect |
| 360 # feature doesn't make sense. |
| 361 settings.features.discard("collision-protect") |
| 359 | 362 |
| 360 # Complain about unsupported options | 363 # Complain about unsupported options |
| 361 for opt in ("--ask", "--ask-enter-invalid", "--complete-graph", | 364 for opt in ("--ask", "--ask-enter-invalid", "--complete-graph", |
| 362 "--resume", "--skipfirst"): | 365 "--resume", "--skipfirst"): |
| 363 if opt in opts: | 366 if opt in opts: |
| 364 print "%s is not supported by parallel_emerge" % opt | 367 print "%s is not supported by parallel_emerge" % opt |
| 365 sys.exit(1) | 368 sys.exit(1) |
| 366 | 369 |
| 367 # Make emerge specific adjustments to the config (e.g. colors!) | 370 # Make emerge specific adjustments to the config (e.g. colors!) |
| 368 adjust_configs(opts, trees) | 371 adjust_configs(opts, trees) |
| (...skipping 899 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1268 for db_pkg in final_db.match_pkgs(pkg): | 1271 for db_pkg in final_db.match_pkgs(pkg): |
| 1269 print "Adding %s to world" % db_pkg.cp | 1272 print "Adding %s to world" % db_pkg.cp |
| 1270 new_world_pkgs.append(db_pkg.cp) | 1273 new_world_pkgs.append(db_pkg.cp) |
| 1271 if new_world_pkgs: | 1274 if new_world_pkgs: |
| 1272 world_set.update(new_world_pkgs) | 1275 world_set.update(new_world_pkgs) |
| 1273 | 1276 |
| 1274 print "Done" | 1277 print "Done" |
| 1275 | 1278 |
| 1276 if __name__ == "__main__": | 1279 if __name__ == "__main__": |
| 1277 main() | 1280 main() |
| OLD | NEW |