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

Issue 3305010: Use --usepkgonly in build_image to ensure no accidental builds of packages. (Closed)

Created:
10 years, 3 months ago by davidjames
Modified:
9 years, 4 months ago
CC:
chromium-os-reviews_chromium.org, Mandeep Singh Baines, anush, sosa
Visibility:
Public.

Description

Use --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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -6 lines) Patch
M build_image View 1 2 5 chunks +13 lines, -6 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
davidjames
10 years, 3 months ago (2010-09-03 20:56:29 UTC) #1
Mandeep Singh Baines
10 years, 3 months ago (2010-09-03 23:46:01 UTC) #2
LGTM

Powered by Google App Engine
This is Rietveld 408576698