I had a chroot where I had emerged chromeos-chrome without USE="pgo_generate". I wanted to build an image with USE="pgo_generate" so I did the following:
./build_image --board=lumpy test # Should I have specified USE="pgo_generate" here?
# As per my understanding, it is not necessary, but I see it in cbuildbot logs.
I imaged my machine only to find out that the image did not have chromeos-chrome with USE="pgo_generate".
(cr) ((adf8a00...)) asharif@asharif ~/trunk/src/scripts $ equery-lumpy uses chromeos-chrome
[ Legend : U - final flag setting for installation]
[ : I - package is installed with flag ]
[ Colors : set, unset ]
* Found these USE flags for chromeos-base/chromeos-chrome-25.0.1363.3_rc-r1:
U I
- - asan : Build with Address Sanitizer support
+ - autotest : <unknown>
+ - autotest : <unknown>
+ - build_tests : Build test targets
+ - buildcheck : <unknown>
+ - chrome_debug : Build with debug symbols (-g)
- - chrome_debug_tests : Don't strip test targets
- - chrome_internal : Add chrome branding
- - chrome_media : Build with additional codecs and containers
- - chrome_pdf : Build pdf reader
+ - chrome_remoting : Build chrome remoting feature
- - clang : Build with CC and C++ set to clang
- - component_build : Build components as shared libraries (faster link)
- - drm : <unknown>
+ - gold : Use gold linker
- - hardfp : <unknown>
+ - highdpi : Add high DPI resources
+ - nacl : Build Native Client (NaCL) support
- - neon : Use neon instructions (ARM only)
- - ninja : <unknown>
- - oem_wallpaper : <unknown>
- - opengles : <unknown>
- - pgo_generate : Generate profile-guided optimization data
- - pgo_use : Use profile data for profile-guided optimization
+ - reorder : Re-order symbols using profile data
+ - runhooks : Run build hooks
+ - verbose : Verbose build output
- - widevine_cdm : Build widevine plugin
(cr) ((adf8a00...)) asharif@asharif ~/trunk/src/scripts $ USE="pgo_generate" emerge-lumpy -pv chromeos-chrome
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild R ] chromeos-base/chromeos-chrome-25.0.1363.3_rc-r1 to /build/lumpy/ USE="autotest build_tests buildcheck chrome_debug chrome_remoting gold highdpi nacl pgo_generate reorder runhooks verbose -asan -chrome_debug_tests -chrome_internal -chrome_media -chrome_pdf -clang -component_build -drm -hardfp -neon -ninja -oem_wallpaper -opengles -pgo_use -widevine_cdm" 0 kB [1]
Total: 1 package (1 reinstall), Size of downloads: 0 kB
Portage tree and overlays:
[0] /usr/local/portage/stable
[1] /usr/local/portage/chromiumos
(cr) ((adf8a00...)) asharif@asharif ~/trunk/src/scripts $ emerge-lumpy -pv chromeos-chrome
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild R ] chromeos-base/chromeos-chrome-25.0.1363.3_rc-r1 to /build/lumpy/ USE="autotest build_tests buildcheck chrome_debug chrome_remoting gold highdpi nacl reorder runhooks verbose -asan -chrome_debug_tests -chrome_internal -chrome_media -chrome_pdf -clang -component_build -drm -hardfp -neon -ninja -oem_wallpaper -opengles -pgo_generate* -pgo_use -widevine_cdm" 0 kB [1]
Total: 1 package (1 reinstall), Size of downloads: 0 kB
Portage tree and overlays:
[0] /usr/local/portage/stable
[1] /usr/local/portage/chromiumos
(cr) ((adf8a00...)) asharif@asharif ~/trunk/src/scripts $
This is inconsistent output. equery-$board uses thinks pgo_generate is disabled, while emerge-$board -pv $package without that flag thinks the package is installed with USE="pgo_generate". Who should I trust? Should one of {emerge-$board,equery-$board} be fixed to be consistent with the other? What's the canonical way of checking USE flags for a package?
Also, I'd appreciate if someone knowledgeable could answer about passing in USE flags to build_image.