Allow parallel_emerge to be used when network is unavailable.

When --getbinpkg is not used, skip looking on the remote server for
packages. This should allow people to use parallel_emerge with no
binary packages when the network is unavailable.

BUG=chromium-os:6684
TEST=Disconnect network and run ./build_packages --nousepkg

Change-Id: Id0e5d03aca30d85cb6990d977983f1e0655726ab

Review URL: http://codereview.chromium.org/3294022
This commit is contained in:
David James 2010-09-15 16:18:48 -07:00
parent 90438ca854
commit 5ebed121aa

View File

@ -1123,7 +1123,9 @@ class DepGraphGenerator(object):
cycles = FindCycles() cycles = FindCycles()
if self.rebuild: if self.rebuild:
local_pkgs = LocalPackageDatabase() local_pkgs = LocalPackageDatabase()
remote_pkgs = RemotePackageDatabase(emerge.settings["PORTAGE_BINHOST"]) remote_pkgs = {}
if "--getbinpkg" in emerge.opts:
remote_pkgs = RemotePackageDatabase(emerge.settings["PORTAGE_BINHOST"])
AutoRebuildDeps(local_pkgs, remote_pkgs, cycles) AutoRebuildDeps(local_pkgs, remote_pkgs, cycles)
# We need to remove installed packages so that we can use the dependency # We need to remove installed packages so that we can use the dependency