DescriptionUse --usepkgonly in build_image to ensure no accidental builds of packages.
Historically, we used --usepkgonly in build_image to ensure that packages
were not accidentally built during this step. Recently, build_image was
updated to use --usepkg. The benefit of using --usepkg was that it would not
install obsolete binary packages to your image. It was counter-intuitive that
--usepkgonly would install packages to your image that are not actually
installed to your board root. The disadvantage, however, of --usepkg, was that
it sometimes tried to build packages afresh using the image as your build root,
and this failed with strange errors because you're not supposed to do that.
This change fixes build_image to give useful errors by switching back to
--usepkgonly. To fix the problem where --usepkgonly installs packages that are
not installed, we first run eclean-<board> to clean all unused packages from
the board root.
This change is a big improvement because a number of people have run into
strange issues with build_image due to this problem and have had trouble
debugging them.
This change was actually written by Sean Paul, and I am shepherding his change
through for him because he doesn't have a Chromium account yet.
BUG=chromium-os:6437
TEST=
1) build_packages && build_image should still work
2) build_packages && ./cros_workon start power_manager && build_image should
fail with an error that all versions of the power manager are masked. This
happens because you started working on the power manager, but did not build
the version of the power manager you were working on before installing it.
3) Assuming you are working on the power manager, build_packages && build_image
should succeed because your cros_workon'd version of the package is built.
4) ( ./cros_workon start power_manager && build_packages &&
./cros_workon stop power_manager && build_image ) should fail with the
same error message as case 2 for similar reasons.
5) ( ./cros_workon start power_manager && build_packages &&
./cros_workon stop power_manager && build_packages && build_image )
should work because you've built your new version of the stable package.
Change-Id: Ia3858c70997bc6f0ec0b6d1bfaede8d3272a0976
Patch Set 1 #Patch Set 2 : Minor nits #Patch Set 3 : Verify no changes #Messages
Total messages: 2 (0 generated)
|