Our package graph is cyclic, so parallel_emerge needs to handle cycles
correctly in all cases. PrebuiltsReady should only need to check each package
once, so we should set cache[pkg] to True if we found the package in the cache.
TEST=Ran build_packages --fast
BUG=none
Review URL: http://codereview.chromium.org/3047009
Instead of loosely wrapping emerge, parallel_emerge now integrates tightly with emerge. This boosts performance while allowing us to map dependencies more accurately.
With this change, build_image --fast can clock under 4 minutes, and build_packages --fast now clocks as low as 4:30. With the --rebuild option, build_packages takes 5:30, but it has the big benefit of producing actually-correct results.
Note that this change also depends on us updating the various build scripts to prefix
calls to parallel_emerge with sudo -E.
TEST=Ran several parallel_emerge test cases, build_packages --fast, and
build_image --fast
BUG=none
Review URL: http://codereview.chromium.org/2891013
When we run custom actions in parallel_emerge, we should pass the list of
packages on to emerge. Otherwise emerge won't know what packages to unmerge.
Besides the above, also fix an issue where --workon doesn't override
--getbinpkgonly or --usepkgonly.
TEST=Ran parallel_emerge --unmerge dhcpd and parallel_emerge --usepkgonly --board=x86-generic
--workon=power_manager power_manager
BUG=none
Review URL: http://codereview.chromium.org/2927013
Currently, parallel_emerge doesn't know how to handle uninstall actions, so it
actually installs packages when it should be uninstalling them. This patch
fixes that.
TEST=sudo ./parallel_emerge -uDNv hard-host-depends, and make sure it
uninstalls nih-dbus-tool, which is blocked by hard-host-depends
BUG=none
Review URL: http://codereview.chromium.org/2990001
Packages specified as workon packages are always built from source.
Dependencies of workon packages are also built from source.
Dependencies are calculated with --selective=n so that workon packages will be included in the install list. Packages that are not being worked on and are being unnecessarily replaced because of --selective=n are filtered out later.
This patch also fixes a bug with world file updating -- previously the world file was never updated because the packages were getting removed by RemoveInstalledPackages. We now keep the appropriate world file updates, and instead update SanitizeTree to handle world file updates without trouble.
I also optimized the cycle cracking algorithm so that it only visits each node once. This seems to improve run time significantly on graphs that have cycles.
TEST=Ran ./parallel_emerge -uDNvpg --board=x86-generic chromeos --workon=chromeos-chrome &&
./parallel_emerge -uDNvpg --board=x86-generic chromeos --workon=libcros &&
./parallel_emerge -uDNvpg world --workon=libxml2 &&
./parallel_emerge -uDNv -p world hard-host-depends --workon='bcel'
BUG=none
Review URL: http://codereview.chromium.org/2959006
- Add support for --jobs flag.
- Add support for --depclean with no arguments.
- Cleanup comments.
- Print out error details the first time a package fails.
TEST=Ran full build_packages --fast
BUG=none
Review URL: http://codereview.chromium.org/2853031
- Unmerge appropriate packages during upgrades and downgrades.
- Calculate time spent in dependency generation to the tenth of a second.
- Only track dependencies of packages that are actually being installed.
- Ignore PDEPEND, as it has no impact on dependency ordering.
- Only break dependency chains that go against Portage's install order.
- Rename Failed -> Retrying.
- Print emerge command lines as they are run.
TEST=Emerged hard-host-depends and ran build_packages with parallel_emerge
BUG=none
Review URL: http://codereview.chromium.org/2886010
Include checked in parallel emerge,
with an optional (default false) argument
in build_image to turn it on.
Review URL: http://codereview.chromium.org/2827037