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

Side by Side Diff: parallel_emerge

Issue 3294022: Allow parallel_emerge to be used when network is unavailable. (Closed) Base URL: http://git.chromium.org/git/crosutils.git
Patch Set: Created 10 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1105 matching lines...) Expand 10 before | Expand all | Expand 10 after
1116 for db_pkg in final_db.match_pkgs(pkg): 1116 for db_pkg in final_db.match_pkgs(pkg):
1117 deps_map[str(db_pkg.cpv)]["mandatory_source"] = True 1117 deps_map[str(db_pkg.cpv)]["mandatory_source"] = True
1118 else: 1118 else:
1119 for pkg in self.mandatory_source.copy(): 1119 for pkg in self.mandatory_source.copy():
1120 for db_pkg in final_db.match_pkgs(pkg): 1120 for db_pkg in final_db.match_pkgs(pkg):
1121 MergeChildren(str(db_pkg.cpv), "mandatory_source") 1121 MergeChildren(str(db_pkg.cpv), "mandatory_source")
1122 1122
1123 cycles = FindCycles() 1123 cycles = FindCycles()
1124 if self.rebuild: 1124 if self.rebuild:
1125 local_pkgs = LocalPackageDatabase() 1125 local_pkgs = LocalPackageDatabase()
1126 remote_pkgs = RemotePackageDatabase(emerge.settings["PORTAGE_BINHOST"]) 1126 remote_pkgs = {}
1127 if "--getbinpkg" in emerge.opts:
1128 remote_pkgs = RemotePackageDatabase(emerge.settings["PORTAGE_BINHOST"] )
1127 AutoRebuildDeps(local_pkgs, remote_pkgs, cycles) 1129 AutoRebuildDeps(local_pkgs, remote_pkgs, cycles)
1128 1130
1129 # We need to remove installed packages so that we can use the dependency 1131 # We need to remove installed packages so that we can use the dependency
1130 # ordering of the install process to show us what cycles to crack. Once 1132 # ordering of the install process to show us what cycles to crack. Once
1131 # we've done that, we also need to recalculate our list of cycles so that 1133 # we've done that, we also need to recalculate our list of cycles so that
1132 # we don't include the installed packages in our cycles. 1134 # we don't include the installed packages in our cycles.
1133 RemoveInstalledPackages() 1135 RemoveInstalledPackages()
1134 SanitizeTree() 1136 SanitizeTree()
1135 if deps_map: 1137 if deps_map:
1136 if "--usepkg" in emerge.opts: 1138 if "--usepkg" in emerge.opts:
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
1685 # If we already upgraded portage, we don't need to do so again. But we do 1687 # If we already upgraded portage, we don't need to do so again. But we do
1686 # need to upgrade the rest of the packages. So we'll go ahead and do that. 1688 # need to upgrade the rest of the packages. So we'll go ahead and do that.
1687 if portage_upgrade: 1689 if portage_upgrade:
1688 args = sys.argv[1:] + ["--nomerge=sys-apps/portage"] 1690 args = sys.argv[1:] + ["--nomerge=sys-apps/portage"]
1689 os.execvp(os.path.realpath(sys.argv[0]), args) 1691 os.execvp(os.path.realpath(sys.argv[0]), args)
1690 1692
1691 print "Done" 1693 print "Done"
1692 1694
1693 if __name__ == "__main__": 1695 if __name__ == "__main__":
1694 main() 1696 main()
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698