Update parallel_emerge to rebuild packages when use flags change.
Update parallel_emerge to rebuild packages when use flags change.

parallel_emerge now checks the use flags of installed packages against new
packages, and checks the use flags of binary packages against source packages,
so that, when the appropriate flags are used, we never install packages with
the wrong use flags.

I've also fix related bugs in rebuild_blacklist. Previously, rebuild_blacklist
was too aggressive -- it even blacklisted packages from being rebuilt if they
are explicit workon packages. This bug also causes problems for the use flag
detection code because packages in this list would not get rebuilt when
the use flags changed. So I fixed this too.

Also relatedly, I've fixed our code for checking whether --selective is
enabled to look at the --newuse and --reinstall=changed-use flags. These
flags actually enable --selective implicitly, so we need to honor that for
correct behavior.

BUG=chromium-os:6359
TEST=Made sure that packages get rebuilt / reinstalled when use flags change.

Change-Id: I2d945b552863410ec7b286c3ed55ae4a64336ed5

Review URL: http://codereview.chromium.org/3361002

mischief/scripts,trnubo/scripts,fivethreeo/scripts,BugRoger/scripts,gtank/scripts,mischief/scripts,zhang0137/scripts,coreos/scripts,BugRoger/scripts,vmware/coreos-scripts,BugRoger/scripts,smilart/scripts,glevand/coreos--scripts,andrejro/coreos--scripts,andrejro/coreos--scripts,sigma/coreos-scripts,crawford/scripts,sigma/coreos-scripts,bcwaldon/coreos-scripts,bcwaldon/coreos-scripts,vmware/coreos-scripts,endocode/scripts,mjg59/scripts,endocode/scripts,smilart/scripts,nicescale/scripts,bcwaldon/coreos-scripts,andrejro/coreos--scripts,smilart/scripts,mjg59/scripts,mischief/scripts,crawford/scripts,trnubo/scripts,mjg59/scripts,nicescale/scripts,fivethreeo/scripts,glevand/coreos--scripts,marineam/coreos-scripts,fivethreeo/scripts,marineam/coreos-scripts,sigma/coreos-scripts,nicescale/scripts,coreos/scripts,zhang0137/scripts,gtank/scripts,trnubo/scripts,gtank/scripts,marineam/coreos-scripts,vmware/coreos-scripts,zhang0137/scripts,crawford/scripts,endocode/scripts