Commit Graph

12 Commits

Author SHA1 Message Date
Antoine Labour
2a58d0e610 fix toolchain location when using variants
BUG=None
TEST=run setup_board with a variant, run build_packages --fast

Review URL: http://codereview.chromium.org/3046009
2010-07-21 15:28:31 -07:00
David James
2be3f829e9 Fix infinite recursion in PrebuiltsReady when graph is cyclic.
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
2010-07-21 14:17:05 -07:00
David James
dd059edd58 Integrate parallel_emerge with emerge, boosting performance.
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
2010-07-20 11:21:23 -07:00
David James
677d9c9b6c Fix parallel_emerge --unmerge to actually work.
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
2010-07-15 19:32:36 -07:00
David James
ba2d887695 Fix parallel_emerge to handle "=" and "." in package names. Both can occur.
TEST=parallel_emerge --board=x86-generic -g =app-arch/bzip2-1.0.5-r1 =chromeos-base/power_manager-0.0.1 =dev-libs/expat-2.0.1-r3 =x11-libs/xtrans-1.2.5 =chromeos-base/google-breakpad-598-r2 =sys-libs/zlib-1.2.3-r1 =x11-proto/kbproto-1.0.4 =sys-libs/ncurses-5.7-r3 =x11-proto/xproto-7.0.16 =app-admin/eselect-python-20091230 =chromeos-base/kernel-headers-0.0.1-r1 =virtual/libintl-0
BUG=none

Review URL: http://codereview.chromium.org/2937011
2010-07-15 14:55:05 -07:00
David James
dc07fb27e4 Teach parallel_emerge to uninstall packages.
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
2010-07-13 00:33:20 -07:00
David James
b9ad46e9f7 Update parallel_emerge to support --workon.
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
2010-07-12 23:44:10 -07:00
Olof Johansson
2e1f24ba3e parallel_emerge: print total time and load in status output
TEST=run build_packages/build_image
BUG=none

Review URL: http://codereview.chromium.org/2946003
2010-07-09 12:20:32 -05:00
David James
37f50a00e6 Print status every 30 seconds so that buildbot doesn't kill us.
TEST=Ran CHROME_ORIGIN=SERVER_SOURCE ./parallel_emerge chromeos-chrome
BUG=none

Review URL: http://codereview.chromium.org/2924008
2010-07-08 21:14:03 -07:00
David James
9b20ce4cb0 Cleanup parallel_emerge a bit.
- 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
2010-07-08 17:51:42 -07:00
David James
a27ae994b5 Robustify package upgrades and dependency checking.
- 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
2010-07-01 20:52:59 -07:00
Nick Sanders
f2dee6c5df Add --fast to build_image
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
2010-07-01 00:21:32 -07:00